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;} 27 const uint8_t *buffer,
size_t size);
44 #define iesys_crypto_pk_encrypt iesys_cryptossl_pk_encrypt 45 #define iesys_crypto_hash_start iesys_cryptossl_hash_start 46 #define iesys_crypto_hash_update iesys_cryptossl_hash_update 47 #define iesys_crypto_hash_update2b iesys_cryptossl_hash_update2b 48 #define iesys_crypto_hash_finish iesys_cryptossl_hash_finish 49 #define iesys_crypto_hash_finish2b iesys_cryptossl_hash_finish2b 50 #define iesys_crypto_hash_abort iesys_cryptossl_hash_abort 58 TSS2_RC iesys_cryptossl_hmac_start2b(
65 const uint8_t *buffer,
83 #define iesys_crypto_hmac_start iesys_cryptossl_hmac_start 84 #define iesys_crypto_hmac_start2b iesys_cryptossl_hmac_start2b 85 #define iesys_crypto_hmac_update iesys_cryptossl_hmac_update 86 #define iesys_crypto_hmac_update2b iesys_cryptossl_hmac_update2b 87 #define iesys_crypto_hmac_finish iesys_cryptossl_hmac_finish 88 #define iesys_crypto_hmac_finish2b iesys_cryptossl_hmac_finish2b 89 #define iesys_crypto_hmac_abort iesys_cryptossl_hmac_abort 103 TSS2_RC iesys_cryptossl_sym_aes_encrypt(
105 TPM2_ALG_ID tpm_sym_alg,
106 TPMI_AES_KEY_BITS key_bits,
107 TPM2_ALG_ID tpm_mode,
112 TSS2_RC iesys_cryptossl_sym_aes_decrypt(
114 TPM2_ALG_ID tpm_sym_alg,
115 TPMI_AES_KEY_BITS key_bits,
116 TPM2_ALG_ID tpm_mode,
124 TPM2B_ECC_PARAMETER *Z,
129 #define iesys_crypto_random2b iesys_cryptossl_random2b 130 #define iesys_crypto_get_ecdh_point iesys_cryptossl_get_ecdh_point 131 #define iesys_crypto_sym_aes_encrypt iesys_cryptossl_sym_aes_encrypt 132 #define iesys_crypto_sym_aes_decrypt iesys_cryptossl_sym_aes_decrypt 134 TSS2_RC iesys_cryptossl_init();
136 #define iesys_crypto_init iesys_cryptossl_init TSS2_RC iesys_cryptossl_hash_finish(IESYS_CRYPTO_CONTEXT_BLOB **context, uint8_t *buffer, size_t *size)
Definition: esys_crypto_ossl.c:291
TSS2_RC iesys_cryptossl_hash_update(IESYS_CRYPTO_CONTEXT_BLOB *context, const uint8_t *buffer, size_t size)
Definition: esys_crypto_ossl.c:234
TSS2_RC iesys_cryptossl_hmac_update(IESYS_CRYPTO_CONTEXT_BLOB *context, const uint8_t *buffer, size_t size)
Definition: esys_crypto_ossl.c:442
TSS2_RC iesys_cryptossl_hmac_finish(IESYS_CRYPTO_CONTEXT_BLOB **context, uint8_t *buffer, size_t *size)
Definition: esys_crypto_ossl.c:498
TSS2_RC iesys_cryptossl_pk_encrypt(TPM2B_PUBLIC *key, size_t in_size, BYTE *in_buffer, size_t max_out_size, BYTE *out_buffer, size_t *out_size, const char *label)
Definition: esys_crypto_ossl.c:638
TSS2_RC iesys_cryptossl_hmac_start(IESYS_CRYPTO_CONTEXT_BLOB **context, TPM2_ALG_ID hmacAlg, const uint8_t *key, size_t size)
Definition: esys_crypto_ossl.c:369
TSS2_RC iesys_cryptossl_hash_update2b(IESYS_CRYPTO_CONTEXT_BLOB *context, TPM2B *b)
Definition: esys_crypto_ossl.c:268
TSS2_RC iesys_cryptossl_get_ecdh_point(TPM2B_PUBLIC *key, size_t max_out_size, TPM2B_ECC_PARAMETER *Z, TPMS_ECC_POINT *Q, BYTE *out_buffer, size_t *out_size)
Definition: esys_crypto_ossl.c:903
Definition: esys_crypto_mbed.c:28
TSS2_RC iesys_cryptossl_random2b(TPM2B_NONCE *nonce, size_t num_bytes)
Definition: esys_crypto_ossl.c:591
void iesys_cryptossl_hmac_abort(IESYS_CRYPTO_CONTEXT_BLOB **context)
Definition: esys_crypto_ossl.c:561
TSS2_RC iesys_cryptossl_hash_start(IESYS_CRYPTO_CONTEXT_BLOB **context, TPM2_ALG_ID hashAlg)
Definition: esys_crypto_ossl.c:182
TSS2_RC iesys_cryptossl_hmac_update2b(IESYS_CRYPTO_CONTEXT_BLOB *context, TPM2B *b)
Definition: esys_crypto_ossl.c:475
TSS2_RC iesys_cryptossl_hash_finish2b(IESYS_CRYPTO_CONTEXT_BLOB **context, TPM2B *b)
TSS2_RC iesys_cryptossl_hmac_finish2b(IESYS_CRYPTO_CONTEXT_BLOB **context, TPM2B *b)
Definition: esys_crypto_ossl.c:543