Home
last modified time | relevance | path

Searched refs:salt (Results 1 – 25 of 44) sorted by relevance

12

/optee_os/core/pta/tests/
A Dfs_htree.c193 b[n] = val_from_bn_n_salt(bn, n, salt); in write_block()
221 size_t bn, uint8_t salt), in do_range() argument
223 size_t num_blocks, size_t salt) in do_range() argument
229 res = fn(ht, n + begin, salt); in do_range()
238 size_t bn, uint8_t salt), in do_range_backwards() argument
240 size_t num_blocks, size_t salt) in do_range_backwards() argument
261 size_t salt = 23; in htree_test_rewrite() local
286 salt++; in htree_test_rewrite()
297 salt++; in htree_test_rewrite()
332 salt + 1); in htree_test_rewrite()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/pkcs1/
A Dpkcs_1_pss_encode.c38 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_encode() local
67 salt = XMALLOC(modulus_len); in pkcs_1_pss_encode()
69 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_encode()
76 if (salt != NULL) { in pkcs_1_pss_encode()
77 XFREE(salt); in pkcs_1_pss_encode()
88 if (prng_descriptor[prng_idx]->read(salt, saltlen, prng) != saltlen) { in pkcs_1_pss_encode()
105 if ((err = hash_descriptor[hash_idx]->process(&md, salt, saltlen)) != CRYPT_OK) { in pkcs_1_pss_encode()
117 XMEMCPY(DB + x, salt, saltlen); in pkcs_1_pss_encode()
159 zeromem(salt, modulus_len); in pkcs_1_pss_encode()
164 XFREE(salt); in pkcs_1_pss_encode()
A Dpkcs_1_pss_decode.c36 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_decode() local
65 salt = XMALLOC(modulus_len); in pkcs_1_pss_decode()
67 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_decode()
74 if (salt != NULL) { in pkcs_1_pss_decode()
75 XFREE(salt); in pkcs_1_pss_decode()
161 zeromem(salt, modulus_len); in pkcs_1_pss_decode()
166 XFREE(salt); in pkcs_1_pss_decode()
/optee_os/lib/libmbedtls/mbedtls/library/
A Dpkcs12.c49 mbedtls_asn1_buf *salt, int *iterations ) in pkcs12_parse_pbe_params() argument
66 if( ( ret = mbedtls_asn1_get_tag( p, end, &salt->len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 ) in pkcs12_parse_pbe_params()
69 salt->p = *p; in pkcs12_parse_pbe_params()
70 *p += salt->len; in pkcs12_parse_pbe_params()
90 mbedtls_asn1_buf salt; in pkcs12_pbe_derive_key_iv() local
97 memset( &salt, 0, sizeof(mbedtls_asn1_buf) ); in pkcs12_pbe_derive_key_iv()
100 if( ( ret = pkcs12_parse_pbe_params( pbe_params, &salt, in pkcs12_pbe_derive_key_iv()
108 salt.p, salt.len, md_type, in pkcs12_pbe_derive_key_iv()
118 salt.p, salt.len, md_type, in pkcs12_pbe_derive_key_iv()
245 const unsigned char *salt, size_t saltlen, in mbedtls_pkcs12_derivation() argument
[all …]
A Dpkcs5.c54 mbedtls_asn1_buf *salt, int *iterations, in pkcs5_parse_pbkdf2_params() argument
74 if( ( ret = mbedtls_asn1_get_tag( &p, end, &salt->len, in pkcs5_parse_pbkdf2_params()
78 salt->p = p; in pkcs5_parse_pbkdf2_params()
79 p += salt->len; in pkcs5_parse_pbkdf2_params()
117 mbedtls_asn1_buf salt; in mbedtls_pkcs5_pbes2() local
150 &salt, &iterations, &keylen, in mbedtls_pkcs5_pbes2()
193 if( ( ret = mbedtls_pkcs5_pbkdf2_hmac( &md_ctx, pwd, pwdlen, salt.p, salt.len, in mbedtls_pkcs5_pbes2()
220 size_t plen, const unsigned char *salt, size_t slen, in mbedtls_pkcs5_pbkdf2_hmac() argument
248 if( ( ret = mbedtls_md_hmac_update( ctx, salt, slen ) ) != 0 ) in mbedtls_pkcs5_pbkdf2_hmac()
A Dhkdf.c28 int mbedtls_hkdf( const mbedtls_md_info_t *md, const unsigned char *salt, in mbedtls_hkdf() argument
36 ret = mbedtls_hkdf_extract( md, salt, salt_len, ikm, ikm_len, prk ); in mbedtls_hkdf()
50 const unsigned char *salt, size_t salt_len, in mbedtls_hkdf_extract() argument
56 if( salt == NULL ) in mbedtls_hkdf_extract()
72 salt = null_salt; in mbedtls_hkdf_extract()
76 return( mbedtls_md_hmac( md, salt, salt_len, ikm, ikm_len, prk ) ); in mbedtls_hkdf_extract()
/optee_os/core/lib/libtomcrypt/src/misc/pkcs5/
A Dpkcs_5_1.c41 const unsigned char *salt, in _pkcs_5_alg1_common() argument
56 LTC_ARGCHK(salt != NULL); in _pkcs_5_alg1_common()
93 if ((err = hash_descriptor[hash_idx]->process(md, salt, 8)) != CRYPT_OK) { in _pkcs_5_alg1_common()
156 const unsigned char *salt, in pkcs_5_alg1() argument
160 return _pkcs_5_alg1_common(password, password_len, salt, iteration_count, in pkcs_5_alg1()
180 const unsigned char *salt, in pkcs_5_alg1_openssl() argument
184 return _pkcs_5_alg1_common(password, password_len, salt, iteration_count, in pkcs_5_alg1_openssl()
A Dpkcs_5_2.c31 const unsigned char *salt, unsigned long salt_len, in pkcs_5_alg2() argument
42 LTC_ARGCHK(salt != NULL); in pkcs_5_alg2()
80 if ((err = hmac_process(hmac, salt, salt_len)) != CRYPT_OK) { in pkcs_5_alg2()
/optee_os/core/lib/libtomcrypt/src/misc/pbes/
A Dpbes1.c15 const unsigned char *salt, unsigned long salt_len, in _pkcs_5_alg1_wrap() argument
20 return pkcs_5_alg1(password, password_len, salt, iteration_count, hash_idx, out, outlen); in _pkcs_5_alg1_wrap()
24 const unsigned char *salt, unsigned long salt_len, in _pkcs_12_wrap() argument
39 …if ((err = pkcs12_kdf(hash_idx, pw, pwlen, salt, salt_len, iteration_count, 1, out, 24)) != CRYPT_… in _pkcs_12_wrap()
41 …if ((err = pkcs12_kdf(hash_idx, pw, pwlen, salt, salt_len, iteration_count, 2, out+24, 8)) != CRYP… in _pkcs_12_wrap()
118 res->salt = s->next->child; in pbes1_extract()
A Dpbes.c60 …if ((err = arg->type.kdf(arg->pwd, arg->pwdlen, arg->salt->data, arg->salt->size, arg->iterations,… in pbes_decrypt()
/optee_os/core/tee/
A Dtee_cryp_pbkdf2.c22 const uint8_t *salt; member
42 if (p->salt && p->salt_len) { in pbkdf2_f()
43 res = crypto_mac_update(h->ctx, p->salt, in pbkdf2_f()
72 size_t password_len, const uint8_t *salt, in tee_cryp_pbkdf2() argument
94 pbkdf2_parms.salt = salt; in tee_cryp_pbkdf2()
A Dtee_cryp_hkdf.c17 size_t ikm_len, const uint8_t *salt, in hkdf_extract() argument
25 if (!salt || !salt_len) { in hkdf_extract()
31 salt = zero_salt; in hkdf_extract()
47 res = crypto_mac_init(ctx, salt, salt_len); in hkdf_extract()
145 const uint8_t *salt, size_t salt_len, in tee_cryp_hkdf() argument
153 res = hkdf_extract(hash_id, ikm, ikm_len, salt, salt_len, prk, in tee_cryp_hkdf()
/optee_os/core/lib/libtomcrypt/src/misc/hkdf/
A Dhkdf.c20 int hkdf_extract(int hash_idx, const unsigned char *salt, unsigned long saltlen, in hkdf_extract() argument
32 if (salt == NULL || saltlen == 0) { in hkdf_extract()
35 return hmac_memory(hash_idx, salt, saltlen, in, inlen, out, outlen); in hkdf_extract()
109 int hkdf(int hash_idx, const unsigned char *salt, unsigned long saltlen, in hkdf() argument
129 if ((err = hkdf_extract(hash_idx, salt, saltlen, in, inlen, extracted, &hashsize)) != 0) { in hkdf()
A Dhkdf_test.c47 unsigned char salt[80]; in hkdf_test()
265 if((err = hkdf(hash, cases[i].salt, cases[i].salt_l, in hkdf_test()
/optee_os/core/lib/libtomcrypt/src/modes/f8/
A Df8_test_mode.c27 static const unsigned char salt[4] = { 0x32, 0xf2, 0x87, 0x0d }; in f8_test_mode()
51 if ((err = f8_start(idx, IV, key, sizeof(key), salt, sizeof(salt), 0, &f8)) != CRYPT_OK) { in f8_test_mode()
/optee_os/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_pkcs.h86 const unsigned char *salt,
94 const unsigned char *salt,
100 const unsigned char *salt, unsigned long salt_len,
A Dtomcrypt_misc.h69 const unsigned char *salt, unsigned long saltlen,
79 const unsigned char *salt, unsigned long saltlen,
/optee_os/core/drivers/crypto/crypto_api/acipher/
A Drsassa.c328 uint8_t *salt = NULL; in emsa_pss_encode() local
361 salt = malloc(ssa_data->salt_len); in emsa_pss_encode()
363 if (!salt) { in emsa_pss_encode()
393 memcpy(buf, salt, ssa_data->salt_len); in emsa_pss_encode()
424 memcpy(buf, salt, ssa_data->salt_len); in emsa_pss_encode()
494 free(salt); in emsa_pss_encode()
518 uint8_t *salt = NULL; in emsa_pss_verify() local
655 salt = malloc(ssa_data->salt_len); in emsa_pss_verify()
656 if (!salt) { in emsa_pss_verify()
661 memcpy(salt, buf, ssa_data->salt_len); in emsa_pss_verify()
[all …]
/optee_os/out/arm/export-ta_arm32/include/mbedtls/
A Dhkdf.h71 int mbedtls_hkdf( const mbedtls_md_info_t *md, const unsigned char *salt,
101 const unsigned char *salt, size_t salt_len,
/optee_os/out/arm/export-ta_arm64/host_include/mbedtls/
A Dhkdf.h71 int mbedtls_hkdf( const mbedtls_md_info_t *md, const unsigned char *salt,
101 const unsigned char *salt, size_t salt_len,
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
A Dhkdf.h71 int mbedtls_hkdf( const mbedtls_md_info_t *md, const unsigned char *salt,
101 const unsigned char *salt, size_t salt_len,
/optee_os/out/arm/export-ta_arm64/include/mbedtls/
A Dhkdf.h71 int mbedtls_hkdf( const mbedtls_md_info_t *md, const unsigned char *salt,
101 const unsigned char *salt, size_t salt_len,
/optee_os/out/arm/export-ta_arm32/host_include/mbedtls/
A Dhkdf.h71 int mbedtls_hkdf( const mbedtls_md_info_t *md, const unsigned char *salt,
101 const unsigned char *salt, size_t salt_len,
/optee_os/core/lib/libtomcrypt/src/misc/pkcs12/
A Dpkcs12_kdf.c17 const unsigned char *salt, unsigned long saltlen, in pkcs12_kdf() argument
35 LTC_ARGCHK(salt != NULL); in pkcs12_kdf()
44 for (i = 0; i < Slen; i++) I[i] = salt[i % saltlen]; in pkcs12_kdf()
/optee_os/ta/pkcs11/src/
A Dpersistent_token.c75 size_t pin_size, uint32_t salt, in do_hash() argument
87 TEE_DigestUpdate(oh, &salt, sizeof(salt)); in do_hash()
99 size_t pin_size, uint32_t *salt, in hash_pin() argument
111 *salt = s; in hash_pin()
116 size_t pin_size, uint32_t salt, in verify_pin() argument
122 rc = do_hash(user, pin, pin_size, salt, tmp_hash); in verify_pin()

Completed in 26 milliseconds

12