/optee_os/core/arch/arm/crypto/ |
A D | aes_armv8a_ce.c | 64 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/core/lib/libtomcrypt/src/pk/ec25519/ |
A D | ec25519_import_pkcs8.c | 38 unsigned long version, key_len; in ec25519_import_pkcs8() local 49 key_len = sizeof(private_key); in ec25519_import_pkcs8() 53 LTC_ASN1_OCTET_STRING, key_len, private_key, in ec25519_import_pkcs8() 75 key_len = sizeof(key->priv); in ec25519_import_pkcs8() 76 …if ((err = der_decode_octet_string(private_key, sizeof(private_key), key->priv, &key_len)) == CRYP… in ec25519_import_pkcs8()
|
/optee_os/core/lib/libtomcrypt/ |
A D | des2_key.h | 6 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 D | aes.c | 13 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 D | ccm.c | 63 const uint8_t *key, size_t key_len, in crypto_aes_ccm_init() argument 80 if ((!key) || (key_len > TEE_CCM_KEY_MAX_LENGTH)) in crypto_aes_ccm_init() 92 ltc_res = ccm_init(&ccm->ctx, ltc_cipherindex, key, key_len, in crypto_aes_ccm_init()
|
A D | gcm.c | 62 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/core/lib/libtomcrypt/src/pk/ed25519/ |
A D | ed25519_import.c | 29 unsigned long key_len; in ed25519_import() local 34 key_len = sizeof(key->pub); in ed25519_import() 35 …if ((err = x509_decode_subject_public_key_info(in, inlen, PKA_ED25519, key->pub, &key_len, LTC_ASN… in ed25519_import()
|
/optee_os/core/lib/libtomcrypt/src/pk/x25519/ |
A D | x25519_import.c | 29 unsigned long key_len; in x25519_import() local 44 key_len = sizeof(key->pub); in x25519_import() 45 …if ((err = x509_decode_subject_public_key_info(in, inlen, PKA_X25519, key->pub, &key_len, LTC_ASN1… in x25519_import()
|
/optee_os/core/pta/tests/ |
A D | aes_perf.c | 60 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/lib/libmbedtls/mbedtls/library/ |
A D | ssl_tls13_keys.c | 200 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 D | gcm.c | 786 int key_len = 128 + 64 * j; in mbedtls_gcm_self_test() local 794 key_len, i, "enc" ); in mbedtls_gcm_self_test() 798 key_len ); in mbedtls_gcm_self_test() 804 if( ret == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED && key_len == 192 ) in mbedtls_gcm_self_test() 851 key_len, i, "dec" ); in mbedtls_gcm_self_test() 855 key_len ); in mbedtls_gcm_self_test() 887 key_len, i, "enc" ); in mbedtls_gcm_self_test() 891 key_len ); in mbedtls_gcm_self_test() 948 key_len, i, "dec" ); in mbedtls_gcm_self_test() 952 key_len ); in mbedtls_gcm_self_test()
|
A D | nist_kw.c | 542 static const unsigned int key_len[KW_TESTS] = { 16, 24, 32 }; variable 636 mbedtls_printf( " KW-AES-%u ", (unsigned int) key_len[i] * 8 ); in mbedtls_nist_kw_self_test() 639 kw_key[i], key_len[i] * 8, 1 ); in mbedtls_nist_kw_self_test() 661 kw_key[i], key_len[i] * 8, 0 ) ) in mbedtls_nist_kw_self_test() 691 mbedtls_printf( " KWP-AES-%u ", (unsigned int) key_len[i] * 8 ); in mbedtls_nist_kw_self_test() 694 key_len[i] * 8, 1 ); in mbedtls_nist_kw_self_test() 716 kwp_key[i], key_len[i] * 8, 0 ) ) in mbedtls_nist_kw_self_test()
|
A D | pk_wrap.c | 549 int key_len; in ecdsa_verify_wrap() local 569 key_len = mbedtls_pk_write_pubkey( &p, buf, &key ); in ecdsa_verify_wrap() 570 if( key_len <= 0 ) in ecdsa_verify_wrap() 578 buf + sizeof( buf ) - key_len, key_len, in ecdsa_verify_wrap()
|
/optee_os/core/drivers/crypto/se050/core/ |
A D | ecc.c | 190 static TEE_Result set_binary_data(struct bignum *b, size_t key_len, uint8_t **p, in set_binary_data() argument 200 if (a != key_len) { in set_binary_data() 201 leading_zeros = key_len - a; in set_binary_data() 202 a = key_len; in set_binary_data() 218 size_t key_len) in se050_inject_public_key() argument 249 ret = set_binary_data(key->x, key_len, &key_bin.x, &key_bin.x_len); in se050_inject_public_key() 253 ret = set_binary_data(key->y, key_len, &key_bin.y, &key_bin.y_len); in se050_inject_public_key() 274 size_t key_len) in se050_inject_keypair() argument 315 ret = set_binary_data(key->d, key_len, &key_bin.d, &key_bin.d_len); in se050_inject_keypair() 319 ret = set_binary_data(key->x, key_len, in se050_inject_keypair() [all …]
|
/optee_os/lib/libmbedtls/core/ |
A D | aes.c | 16 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/core/drivers/crypto/se050/adaptors/apis/ |
A D | apdu.c | 698 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/core/drivers/crypto/se050/glue/ |
A D | user.c | 67 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/core/drivers/crypto/crypto_api/authenc/ |
A D | authenc.c | 77 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/out/arm/export-ta_arm64/host_include/mbedtls/ |
A D | cmac.h | 216 int mbedtls_aes_cmac_prf_128( const unsigned char *key, size_t key_len,
|
/optee_os/out/arm/export-ta_arm64/include/mbedtls/ |
A D | cmac.h | 216 int mbedtls_aes_cmac_prf_128( const unsigned char *key, size_t key_len,
|
/optee_os/out/arm/export-ta_arm32/host_include/mbedtls/ |
A D | cmac.h | 216 int mbedtls_aes_cmac_prf_128( const unsigned char *key, size_t key_len,
|
/optee_os/out/arm/export-ta_arm32/include/mbedtls/ |
A D | cmac.h | 216 int mbedtls_aes_cmac_prf_128( const unsigned char *key, size_t key_len,
|
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | cmac.h | 216 int mbedtls_aes_cmac_prf_128( const unsigned char *key, size_t key_len,
|
/optee_os/core/include/crypto/ |
A D | crypto_accel.h | 11 TEE_Result crypto_accel_aes_expand_keys(const void *key, size_t key_len,
|
/optee_os/core/crypto/ |
A D | aes-gcm.c | 126 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()
|