| /optee_os/core/lib/libtomcrypt/ |
| H A D | hmac.c | 17 struct crypto_mac_ctx ctx; 24 static struct ltc_hmac_ctx *to_hmac_ctx(struct crypto_mac_ctx *ctx) in to_hmac_ctx() 31 static TEE_Result ltc_hmac_init(struct crypto_mac_ctx *ctx, const uint8_t *key, in ltc_hmac_init() 42 static TEE_Result ltc_hmac_update(struct crypto_mac_ctx *ctx, in ltc_hmac_update() 51 static TEE_Result ltc_hmac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in ltc_hmac_final() 62 static void ltc_hmac_free_ctx(struct crypto_mac_ctx *ctx) in ltc_hmac_free_ctx() 67 static void ltc_hmac_copy_state(struct crypto_mac_ctx *dst_ctx, in ltc_hmac_copy_state() 68 struct crypto_mac_ctx *src_ctx) in ltc_hmac_copy_state() 85 static TEE_Result ltc_hmac_alloc_ctx(struct crypto_mac_ctx **ctx_ret, in ltc_hmac_alloc_ctx() 105 TEE_Result crypto_hmac_md5_alloc_ctx(struct crypto_mac_ctx **ctx) in crypto_hmac_md5_alloc_ctx() [all …]
|
| H A D | cmac.c | 18 struct crypto_mac_ctx ctx; 25 static struct ltc_omac_ctx *to_omac_ctx(struct crypto_mac_ctx *ctx) in to_omac_ctx() 32 static TEE_Result ltc_omac_init(struct crypto_mac_ctx *ctx, const uint8_t *key, in ltc_omac_init() 43 static TEE_Result ltc_omac_update(struct crypto_mac_ctx *ctx, in ltc_omac_update() 52 static TEE_Result ltc_omac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in ltc_omac_final() 63 static void ltc_omac_free_ctx(struct crypto_mac_ctx *ctx) in ltc_omac_free_ctx() 68 static void ltc_omac_copy_state(struct crypto_mac_ctx *dst_ctx, in ltc_omac_copy_state() 69 struct crypto_mac_ctx *src_ctx) in ltc_omac_copy_state() 86 static TEE_Result crypto_common_cmac_alloc_ctx(struct crypto_mac_ctx **ctx_ret, in crypto_common_cmac_alloc_ctx() 109 TEE_Result crypto_aes_cmac_alloc_ctx(struct crypto_mac_ctx **ctx_ret) in crypto_aes_cmac_alloc_ctx() [all …]
|
| /optee_os/lib/libmbedtls/core/ |
| H A D | hmac.c | 20 struct crypto_mac_ctx mac_ctx; 26 static struct mbed_hmac_ctx *to_hmac_ctx(struct crypto_mac_ctx *ctx) in to_hmac_ctx() 33 static TEE_Result mbed_hmac_init(struct crypto_mac_ctx *ctx, in mbed_hmac_init() 42 static TEE_Result mbed_hmac_update(struct crypto_mac_ctx *ctx, in mbed_hmac_update() 51 static TEE_Result mbed_hmac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in mbed_hmac_final() 80 static void mbed_hmac_free_ctx(struct crypto_mac_ctx *ctx) in mbed_hmac_free_ctx() 88 static void mbed_hmac_copy_state(struct crypto_mac_ctx *dst_ctx, in mbed_hmac_copy_state() 89 struct crypto_mac_ctx *src_ctx) in mbed_hmac_copy_state() 106 static TEE_Result mbed_hmac_alloc_ctx(struct crypto_mac_ctx **ctx_ret, in mbed_hmac_alloc_ctx() 135 TEE_Result crypto_hmac_md5_alloc_ctx(struct crypto_mac_ctx **ctx) in crypto_hmac_md5_alloc_ctx() [all …]
|
| H A D | cmac.c | 21 struct crypto_mac_ctx mac_ctx; 28 static struct mbed_cmac_ctx *to_cmac_ctx(struct crypto_mac_ctx *ctx) in to_cmac_ctx() 36 static TEE_Result mbed_cmac_init(struct crypto_mac_ctx *ctx, in mbed_cmac_init() 60 static TEE_Result mbed_cmac_update(struct crypto_mac_ctx *ctx, in mbed_cmac_update() 71 static TEE_Result mbed_cmac_final(struct crypto_mac_ctx *ctx, in mbed_cmac_final() 101 static void mbed_cmac_free_ctx(struct crypto_mac_ctx *ctx) in mbed_cmac_free_ctx() 109 static void mbed_cmac_copy_state(struct crypto_mac_ctx *dst_ctx, in mbed_cmac_copy_state() 110 struct crypto_mac_ctx *src_ctx) in mbed_cmac_copy_state() 127 static TEE_Result crypto_cmac_alloc_ctx(struct crypto_mac_ctx **ctx_ret, in crypto_cmac_alloc_ctx() 174 TEE_Result crypto_des3_cmac_alloc_ctx(struct crypto_mac_ctx **ctx_ret) in crypto_des3_cmac_alloc_ctx() [all …]
|
| /optee_os/core/crypto/ |
| H A D | sm3-hmac.c | 21 struct crypto_mac_ctx mac_ctx; 27 static struct sm3_hmac_ctx *to_hmac_ctx(struct crypto_mac_ctx *ctx) in to_hmac_ctx() 34 static TEE_Result op_sm3_hmac_init(struct crypto_mac_ctx *ctx, in op_sm3_hmac_init() 42 static TEE_Result op_sm3_hmac_update(struct crypto_mac_ctx *ctx, in op_sm3_hmac_update() 50 static TEE_Result op_sm3_hmac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in op_sm3_hmac_final() 74 static void op_sm3_hmac_free_ctx(struct crypto_mac_ctx *ctx) in op_sm3_hmac_free_ctx() 82 static void op_sm3_hmac_copy_state(struct crypto_mac_ctx *dst_ctx, in op_sm3_hmac_copy_state() 83 struct crypto_mac_ctx *src_ctx) in op_sm3_hmac_copy_state() 99 TEE_Result crypto_hmac_sm3_alloc_ctx(struct crypto_mac_ctx **ctx) in crypto_hmac_sm3_alloc_ctx()
|
| H A D | cbc-mac.c | 22 struct crypto_mac_ctx ctx; 35 static struct crypto_cbc_mac_ctx *to_cbc_mac_ctx(struct crypto_mac_ctx *ctx) in to_cbc_mac_ctx() 42 static TEE_Result crypto_cbc_mac_init(struct crypto_mac_ctx *ctx, in crypto_cbc_mac_init() 57 static TEE_Result crypto_cbc_mac_update(struct crypto_mac_ctx *ctx, in crypto_cbc_mac_update() 127 static TEE_Result crypto_cbc_mac_final(struct crypto_mac_ctx *ctx, in crypto_cbc_mac_final() 155 static void crypto_cbc_mac_free_ctx(struct crypto_mac_ctx *ctx) in crypto_cbc_mac_free_ctx() 163 static void crypto_cbc_mac_copy_state(struct crypto_mac_ctx *dst_ctx, in crypto_cbc_mac_copy_state() 164 struct crypto_mac_ctx *src_ctx) in crypto_cbc_mac_copy_state() 188 static TEE_Result crypto_cbc_mac_alloc_ctx(struct crypto_mac_ctx **ctx_ret, in crypto_cbc_mac_alloc_ctx() 220 TEE_Result crypto_aes_cbc_mac_nopad_alloc_ctx(struct crypto_mac_ctx **ctx) in crypto_aes_cbc_mac_nopad_alloc_ctx() [all …]
|
| H A D | crypto.c | 248 struct crypto_mac_ctx *c = NULL; in crypto_mac_alloc_ctx() 328 struct crypto_mac_ctx *c = ctx; in mac_ops()
|
| /optee_os/core/include/crypto/ |
| H A D | crypto_impl.h | 119 struct crypto_mac_ctx { struct 124 TEE_Result (*init)(struct crypto_mac_ctx *ctx, const uint8_t *key, argument 126 TEE_Result (*update)(struct crypto_mac_ctx *ctx, const uint8_t *data, 128 TEE_Result (*final)(struct crypto_mac_ctx *ctx, uint8_t *digest, 130 void (*free_ctx)(struct crypto_mac_ctx *ctx); 131 void (*copy_state)(struct crypto_mac_ctx *dst_ctx, 132 struct crypto_mac_ctx *src_ctx); 136 TEE_Result crypto_hmac_md5_alloc_ctx(struct crypto_mac_ctx **ctx); 142 TEE_Result crypto_hmac_sha1_alloc_ctx(struct crypto_mac_ctx **ctx); 148 TEE_Result crypto_hmac_sha224_alloc_ctx(struct crypto_mac_ctx **ctx); [all …]
|
| /optee_os/core/drivers/crypto/stm32/ |
| H A D | hmac.c | 20 struct crypto_mac_ctx mac_ctx; 26 static struct stm32_hmac_ctx *to_stm32_hmac_ctx(struct crypto_mac_ctx *ctx) in to_stm32_hmac_ctx() 40 static TEE_Result do_hmac_init(struct crypto_mac_ctx *ctx, const uint8_t *key, in do_hmac_init() 70 static TEE_Result do_hmac_update(struct crypto_mac_ctx *ctx, in do_hmac_update() 90 static TEE_Result do_hmac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in do_hmac_final() 119 static void do_hmac_free(struct crypto_mac_ctx *ctx) in do_hmac_free() 134 static void do_hmac_copy_state(struct crypto_mac_ctx *dst_ctx, in do_hmac_copy_state() 135 struct crypto_mac_ctx *src_ctx) in do_hmac_copy_state() 171 static TEE_Result stm32_hmac_allocate(struct crypto_mac_ctx **ctx, in stm32_hmac_allocate()
|
| /optee_os/core/drivers/crypto/hisilicon/ |
| H A D | sec_hmac.c | 13 static struct crypto_hmac *to_hmac_ctx(struct crypto_mac_ctx *ctx) in to_hmac_ctx() 18 static TEE_Result sec_hmac_initialize(struct crypto_mac_ctx *ctx, in sec_hmac_initialize() 35 static TEE_Result sec_hmac_do_update(struct crypto_mac_ctx *ctx, in sec_hmac_do_update() 57 static TEE_Result sec_hmac_do_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in sec_hmac_do_final() 66 static void sec_hmac_ctx_free(struct crypto_mac_ctx *ctx) in sec_hmac_ctx_free() 87 static void sec_hmac_copy_state(struct crypto_mac_ctx *out_ctx, in sec_hmac_copy_state() 88 struct crypto_mac_ctx *in_ctx) in sec_hmac_copy_state() 117 static TEE_Result sec_hmac_ctx_allocate(struct crypto_mac_ctx **ctx, in sec_hmac_ctx_allocate()
|
| H A D | sec_hash.h | 61 struct crypto_mac_ctx hmac_op; /* Crypto Hash API context */
|
| /optee_os/core/drivers/crypto/caam/hash/ |
| H A D | caam_hash_mac.c | 36 struct crypto_mac_ctx mac_ctx; /* Crypto MAC API context */ 52 static struct crypto_mac *to_mac_ctx(struct crypto_mac_ctx *ctx) in to_mac_ctx() 123 static TEE_Result do_hmac_init(struct crypto_mac_ctx *ctx, const uint8_t *inkey, in do_hmac_init() 217 static TEE_Result do_hmac_update(struct crypto_mac_ctx *ctx, in do_hmac_update() 233 static TEE_Result do_hmac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in do_hmac_final() 247 static void do_hmac_free(struct crypto_mac_ctx *ctx) in do_hmac_free() 263 static void do_hmac_copy_state(struct crypto_mac_ctx *dst_ctx, in do_hmac_copy_state() 264 struct crypto_mac_ctx *src_ctx) in do_hmac_copy_state() 289 static TEE_Result caam_hmac_allocate(struct crypto_mac_ctx **ctx, uint32_t algo) in caam_hmac_allocate()
|
| /optee_os/core/drivers/crypto/caam/cipher/ |
| H A D | caam_cipher_mac.c | 94 struct crypto_mac_ctx mac_ctx; /* Crypto MAC API context */ 103 static struct crypto_mac *to_mac_ctx(struct crypto_mac_ctx *ctx) in to_mac_ctx() 578 static TEE_Result do_cmac_init(struct crypto_mac_ctx *ctx, const uint8_t *key, in do_cmac_init() 628 static TEE_Result do_cmac_update(struct crypto_mac_ctx *ctx, in do_cmac_update() 660 static TEE_Result do_cmac_final(struct crypto_mac_ctx *ctx, uint8_t *digest, in do_cmac_final() 709 static void do_cmac_free(struct crypto_mac_ctx *ctx) in do_cmac_free() 723 static void do_cmac_copy_state(struct crypto_mac_ctx *dst_ctx, in do_cmac_copy_state() 724 struct crypto_mac_ctx *src_ctx) in do_cmac_copy_state() 754 static TEE_Result caam_cmac_allocate(struct crypto_mac_ctx **ctx, uint32_t algo) in caam_cmac_allocate()
|
| /optee_os/core/drivers/crypto/crypto_api/include/ |
| H A D | drvcrypt_mac.h | 17 typedef TEE_Result (*drvcrypt_mac_allocate)(struct crypto_mac_ctx **ctx,
|
| /optee_os/core/drivers/crypto/crypto_api/mac/ |
| H A D | mac.c | 13 TEE_Result drvcrypt_mac_alloc_ctx(struct crypto_mac_ctx **ctx, uint32_t algo) in drvcrypt_mac_alloc_ctx()
|