6#ifndef ESYS_CRYPTO_OSSL_H
7#define ESYS_CRYPTO_OSSL_H
10#include "tss2_tpm2_types.h"
11#include "tss2-sys/sysapi_util.h"
17#define OSSL_FREE(S,TYPE) if((S) != NULL) {TYPE##_free((void*) (S)); (S)=NULL;}
19TSS2_RC iesys_cryptossl_hash_start(
24TSS2_RC iesys_cryptossl_hash_update(
26 const uint8_t *buffer,
size_t size,
29TSS2_RC iesys_cryptossl_hash_finish(
35void iesys_cryptossl_hash_abort(
39#define _iesys_crypto_rsa_pk_encrypt iesys_cryptossl_pk_encrypt
40#define _iesys_crypto_hash_start iesys_cryptossl_hash_start
41#define _iesys_crypto_hash_update iesys_cryptossl_hash_update
42#define _iesys_crypto_hash_finish iesys_cryptossl_hash_finish
43#define _iesys_crypto_hash_abort iesys_cryptossl_hash_abort
45TSS2_RC iesys_cryptossl_hmac_start(
52TSS2_RC iesys_cryptossl_hmac_update(
54 const uint8_t *buffer,
58TSS2_RC iesys_cryptossl_hmac_finish(
64void iesys_cryptossl_hmac_abort(
68#define _iesys_crypto_hmac_start iesys_cryptossl_hmac_start
69#define _iesys_crypto_hmac_start2b iesys_cryptossl_hmac_start2b
70#define _iesys_crypto_hmac_update iesys_cryptossl_hmac_update
71#define _iesys_crypto_hmac_update2b iesys_cryptossl_hmac_update2b
72#define _iesys_crypto_hmac_finish iesys_cryptossl_hmac_finish
73#define _iesys_crypto_hmac_finish2b iesys_cryptossl_hmac_finish2b
74#define _iesys_crypto_hmac_abort iesys_cryptossl_hmac_abort
76TSS2_RC iesys_cryptossl_random2b(
81TSS2_RC iesys_cryptossl_pk_encrypt(
92TSS2_RC iesys_cryptossl_sym_aes_encrypt(
94 TPM2_ALG_ID tpm_sym_alg,
95 TPMI_AES_KEY_BITS key_bits,
102TSS2_RC iesys_cryptossl_sym_aes_decrypt(
104 TPM2_ALG_ID tpm_sym_alg,
105 TPMI_AES_KEY_BITS key_bits,
106 TPM2_ALG_ID tpm_mode,
112TSS2_RC iesys_cryptossl_get_ecdh_point(
115 TPM2B_ECC_PARAMETER *Z,
121#define _iesys_crypto_get_random2b iesys_cryptossl_random2b
122#define _iesys_crypto_get_ecdh_point iesys_cryptossl_get_ecdh_point
123#define _iesys_crypto_aes_encrypt iesys_cryptossl_sym_aes_encrypt
124#define _iesys_crypto_aes_decrypt iesys_cryptossl_sym_aes_decrypt
126TSS2_RC iesys_cryptossl_init(
void *userdata);
128#define _iesys_crypto_init iesys_cryptossl_init
Definition: esys_crypto_mbed.c:34