| /optee_os/core/pta/tests/ |
| H A D | fs_htree.c | 180 static uint32_t val_from_bn_n_salt(size_t bn, size_t n, uint8_t salt) in val_from_bn_n_salt() argument 184 return SHIFT_U32(n, 16) | SHIFT_U32(bn, 8) | salt; in val_from_bn_n_salt() 187 static TEE_Result write_block(struct tee_fs_htree **ht, size_t bn, uint8_t salt) in write_block() argument 193 b[n] = val_from_bn_n_salt(bn, n, salt); in write_block() 198 static TEE_Result read_block(struct tee_fs_htree **ht, size_t bn, uint8_t salt) in read_block() argument 209 if (b[n] != val_from_bn_n_salt(bn, n, salt)) { in read_block() 212 n, b[n], val_from_bn_n_salt(bn, n, salt)); in read_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() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/pkcs1/ |
| H A D | pkcs_1_pss_encode.c | 31 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_encode() local 60 salt = XMALLOC(modulus_len); in pkcs_1_pss_encode() 62 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_encode() 69 if (salt != NULL) { in pkcs_1_pss_encode() 70 XFREE(salt); in pkcs_1_pss_encode() 81 if (prng_descriptor[prng_idx]->read(salt, saltlen, prng) != saltlen) { in pkcs_1_pss_encode() 98 if ((err = hash_descriptor[hash_idx]->process(&md, salt, saltlen)) != CRYPT_OK) { in pkcs_1_pss_encode() 110 XMEMCPY(DB + x, salt, saltlen); in pkcs_1_pss_encode() 152 zeromem(salt, modulus_len); in pkcs_1_pss_encode() 157 XFREE(salt); in pkcs_1_pss_encode()
|
| H A D | pkcs_1_pss_decode.c | 30 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_decode() local 59 salt = XMALLOC(modulus_len); in pkcs_1_pss_decode() 61 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_decode() 68 if (salt != NULL) { in pkcs_1_pss_decode() 69 XFREE(salt); in pkcs_1_pss_decode() 155 zeromem(salt, modulus_len); in pkcs_1_pss_decode() 160 XFREE(salt); in pkcs_1_pss_decode()
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | pkcs12.c | 37 mbedtls_asn1_buf *salt, int *iterations) in pkcs12_parse_pbe_params() argument 55 if ((ret = mbedtls_asn1_get_tag(p, end, &salt->len, MBEDTLS_ASN1_OCTET_STRING)) != 0) { in pkcs12_parse_pbe_params() 59 salt->p = *p; in pkcs12_parse_pbe_params() 60 *p += salt->len; in pkcs12_parse_pbe_params() 82 mbedtls_asn1_buf salt; in pkcs12_pbe_derive_key_iv() local 90 memset(&salt, 0, sizeof(mbedtls_asn1_buf)); in pkcs12_pbe_derive_key_iv() 93 if ((ret = pkcs12_parse_pbe_params(pbe_params, &salt, in pkcs12_pbe_derive_key_iv() 103 salt.p, salt.len, md_type, in pkcs12_pbe_derive_key_iv() 113 salt.p, salt.len, md_type, in pkcs12_pbe_derive_key_iv() 328 const unsigned char *salt, size_t saltlen, in mbedtls_pkcs12_derivation() argument [all …]
|
| H A D | pkcs5.c | 41 mbedtls_asn1_buf *salt, int *iterations, in pkcs5_parse_pbkdf2_params() argument 62 if ((ret = mbedtls_asn1_get_tag(&p, end, &salt->len, in pkcs5_parse_pbkdf2_params() 67 salt->p = p; in pkcs5_parse_pbkdf2_params() 68 p += salt->len; in pkcs5_parse_pbkdf2_params() 138 mbedtls_asn1_buf salt; in mbedtls_pkcs5_pbes2_ext() local 172 &salt, &iterations, &keylen, in mbedtls_pkcs5_pbes2_ext() 219 if ((ret = mbedtls_pkcs5_pbkdf2_hmac_ext(md_type, pwd, pwdlen, salt.p, in mbedtls_pkcs5_pbes2_ext() 220 salt.len, iterations, keylen, in mbedtls_pkcs5_pbes2_ext() 270 size_t plen, const unsigned char *salt, size_t slen, in pkcs5_pbkdf2_hmac() argument 298 if ((ret = mbedtls_md_hmac_update(ctx, salt, slen)) != 0) { in pkcs5_pbkdf2_hmac() [all …]
|
| H A D | hkdf.c | 16 int mbedtls_hkdf(const mbedtls_md_info_t *md, const unsigned char *salt, in mbedtls_hkdf() argument 24 ret = mbedtls_hkdf_extract(md, salt, salt_len, ikm, ikm_len, prk); in mbedtls_hkdf() 37 const unsigned char *salt, size_t salt_len, in mbedtls_hkdf_extract() argument 43 if (salt == NULL) { in mbedtls_hkdf_extract() 56 salt = null_salt; in mbedtls_hkdf_extract() 60 return mbedtls_md_hmac(md, salt, salt_len, ikm, ikm_len, prk); in mbedtls_hkdf_extract()
|
| H A D | psa_crypto_rsa.h | 257 const uint8_t *salt, 315 const uint8_t *salt,
|
| /optee_os/core/lib/libtomcrypt/src/misc/pkcs5/ |
| H A D | pkcs_5_1.c | 34 const unsigned char *salt, in s_pkcs_5_alg1_common() argument 49 LTC_ARGCHK(salt != NULL); in s_pkcs_5_alg1_common() 90 if ((err = hash_descriptor[hash_idx]->process(md, salt, 8)) != CRYPT_OK) { in s_pkcs_5_alg1_common() 153 const unsigned char *salt, in pkcs_5_alg1() argument 157 return s_pkcs_5_alg1_common(password, password_len, salt, iteration_count, in pkcs_5_alg1() 177 const unsigned char *salt, in pkcs_5_alg1_openssl() argument 181 return s_pkcs_5_alg1_common(password, password_len, salt, iteration_count, in pkcs_5_alg1_openssl()
|
| H A D | pkcs_5_2.c | 24 const unsigned char *salt, unsigned long salt_len, in pkcs_5_alg2() argument 35 LTC_ARGCHK(salt != NULL); in pkcs_5_alg2() 77 if ((err = hmac_process(hmac, salt, salt_len)) != CRYPT_OK) { in pkcs_5_alg2()
|
| /optee_os/core/lib/libtomcrypt/src/misc/pbes/ |
| H A D | pbes1.c | 8 const unsigned char *salt, unsigned long salt_len, in s_pkcs_5_alg1_wrap() argument 13 return pkcs_5_alg1(password, password_len, salt, iteration_count, hash_idx, out, outlen); in s_pkcs_5_alg1_wrap() 17 const unsigned char *salt, unsigned long salt_len, in s_pkcs_12_wrap() argument 32 …if ((err = pkcs12_kdf(hash_idx, pw, pwlen, salt, salt_len, iteration_count, 1, out, 24)) != CRYPT_… in s_pkcs_12_wrap() 34 …if ((err = pkcs12_kdf(hash_idx, pw, pwlen, salt, salt_len, iteration_count, 2, out+24, 8)) != CRYP… in s_pkcs_12_wrap() 111 res->salt = s->next->child; in pbes1_extract()
|
| H A D | pbes.c | 53 …if ((err = arg->type.kdf(arg->pwd, arg->pwdlen, arg->salt->data, arg->salt->size, arg->iterations,… in pbes_decrypt()
|
| /optee_os/core/lib/libtomcrypt/src/misc/bcrypt/ |
| H A D | bcrypt.c | 16 const unsigned char *salt, unsigned long saltlen, in s_bcrypt_hash() argument 23 if ((err = blowfish_setup_with_data(pass, passlen, salt, saltlen, &key)) != CRYPT_OK) { in s_bcrypt_hash() 27 if ((err = blowfish_expand(salt, saltlen, NULL, 0, &key)) != CRYPT_OK) { in s_bcrypt_hash() 56 const unsigned char *salt, unsigned long saltlen, in s_bcrypt_pbkdf_hash() argument 60 return s_bcrypt_hash(pt, pass, passlen, salt, saltlen, out, outlen); in s_bcrypt_pbkdf_hash() 76 const unsigned char *salt, unsigned long salt_len, in bcrypt_pbkdf_openbsd() argument 87 LTC_ARGCHK(salt != NULL); in bcrypt_pbkdf_openbsd() 140 salt, salt_len, in bcrypt_pbkdf_openbsd()
|
| /optee_os/core/tee/ |
| H A D | tee_cryp_pbkdf2.c | 22 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()
|
| H A D | tee_cryp_hkdf.c | 17 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/modes/f8/ |
| H A D | f8_test_mode.c | 20 static const unsigned char salt[4] = { 0x32, 0xf2, 0x87, 0x0d }; in f8_test_mode() 44 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/misc/hkdf/ |
| H A D | hkdf.c | 13 int hkdf_extract(int hash_idx, const unsigned char *salt, unsigned long saltlen, in hkdf_extract() argument 25 if (salt == NULL || saltlen == 0) { in hkdf_extract() 28 return hmac_memory(hash_idx, salt, saltlen, in, inlen, out, outlen); in hkdf_extract() 102 int hkdf(int hash_idx, const unsigned char *salt, unsigned long saltlen, in hkdf() argument 122 if ((err = hkdf_extract(hash_idx, salt, saltlen, in, inlen, extracted, &hashsize)) != 0) { in hkdf()
|
| H A D | hkdf_test.c | 40 unsigned char salt[80]; in hkdf_test() 258 if((err = hkdf(hash, cases[i].salt, cases[i].salt_l, in hkdf_test()
|
| /optee_os/core/lib/libtomcrypt/src/headers/ |
| H A D | tomcrypt_pkcs.h | 81 const unsigned char *salt, 89 const unsigned char *salt, 95 const unsigned char *salt, unsigned long salt_len,
|
| H A D | tomcrypt_misc.h | 58 const unsigned char *salt, unsigned long salt_len, 69 const unsigned char *salt, unsigned long saltlen, 79 const unsigned char *salt, unsigned long saltlen,
|
| /optee_os/core/drivers/crypto/hisilicon/ |
| H A D | sec_pbkdf2.c | 252 const uint8_t *salt, in sec_pbkdf2_set_buf() argument 261 msg->salt_dma = virt_to_phys(msg->salt); in sec_pbkdf2_set_buf() 276 memcpy(msg->salt, salt, msg->salt_len); in sec_pbkdf2_set_buf() 284 memzero_explicit(msg->salt, msg->salt_len); in sec_pbkdf2_clean_buf() 300 size_t password_len, const uint8_t *salt, in tee_cryp_pbkdf2() argument 312 if (!salt || !derived_key) { in tee_cryp_pbkdf2() 333 ret = sec_pbkdf2_set_buf(password, salt, msg); in tee_cryp_pbkdf2()
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | hkdf.h | 56 int mbedtls_hkdf(const mbedtls_md_info_t *md, const unsigned char *salt, 86 const unsigned char *salt, size_t salt_len,
|
| H A D | pkcs5.h | 151 size_t plen, const unsigned char *salt, size_t slen, 176 const unsigned char *salt,
|
| /optee_os/core/drivers/crypto/crypto_api/acipher/ |
| H A D | rsassa.c | 335 uint8_t *salt = NULL; in emsa_pss_encode() local 368 salt = malloc(ssa_data->salt_len); in emsa_pss_encode() 370 if (!salt) { in emsa_pss_encode() 394 ret = crypto_rng_read(salt, ssa_data->salt_len); in emsa_pss_encode() 400 memcpy(buf, salt, ssa_data->salt_len); in emsa_pss_encode() 431 memcpy(buf, salt, ssa_data->salt_len); in emsa_pss_encode() 501 free(salt); in emsa_pss_encode() 525 uint8_t *salt = NULL; in emsa_pss_verify() local 662 salt = malloc(ssa_data->salt_len); in emsa_pss_verify() 663 if (!salt) { in emsa_pss_verify() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/misc/pkcs12/ |
| H A D | pkcs12_kdf.c | 10 const unsigned char *salt, unsigned long saltlen, in pkcs12_kdf() argument 28 LTC_ARGCHK(salt != NULL); in pkcs12_kdf() 37 for (i = 0; i < Slen; i++) I[i] = salt[i % saltlen]; in pkcs12_kdf()
|
| /optee_os/core/include/tee/ |
| H A D | tee_cryp_pbkdf2.h | 12 size_t password_len, const uint8_t *salt,
|