7 #ifndef ESYS_CRYPTO_MBED_H
8 #define ESYS_CRYPTO_MBED_H
11 #include "tss2_tpm2_types.h"
12 #include "tss2-sys/sysapi_util.h"
18 TSS2_RC iesys_cryptmbed_hash_start(
23 TSS2_RC iesys_cryptmbed_hash_update(
25 const uint8_t *buffer,
size_t size,
28 TSS2_RC iesys_cryptmbed_hash_finish(
34 void iesys_cryptmbed_hash_abort(
38 #define _iesys_crypto_rsa_pk_encrypt iesys_cryptmbed_pk_encrypt
39 #define _iesys_crypto_hash_start iesys_cryptmbed_hash_start
40 #define _iesys_crypto_hash_update iesys_cryptmbed_hash_update
41 #define _iesys_crypto_hash_finish iesys_cryptmbed_hash_finish
42 #define _iesys_crypto_hash_abort iesys_cryptmbed_hash_abort
44 TSS2_RC iesys_cryptmbed_hmac_start(
51 TSS2_RC iesys_cryptmbed_hmac_update(
53 const uint8_t *buffer,
57 TSS2_RC iesys_cryptmbed_hmac_finish(
63 void iesys_cryptmbed_hmac_abort(
67 #define _iesys_crypto_hmac_start iesys_cryptmbed_hmac_start
68 #define _iesys_crypto_hmac_update iesys_cryptmbed_hmac_update
69 #define _iesys_crypto_hmac_finish iesys_cryptmbed_hmac_finish
70 #define _iesys_crypto_hmac_abort iesys_cryptmbed_hmac_abort
72 TSS2_RC iesys_cryptmbed_random2b(
77 TSS2_RC iesys_cryptmbed_pk_encrypt(
88 TSS2_RC iesys_cryptmbed_sym_aes_encrypt(
90 TPM2_ALG_ID tpm_sym_alg,
91 TPMI_AES_KEY_BITS key_bits,
98 TSS2_RC iesys_cryptmbed_sym_aes_decrypt(
100 TPM2_ALG_ID tpm_sym_alg,
101 TPMI_AES_KEY_BITS key_bits,
102 TPM2_ALG_ID tpm_mode,
108 TSS2_RC iesys_cryptmbed_get_ecdh_point(
111 TPM2B_ECC_PARAMETER *Z,
117 TSS2_RC iesys_cryptmbed_init(
void *userdata);
119 #define _iesys_crypto_get_random2b iesys_cryptmbed_random2b
120 #define _iesys_crypto_get_ecdh_point iesys_cryptmbed_get_ecdh_point
121 #define _iesys_crypto_aes_encrypt iesys_cryptmbed_sym_aes_encrypt
122 #define _iesys_crypto_aes_decrypt iesys_cryptmbed_sym_aes_decrypt
123 #define _iesys_crypto_sm4_encrypt NULL
124 #define _iesys_crypto_sm4_decrypt NULL
126 #define _iesys_crypto_init iesys_cryptmbed_init
Definition: esys_crypto_mbed.c:34