| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | psa_crypto_mac.h | 2 * PSA MAC layer on top of Mbed TLS software crypto 14 /** Calculate the MAC (message authentication code) of a message using Mbed TLS. 24 * computing the MAC. This buffer contains the key 28 * \param alg The MAC algorithm to use (\c PSA_ALG_XXX value 32 * \param[out] mac Buffer where the MAC value is to be written. 33 * \param mac_size Size of the \p mac buffer in bytes. 35 * that make up the MAC value. 53 uint8_t *mac, 57 /** Set up a multipart MAC calculation operation using Mbed TLS. 69 * computing the MAC. This buffer contains the key [all …]
|
| H A D | psa_crypto_mac.c | 2 * PSA MAC layer on top of Mbed TLS software crypto 68 /* A 0-length key is not commonly used in HMAC when used as a MAC, in psa_hmac_setup_internal() 113 uint8_t *mac, in psa_hmac_finish_internal() argument 148 memcpy(mac, tmp, mac_size); in psa_hmac_finish_internal() 200 /* Initialize this driver's MAC operation structure. Once this function has been 374 uint8_t *mac, size_t mac_size) in psa_mac_finish_internal() argument 381 memcpy(mac, tmp, mac_size); in psa_mac_finish_internal() 390 mac, mac_size); in psa_mac_finish_internal() 397 (void) mac; in psa_mac_finish_internal() 405 uint8_t *mac, in mbedtls_psa_mac_sign_finish() argument [all …]
|
| H A D | poly1305.c | 165 * \brief Compute the Poly1305 MAC 168 * \param mac The buffer to where the MAC is written. Must be 169 * big enough to contain the 16-byte MAC. 172 unsigned char mac[16]) in poly1305_compute_mac() 221 /* Compute MAC (128 least significant bits of the accumulator) */ in poly1305_compute_mac() 222 MBEDTLS_PUT_UINT32_LE(acc0, mac, 0); in poly1305_compute_mac() 223 MBEDTLS_PUT_UINT32_LE(acc1, mac, 4); in poly1305_compute_mac() 224 MBEDTLS_PUT_UINT32_LE(acc2, mac, 8); in poly1305_compute_mac() 225 MBEDTLS_PUT_UINT32_LE(acc3, mac, 12); in poly1305_compute_mac() 327 unsigned char mac[16]) in mbedtls_poly1305_finish() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/mac/blake2/ |
| H A D | blake2smac.c | 9 Initialize an BLAKE2S MAC context. 10 @param st The BLAKE2S MAC state 11 @param outlen The size of the MAC output (octets) 24 Process data through BLAKE2S MAC 25 @param st The BLAKE2S MAC state 39 Terminate a BLAKE2S MAC session 40 @param st The BLAKE2S MAC state 41 @param mac [out] The destination of the BLAKE2S MAC authentication tag 42 @param maclen [in/out] The max size and resulting size of the BLAKE2S MAC authentication tag 45 int blake2smac_done(blake2smac_state *st, unsigned char *mac, unsigned long *maclen) in blake2smac_done() argument [all …]
|
| H A D | blake2bmac.c | 9 Initialize an BLAKE2B MAC context. 10 @param st The BLAKE2B MAC state 11 @param outlen The size of the MAC output (octets) 24 Process data through BLAKE2B MAC 25 @param st The BLAKE2B MAC state 39 Terminate a BLAKE2B MAC session 40 @param st The BLAKE2B MAC state 41 @param mac [out] The destination of the BLAKE2B MAC authentication tag 42 @param maclen [in/out] The max size and resulting size of the BLAKE2B MAC authentication tag 45 int blake2bmac_done(blake2bmac_state *st, unsigned char *mac, unsigned long *maclen) in blake2bmac_done() argument [all …]
|
| H A D | blake2bmac_memory_multi.c | 10 BLAKE2B MAC multiple blocks of memory to produce the authentication tag 13 @param mac [out] Destination of the authentication tag 15 @param in The data to BLAKE2B MAC 16 @param inlen The length of the data to BLAKE2B MAC (octets) 17 …@param ... tuples of (data,len) pairs to BLAKE2B MAC, terminated with a (NULL,x) (x=don't ca… 20 int blake2bmac_memory_multi(const unsigned char *key, unsigned long keylen, unsigned char *mac, uns… in blake2bmac_memory_multi() argument 30 LTC_ARGCHK(mac != NULL); in blake2bmac_memory_multi() 43 err = blake2bmac_done(&st, mac, maclen); in blake2bmac_memory_multi()
|
| H A D | blake2smac_memory_multi.c | 10 BLAKE2S MAC multiple blocks of memory to produce the authentication tag 13 @param mac [out] Destination of the authentication tag 15 @param in The data to BLAKE2S MAC 16 @param inlen The length of the data to BLAKE2S MAC (octets) 17 …@param ... tuples of (data,len) pairs to BLAKE2S MAC, terminated with a (NULL,x) (x=don't ca… 20 int blake2smac_memory_multi(const unsigned char *key, unsigned long keylen, unsigned char *mac, uns… in blake2smac_memory_multi() argument 30 LTC_ARGCHK(mac != NULL); in blake2smac_memory_multi() 43 err = blake2smac_done(&st, mac, maclen); in blake2smac_memory_multi()
|
| H A D | blake2smac_file.c | 9 BLAKE2S MAC a file 10 @param fname The name of the file you wish to BLAKE2S MAC 13 @param mac [out] The BLAKE2S MAC authentication tag 17 …har *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *mac… in blake2smac_file() argument 23 LTC_UNUSED_PARAM(mac); in blake2smac_file() 35 LTC_ARGCHK(mac != NULL); in blake2smac_file() 65 err = blake2smac_done(&st, mac, maclen); in blake2smac_file()
|
| H A D | blake2bmac_file.c | 9 BLAKE2B MAC a file 10 @param fname The name of the file you wish to BLAKE2B MAC 13 @param mac [out] The BLAKE2B MAC authentication tag 17 …har *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *mac… in blake2bmac_file() argument 23 LTC_UNUSED_PARAM(mac); in blake2bmac_file() 35 LTC_ARGCHK(mac != NULL); in blake2bmac_file() 65 err = blake2bmac_done(&st, mac, maclen); in blake2bmac_file()
|
| H A D | blake2bmac_memory.c | 9 BLAKE2B MAC a block of memory to produce the authentication tag 12 @param in The data to BLAKE2B MAC 13 @param inlen The length of the data to BLAKE2B MAC (octets) 14 @param mac [out] Destination of the authentication tag 18 … long keylen, const unsigned char *in, unsigned long inlen, unsigned char *mac, unsigned long *mac… in blake2bmac_memory() argument 25 LTC_ARGCHK(mac != NULL); in blake2bmac_memory() 30 err = blake2bmac_done(&st, mac, maclen); in blake2bmac_memory()
|
| H A D | blake2smac_memory.c | 9 BLAKE2S MAC a block of memory to produce the authentication tag 12 @param in The data to BLAKE2S MAC 13 @param inlen The length of the data to BLAKE2S MAC (octets) 14 @param mac [out] Destination of the authentication tag 18 … long keylen, const unsigned char *in, unsigned long inlen, unsigned char *mac, unsigned long *mac… in blake2smac_memory() argument 25 LTC_ARGCHK(mac != NULL); in blake2smac_memory() 30 err = blake2smac_done(&st, mac, maclen); in blake2smac_memory()
|
| /optee_os/core/drivers/crypto/se050/glue/ |
| H A D | user.c | 13 sss_status_t glue_mac_context_init(void **mac, const uint8_t *key, size_t len) in glue_mac_context_init() argument 15 if (crypto_mac_alloc_ctx(mac, TEE_ALG_AES_CMAC)) in glue_mac_context_init() 18 if (crypto_mac_init(*mac, key, len)) in glue_mac_context_init() 24 void glue_mac_context_free(void *mac) in glue_mac_context_free() argument 26 crypto_mac_free_ctx(mac); in glue_mac_context_free() 29 sss_status_t glue_mac_update(void *mac, const uint8_t *msg, size_t len) in glue_mac_update() argument 31 if (crypto_mac_update(mac, msg, len)) in glue_mac_update() 37 sss_status_t glue_mac_final(void *mac, uint8_t *buf, size_t len) in glue_mac_final() argument 39 if (crypto_mac_final(mac, buf, len)) in glue_mac_final() 45 sss_status_t glue_mac_one_go(void *mac, const uint8_t *msg, size_t msg_len, in glue_mac_one_go() argument [all …]
|
| /optee_os/core/drivers/crypto/caam/hash/ |
| H A D | caam_hash_mac.c | 33 * Format the MAC context to keep the reference to the operation driver. 36 struct crypto_mac_ctx mac_ctx; /* Crypto MAC API context */ 128 struct crypto_mac *mac = to_mac_ctx(ctx); in do_hmac_init() local 129 struct hashctx *hmac_ctx = mac->ctx; in do_hmac_init() 220 struct crypto_mac *mac = to_mac_ctx(ctx); in do_hmac_update() local 222 return caam_hash_hmac_update(mac->ctx, data, len); in do_hmac_update() 236 struct crypto_mac *mac = to_mac_ctx(ctx); in do_hmac_final() local 238 return caam_hash_hmac_final(mac->ctx, digest, len); in do_hmac_final() 249 struct crypto_mac *mac = to_mac_ctx(ctx); in do_hmac_free() local 251 caam_hash_hmac_free(mac->ctx); in do_hmac_free() [all …]
|
| /optee_os/core/include/crypto/ |
| H A D | crypto_impl.h | 138 CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(hmac_md5, mac) 144 CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(hmac_sha1, mac) 150 CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(hmac_sha224, mac) 156 CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(hmac_sha256, mac) 162 CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(hmac_sha384, mac) 168 CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(hmac_sha512, mac) 174 CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(hmac_sha3_224, mac) 180 CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(hmac_sha3_256, mac) 186 CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(hmac_sha3_384, mac) 192 CRYPTO_ALLOC_CTX_NOT_IMPLEMENTED(hmac_sha3_512, mac) [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | poly1305.h | 8 * Bernstein https://cr.yp.to/mac/poly1305-20050329.pdf The generic 118 * Authentication Code (MAC). 122 * \param mac The buffer to where the MAC is written. This must 129 unsigned char mac[16]); 132 * \brief This function calculates the Poly1305 MAC of the input 143 * \param mac The buffer to where the MAC is written. This must be 152 unsigned char mac[16]);
|
| /optee_os/core/drivers/crypto/caam/cipher/ |
| H A D | caam_cipher_mac.c | 24 * Constant definitions of AES MAC algorithms 55 * Constant definitions of DES MAC algorithm 72 * Constant definitions of DES3 MAC algorithm 91 * Format the MAC context to keep the reference to the operation driver 94 struct crypto_mac_ctx mac_ctx; /* Crypto MAC API context */ 136 * MAC update of the cipher operation of complete block except 584 struct crypto_mac *mac = to_mac_ctx(ctx); in do_cmac_init() local 585 struct cipherdata *macdata = mac->ctx; in do_cmac_init() 632 struct crypto_mac *mac = to_mac_ctx(ctx); in do_cmac_update() local 633 struct cipherdata *macdata = mac->ctx; in do_cmac_update() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/mac/poly1305/ |
| H A D | poly1305_file.c | 18 @param mac [out] The POLY1305 authentication tag 22 …har *fname, const unsigned char *key, unsigned long keylen, unsigned char *mac, unsigned long *mac… in poly1305_file() argument 28 LTC_UNUSED_PARAM(mac); in poly1305_file() 40 LTC_ARGCHK(mac != NULL); in poly1305_file() 70 err = poly1305_done(&st, mac, maclen); in poly1305_file()
|
| H A D | poly1305_memory.c | 19 @param mac [out] Destination of the authentication tag 23 … long keylen, const unsigned char *in, unsigned long inlen, unsigned char *mac, unsigned long *mac… in poly1305_memory() argument 30 LTC_ARGCHK(mac != NULL); in poly1305_memory() 35 err = poly1305_done(&st, mac, maclen); in poly1305_memory()
|
| H A D | poly1305_memory_multi.c | 18 @param mac [out] Destination of the authentication tag 25 int poly1305_memory_multi(const unsigned char *key, unsigned long keylen, unsigned char *mac, unsig… in poly1305_memory_multi() argument 35 LTC_ARGCHK(mac != NULL); in poly1305_memory_multi() 48 err = poly1305_done(&st, mac, maclen); in poly1305_memory_multi()
|
| /optee_os/core/lib/libtomcrypt/src/mac/pelican/ |
| H A D | pelican_memory.c | 7 Pelican MAC, MAC a block of memory, by Tom St Denis 14 @param key The key for the MAC 16 @param in The input to MAC
|
| /optee_os/lib/libmbedtls/mbedtls/include/psa/ |
| H A D | crypto_se_driver.h | 153 * If a previously started secure element MAC operation needs to be terminated, 159 /** \brief A function that starts a secure element MAC operation for a PSA 164 * hardware-specific MAC context 167 * \param[in] algorithm The algorithm to be used to underly the MAC 178 /** \brief A function that continues a previously started secure element MAC 182 * previously-established MAC operation to be 185 * to the MAC operation 192 /** \brief a function that completes a previously started secure element MAC 193 * operation by returning the resulting MAC. 196 * previously started MAC operation to be [all …]
|
| /optee_os/core/drivers/crypto/se050/adaptors/utils/ |
| H A D | scp_config.c | 52 .mac = { 0x52, 0xb2, 0x53, 0xca, 0xdf, 0x47, 0x2b, 0xdb, 60 .mac = { 0x12, 0x03, 0xff, 0x61, 0xdf, 0xbc, 0x9c, 0x86, 68 .mac = { 0x08, 0x15, 0x55, 0x96, 0x43, 0xfb, 0x79, 0xeb, 76 .mac = { 0x10, 0x5c, 0xea, 0x22, 0x19, 0xf5, 0x2b, 0xd1, 84 .mac = { 0xdb, 0x0a, 0xa3, 0x19, 0xa4, 0x08, 0x69, 0x6c, 92 .mac = { 0x9a, 0x76, 0x1b, 0x8d, 0xba, 0x6b, 0xed, 0xf2, 100 .mac = { 0xaf, 0x17, 0x7d, 0x5d, 0xbd, 0xf7, 0xc0, 0xd5, 108 .mac = { 0x64, 0x6b, 0xc2, 0xb8, 0xc3, 0xa4, 0xd9, 0xc1, 116 .mac = { 0xa8, 0x64, 0x4e, 0x2a, 0x04, 0xd9, 0xe9, 0xc8, 124 .mac = { 0xcb, 0x20, 0xf8, 0x09, 0xc7, 0xa0, 0x39, 0x32, [all …]
|
| /optee_os/core/lib/libtomcrypt/src/mac/f9/ |
| H A D | f9_memory.c | 7 f9 Support, Process a block through F9-MAC 12 /** f9-MAC a block of memory 16 @param in [in] Message to MAC 18 @param out [out] Destination for the MAC tag
|
| /optee_os/core/lib/libtomcrypt/src/mac/xcbc/ |
| H A D | xcbc_memory.c | 7 XCBC Support, XCBC-MAC a block of memory 12 /** XCBC-MAC a block of memory 16 @param in [in] Message to MAC 18 @param out [out] Destination for the MAC tag
|
| /optee_os/core/drivers/crypto/crypto_api/mac/ |
| H A D | mac.c | 5 * Crypto MAC interface implementation to enable HW driver. 19 CRYPTO_TRACE("mac alloc_ctx algo 0x%" PRIX32, algo); in drvcrypt_mac_alloc_ctx() 31 CRYPTO_TRACE("mac alloc_ctx ret 0x%" PRIX32, ret); in drvcrypt_mac_alloc_ctx()
|