Home
last modified time | relevance | path

Searched refs:hash_id (Results 1 – 13 of 13) sorted by relevance

/optee_os/core/tee/
H A Dtee_cryp_hkdf.c16 static TEE_Result hkdf_extract(uint32_t hash_id, const uint8_t *ikm, in hkdf_extract() argument
22 uint32_t hash_algo = TEE_ALG_HASH_ALGO(hash_id); in hkdf_extract()
23 uint32_t hmac_algo = (TEE_OPERATION_MAC << 28) | hash_id; in hkdf_extract()
65 static TEE_Result hkdf_expand(uint32_t hash_id, const uint8_t *prk, in hkdf_expand() argument
73 uint32_t hash_algo = TEE_ALG_HASH_ALGO(hash_id); in hkdf_expand()
74 uint32_t hmac_algo = TEE_ALG_HMAC_ALGO(hash_id); in hkdf_expand()
144 TEE_Result tee_cryp_hkdf(uint32_t hash_id, const uint8_t *ikm, size_t ikm_len, in tee_cryp_hkdf() argument
153 res = hkdf_extract(hash_id, ikm, ikm_len, salt, salt_len, prk, in tee_cryp_hkdf()
157 res = hkdf_expand(hash_id, prk, prk_len, info, info_len, okm, in tee_cryp_hkdf()
H A Dtee_cryp_concat_kdf.c13 TEE_Result tee_cryp_concat_kdf(uint32_t hash_id, const uint8_t *shared_secret, in tee_cryp_concat_kdf() argument
25 uint32_t hash_algo = TEE_ALG_HASH_ALGO(hash_id); in tee_cryp_concat_kdf()
H A Dtee_cryp_pbkdf2.c71 TEE_Result tee_cryp_pbkdf2(uint32_t hash_id, const uint8_t *password, in tee_cryp_pbkdf2() argument
82 hmac_parms.algo = TEE_ALG_HMAC_ALGO(hash_id); in tee_cryp_pbkdf2()
H A Dtee_svc_cryp.c3342 uint32_t *hash_id) in get_hkdf_params() argument
3353 *hash_id = TEE_ALG_SHA256; in get_hkdf_params()
3355 *hash_id = TEE_ALG_GET_DIGEST_HASH(algo); in get_hkdf_params()
3396 *hash_id = p->content.value.a; in get_hkdf_params()
3854 uint32_t hash_id = 0; in syscall_cryp_derive_key() local
3860 &hash_id); in syscall_cryp_derive_key()
3870 res = tee_cryp_hkdf(hash_id, ikm, ik->key_size, salt, salt_len, in syscall_cryp_derive_key()
3884 uint32_t hash_id = TEE_ALG_GET_DIGEST_HASH(cs->algo); in syscall_cryp_derive_key() local
3899 res = tee_cryp_concat_kdf(hash_id, shared_secret, ss->key_size, in syscall_cryp_derive_key()
3913 uint32_t hash_id = TEE_ALG_GET_DIGEST_HASH(cs->algo); in syscall_cryp_derive_key() local
[all …]
/optee_os/core/lib/libtomcrypt/src/misc/pkcs12/
H A Dpkcs12_kdf.c8 int pkcs12_kdf( int hash_id, in pkcs12_kdf() argument
14 unsigned long u = hash_descriptor[hash_id]->hashsize; in pkcs12_kdf()
15 unsigned long v = hash_descriptor[hash_id]->blocksize; in pkcs12_kdf()
42 … err = hash_memory_multi(hash_id, A, &Alen, D, v, I, Slen + Plen, LTC_NULL); /* A = HASH(D || I) */ in pkcs12_kdf()
45 err = hash_memory(hash_id, A, Alen, A, &Alen); /* A = HASH(A) */ in pkcs12_kdf()
/optee_os/core/drivers/crypto/hisilicon/
H A Dsec_pbkdf2.c188 static TEE_Result sec_pbkdf2_params_check(uint32_t hash_id, size_t password_len, in sec_pbkdf2_params_check() argument
192 uint32_t alg = TEE_ALG_HMAC_ALGO(hash_id); in sec_pbkdf2_params_check()
219 static TEE_Result sec_pbkdf2_set_derive_type(uint32_t hash_id, in sec_pbkdf2_set_derive_type() argument
222 uint32_t alg = TEE_ALG_HMAC_ALGO(hash_id); in sec_pbkdf2_set_derive_type()
287 static TEE_Result sec_pbkdf2_msg_init(uint32_t hash_id, size_t password_len, in sec_pbkdf2_msg_init() argument
296 return sec_pbkdf2_set_derive_type(hash_id, msg); in sec_pbkdf2_msg_init()
299 TEE_Result tee_cryp_pbkdf2(uint32_t hash_id, const uint8_t *password, in tee_cryp_pbkdf2() argument
317 ret = sec_pbkdf2_params_check(hash_id, password_len, salt_len, in tee_cryp_pbkdf2()
328 ret = sec_pbkdf2_msg_init(hash_id, password_len, salt_len, in tee_cryp_pbkdf2()
/optee_os/lib/libmbedtls/mbedtls/library/
H A Drsa.c960 ctx->hash_id = MBEDTLS_MD_NONE; in mbedtls_rsa_init()
974 mbedtls_md_type_t hash_id) in mbedtls_rsa_set_padding() argument
992 (hash_id != MBEDTLS_MD_NONE)) { in mbedtls_rsa_set_padding()
994 if (mbedtls_md_info_from_type(hash_id) == NULL) { in mbedtls_rsa_set_padding()
1001 ctx->hash_id = hash_id; in mbedtls_rsa_set_padding()
1019 return ctx->hash_id; in mbedtls_rsa_get_md_alg()
1780 hlen = mbedtls_md_get_size_from_type((mbedtls_md_type_t) ctx->hash_id); in mbedtls_rsa_rsaes_oaep_encrypt()
1804 ret = compute_hash((mbedtls_md_type_t) ctx->hash_id, label, label_len, p); in mbedtls_rsa_rsaes_oaep_encrypt()
1817 (mbedtls_md_type_t) ctx->hash_id)) != 0) { in mbedtls_rsa_rsaes_oaep_encrypt()
1823 (mbedtls_md_type_t) ctx->hash_id)) != 0) { in mbedtls_rsa_rsaes_oaep_encrypt()
[all …]
/optee_os/core/include/tee/
H A Dtee_cryp_concat_kdf.h11 TEE_Result tee_cryp_concat_kdf(uint32_t hash_id, const uint8_t *shared_secret,
H A Dtee_cryp_pbkdf2.h11 TEE_Result tee_cryp_pbkdf2(uint32_t hash_id, const uint8_t *password,
H A Dtee_cryp_hkdf.h11 TEE_Result tee_cryp_hkdf(uint32_t hash_id, const uint8_t *ikm, size_t ikm_len,
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
H A Drsa.h114 int MBEDTLS_PRIVATE(hash_id); /*!< Hash identifier of mbedtls_md_type_t type,
176 mbedtls_md_type_t hash_id);
/optee_os/core/drivers/crypto/caam/hash/
H A Dcaam_hash.c356 uint8_t hash_id = TEE_ALG_GET_MAIN_ALG(algo); in caam_hash_get_alg() local
357 unsigned int idx = hash_id - TEE_MAIN_ALGO_MD5; in caam_hash_get_alg()
359 if (hash_id > caam_hash_limit || idx > ARRAY_SIZE(hash_alg)) in caam_hash_get_alg()
/optee_os/core/lib/libtomcrypt/src/headers/
H A Dtomcrypt_private.h488 int pkcs12_kdf( int hash_id,