Home
last modified time | relevance | path

Searched refs:key_len (Results 1 – 25 of 32) sorted by relevance

12

/optee_os-3.20.0/core/lib/libtomcrypt/
A Ddes2_key.h6 static inline void get_des2_key(const uint8_t **key, size_t *key_len, in get_des2_key() argument
9 if (*key_len == 16) { in get_des2_key()
20 *key_len = 24; in get_des2_key()
A Daes.c13 TEE_Result crypto_aes_expand_enc_key(const void *key, size_t key_len, in crypto_aes_expand_enc_key() argument
18 return crypto_accel_aes_expand_keys(key, key_len, enc_key, NULL, in crypto_aes_expand_enc_key()
26 if (aes_setup(key, key_len, 0, &skey)) in crypto_aes_expand_enc_key()
A Dccm.c64 const uint8_t *key, size_t key_len, in crypto_aes_ccm_init() argument
81 if ((!key) || (key_len > TEE_CCM_KEY_MAX_LENGTH)) in crypto_aes_ccm_init()
97 ltc_res = ccm_init(&ccm->ctx, ltc_cipherindex, key, key_len, in crypto_aes_ccm_init()
A Dgcm.c62 const uint8_t *key, size_t key_len, in crypto_aes_gcm_init() argument
78 ltc_res = gcm_init(&gcm->ctx, ltc_cipherindex, key, key_len); in crypto_aes_gcm_init()
/optee_os-3.20.0/core/arch/arm/crypto/
A Daes_armv8a_ce.c64 static void expand_enc_key(uint32_t *enc_key, size_t key_len) in expand_enc_key() argument
70 unsigned int kwords = key_len / sizeof(uint32_t); in expand_enc_key()
83 if (key_len == 24) { in expand_enc_key()
88 } else if (key_len == 32) { in expand_enc_key()
120 TEE_Result crypto_accel_aes_expand_keys(const void *key, size_t key_len, in crypto_accel_aes_expand_keys() argument
130 if (key_len != 16 && key_len != 24 && key_len != 32) in crypto_accel_aes_expand_keys()
136 num_rounds = 10 + ((key_len / 8) - 2) * 2; in crypto_accel_aes_expand_keys()
143 memcpy(enc_key, key, key_len); in crypto_accel_aes_expand_keys()
147 expand_enc_key(enc_key, key_len); in crypto_accel_aes_expand_keys()
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ec25519/
A Dec25519_import_pkcs8.c31 unsigned long version, key_len; in ec25519_import_pkcs8() local
42 key_len = sizeof(private_key); in ec25519_import_pkcs8()
46 LTC_ASN1_OCTET_STRING, key_len, private_key, in ec25519_import_pkcs8()
68 key_len = sizeof(key->priv); in ec25519_import_pkcs8()
69 …if ((err = der_decode_octet_string(private_key, sizeof(private_key), key->priv, &key_len)) == CRYP… in ec25519_import_pkcs8()
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/x25519/
A Dx25519_import.c22 unsigned long key_len; in x25519_import() local
27 key_len = sizeof(key->pub); in x25519_import()
28 …if ((err = x509_decode_subject_public_key_info(in, inlen, LTC_OID_X25519, key->pub, &key_len, LTC_… in x25519_import()
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ed25519/
A Ded25519_import.c22 unsigned long key_len; in ed25519_import() local
27 key_len = sizeof(key->pub); in ed25519_import()
28 …if ((err = x509_decode_subject_public_key_info(in, inlen, LTC_OID_ED25519, key->pub, &key_len, LTC… in ed25519_import()
/optee_os-3.20.0/core/pta/tests/
A Daes_perf.c60 size_t key_len = 0; in init_ctx() local
65 key_len = key_size_bits / 8; in init_ctx()
66 if (key_len > sizeof(aes_key)) in init_ctx()
72 key2_len = key_len; in init_ctx()
98 res = crypto_cipher_init(*ctx, mode, aes_key, key_len, key2, in init_ctx()
102 res = crypto_authenc_init(*ctx, mode, aes_key, key_len, aes_iv, in init_ctx()
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/
A Dssl_tls13_keys.c200 size_t slen, size_t key_len, size_t iv_len, in mbedtls_ssl_tls1_3_make_traffic_keys() argument
209 keys->client_write_key, key_len ); in mbedtls_ssl_tls1_3_make_traffic_keys()
217 keys->server_write_key, key_len ); in mbedtls_ssl_tls1_3_make_traffic_keys()
237 keys->key_len = key_len; in mbedtls_ssl_tls1_3_make_traffic_keys()
A Dgcm.c765 int key_len = 128 + 64 * j; in mbedtls_gcm_self_test() local
773 key_len, i, "enc" ); in mbedtls_gcm_self_test()
777 key_len ); in mbedtls_gcm_self_test()
783 if( ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && key_len == 192 ) in mbedtls_gcm_self_test()
830 key_len, i, "dec" ); in mbedtls_gcm_self_test()
834 key_len ); in mbedtls_gcm_self_test()
866 key_len, i, "enc" ); in mbedtls_gcm_self_test()
870 key_len ); in mbedtls_gcm_self_test()
927 key_len, i, "dec" ); in mbedtls_gcm_self_test()
931 key_len ); in mbedtls_gcm_self_test()
A Dnist_kw.c503 static const unsigned int key_len[KW_TESTS] = { 16, 24, 32 }; variable
597 mbedtls_printf( " KW-AES-%u ", (unsigned int) key_len[i] * 8 ); in mbedtls_nist_kw_self_test()
600 kw_key[i], key_len[i] * 8, 1 ); in mbedtls_nist_kw_self_test()
622 kw_key[i], key_len[i] * 8, 0 ) ) in mbedtls_nist_kw_self_test()
652 mbedtls_printf( " KWP-AES-%u ", (unsigned int) key_len[i] * 8 ); in mbedtls_nist_kw_self_test()
655 key_len[i] * 8, 1 ); in mbedtls_nist_kw_self_test()
677 kwp_key[i], key_len[i] * 8, 0 ) ) in mbedtls_nist_kw_self_test()
A Dssl_tls13_keys.h149 size_t slen, size_t key_len, size_t iv_len,
/optee_os-3.20.0/lib/libmbedtls/core/
A Daes.c16 TEE_Result crypto_aes_expand_enc_key(const void *key, size_t key_len, in crypto_aes_expand_enc_key() argument
21 return crypto_accel_aes_expand_keys(key, key_len, enc_key, NULL, in crypto_aes_expand_enc_key()
28 if (mbedtls_aes_setkey_enc(&ctx, key, key_len * 8) != 0) in crypto_aes_expand_enc_key()
/optee_os-3.20.0/core/drivers/crypto/versal/include/
A Dipi.h15 uint32_t key_len; member
46 uint32_t key_len; member
/optee_os-3.20.0/core/drivers/crypto/se050/glue/
A Duser.c67 uint8_t *key, size_t key_len, in glue_cipher_one_go() argument
70 if (crypto_cipher_init(cipher, mode, key, key_len, NULL, 0, iv, iv_len)) in glue_cipher_one_go()
/optee_os-3.20.0/core/drivers/crypto/se050/core/
A Decc.c232 static TEE_Result set_binary_data(struct bignum *b, size_t key_len, uint8_t **p, in set_binary_data() argument
242 if (a != key_len) { in set_binary_data()
243 leading_zeros = key_len - a; in set_binary_data()
244 a = key_len; in set_binary_data()
260 size_t key_len) in se050_inject_public_key() argument
291 ret = set_binary_data(key->x, key_len, &key_bin.x, &key_bin.x_len); in se050_inject_public_key()
295 ret = set_binary_data(key->y, key_len, &key_bin.y, &key_bin.y_len); in se050_inject_public_key()
316 size_t key_len) in se050_inject_keypair() argument
357 ret = set_binary_data(key->d, key_len, &key_bin.d, &key_bin.d_len); in se050_inject_keypair()
361 ret = set_binary_data(key->x, key_len, in se050_inject_keypair()
[all …]
/optee_os-3.20.0/core/drivers/crypto/crypto_api/authenc/
A Dauthenc.c77 size_t key_len, const uint8_t *nonce, in authenc_init() argument
84 if ((!key && key_len) || (!nonce && nonce_len)) { in authenc_init()
86 CRYPTO_TRACE("key @%p-%zu bytes", key, key_len); in authenc_init()
96 .key.length = key_len, in authenc_init()
/optee_os-3.20.0/core/drivers/crypto/se050/adaptors/apis/
A Dapdu.c698 uint8_t *key, size_t *key_len) in se050_key_store_get_ecc_key_bin() argument
704 if (!store || !store->session || !k_object || !key || !key_len) in se050_key_store_get_ecc_key_bin()
714 add_ecc_header(key, key_len, &buf, &buflen, k_object->curve_id); in se050_key_store_get_ecc_key_bin()
717 buf, key_len); in se050_key_store_get_ecc_key_bin()
721 *key_len += buflen; in se050_key_store_get_ecc_key_bin()
722 buflen = *key_len; in se050_key_store_get_ecc_key_bin()
723 get_ecc_raw_data(key, *key_len, &buf, &buflen, in se050_key_store_get_ecc_key_bin()
727 *key_len = buflen; in se050_key_store_get_ecc_key_bin()
/optee_os-3.20.0/core/drivers/
A Dversal_huk.c85 uint32_t key_len; member
177 size_t key_len = sizeof(key_data); in aes_gcm_encrypt() local
198 versal_mbox_alloc(key_len, key_data, &p); in aes_gcm_encrypt()
222 init->key_len = VERSAL_AES_KEY_SIZE_256; in aes_gcm_encrypt()
A Dstm32mp15_huk.c85 static TEE_Result aes_gcm_encrypt_uid(uint8_t *key, size_t key_len, in aes_gcm_encrypt_uid() argument
105 ret = crypto_authenc_init(ctx, TEE_MODE_ENCRYPT, key, key_len, nonce, in aes_gcm_encrypt_uid()
/optee_os-3.20.0/core/drivers/crypto/versal/
A Dauthenc.c154 uint32_t key_len; member
206 arg.data[arg.dlen++] = engine.init.key_len; in replay_init()
315 uint32_t key_len = XSECURE_AES_KEY_SIZE_128; in do_init() local
334 key_len = XSECURE_AES_KEY_SIZE_256; in do_init()
348 arg.data[arg.dlen++] = key_len; in do_init()
368 init->key_len = key_len; in do_init()
389 engine.init.key_len = key_len; in do_init()
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/
A Dcmac.h234 int mbedtls_aes_cmac_prf_128( const unsigned char *key, size_t key_len,
/optee_os-3.20.0/core/include/crypto/
A Dcrypto_accel.h11 TEE_Result crypto_accel_aes_expand_keys(const void *key, size_t key_len,
/optee_os-3.20.0/core/crypto/
A Daes-gcm.c126 size_t key_len, const void *nonce, in internal_aes_gcm_init() argument
132 res = crypto_aes_expand_enc_key(key, key_len, ek->data, in internal_aes_gcm_init()
462 const uint8_t *key, size_t key_len, in aes_gcm_init() argument
468 key_len, nonce, nonce_len, tag_len); in aes_gcm_init()

Completed in 37 milliseconds

12