Home
last modified time | relevance | path

Searched refs:saltlen (Results 1 – 25 of 37) sorted by relevance

12

/third_party/openssl/crypto/asn1/
Dp5_pbe.c28 const unsigned char *salt, int saltlen)
45 if (!saltlen)
46 saltlen = PKCS5_SALT_LEN;
48 sstr = OPENSSL_malloc(saltlen);
54 memcpy(sstr, salt, saltlen);
55 else if (RAND_bytes(sstr, saltlen) <= 0)
58 ASN1_STRING_set0(pbe->salt, sstr, saltlen);
82 const unsigned char *salt, int saltlen) in PKCS5_pbe_set() argument
91 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen)) in PKCS5_pbe_set()
Dp5_pbev2.c41 unsigned char *salt, int saltlen,
108 pbe2->keyfunc = PKCS5_pbkdf2_set(iter, salt, saltlen, prf_nid, keylen);
144 unsigned char *salt, int saltlen) in PKCS5_pbe2_set() argument
146 return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1); in PKCS5_pbe2_set()
149 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, in PKCS5_pbkdf2_set() argument
164 if (saltlen == 0) in PKCS5_pbkdf2_set()
165 saltlen = PKCS5_SALT_LEN; in PKCS5_pbkdf2_set()
166 if ((osalt->data = OPENSSL_malloc(saltlen)) == NULL) in PKCS5_pbkdf2_set()
169 osalt->length = saltlen; in PKCS5_pbkdf2_set()
172 memcpy(osalt->data, salt, saltlen); in PKCS5_pbkdf2_set()
[all …]
Dp5_scrypt.c31 static X509_ALGOR *pkcs5_scrypt_set(const unsigned char *salt, size_t saltlen,
40 const unsigned char *salt, int saltlen, in PKCS5_pbe2_set_scrypt() argument
113 pbe2->keyfunc = pkcs5_scrypt_set(salt, saltlen, keylen, N, r, p); in PKCS5_pbe2_set_scrypt()
148 static X509_ALGOR *pkcs5_scrypt_set(const unsigned char *salt, size_t saltlen, in pkcs5_scrypt_set() argument
158 if (!saltlen) in pkcs5_scrypt_set()
159 saltlen = PKCS5_SALT_LEN; in pkcs5_scrypt_set()
162 if (ASN1_STRING_set(sparam->salt, salt, saltlen) == 0) in pkcs5_scrypt_set()
165 if (salt == NULL && RAND_bytes(sparam->salt->data, saltlen) <= 0) in pkcs5_scrypt_set()
218 size_t saltlen; in PKCS5_v2_scrypt_keyivgen() local
263 saltlen = sparam->salt->length; in PKCS5_v2_scrypt_keyivgen()
[all …]
/third_party/openssl/crypto/pkcs12/
Dp12_mutl.c50 const unsigned char *salt, int saltlen, in pkcs12_gen_gost_mac_key() argument
60 if (!PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, in pkcs12_gen_gost_mac_key()
82 int saltlen, iter; in pkcs12_gen_mac() local
97 saltlen = p12->mac->salt->length; in pkcs12_gen_mac()
117 if (!pkcs12_gen_gost_mac_key(pass, passlen, salt, saltlen, iter, in pkcs12_gen_mac()
123 if (!(*pkcs12_key_gen)(pass, passlen, salt, saltlen, PKCS12_MAC_ID, in pkcs12_gen_mac()
176 unsigned char *salt, int saltlen, int iter, in PKCS12_set_mac() argument
185 if (PKCS12_setup_mac(p12, iter, salt, saltlen, md_type) == PKCS12_ERROR) { in PKCS12_set_mac()
206 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, in PKCS12_setup_mac() argument
226 if (!saltlen) in PKCS12_setup_mac()
[all …]
Dp12_key.c31 int saltlen, int id, int iter, int n, in PKCS12_key_gen_asc() argument
45 ret = PKCS12_key_gen_uni(unipass, uniplen, salt, saltlen, in PKCS12_key_gen_asc()
54 int saltlen, int id, int iter, int n, in PKCS12_key_gen_utf8() argument
68 ret = PKCS12_key_gen_uni(unipass, uniplen, salt, saltlen, in PKCS12_key_gen_utf8()
77 int saltlen, int id, int iter, int n, in PKCS12_key_gen_uni() argument
99 fprintf(stderr, "Salt (length %d):\n", saltlen); in PKCS12_key_gen_uni()
100 h__dump(salt, saltlen); in PKCS12_key_gen_uni()
109 Slen = v * ((saltlen + v - 1) / v); in PKCS12_key_gen_uni()
122 *p++ = salt[i % saltlen]; in PKCS12_key_gen_uni()
Dp12_p8e.c17 unsigned char *salt, int saltlen, int iter, in PKCS8_encrypt() argument
24 pbe = PKCS5_pbe2_set(cipher, iter, salt, saltlen); in PKCS8_encrypt()
26 pbe = PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, pbe_nid); in PKCS8_encrypt()
29 pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen); in PKCS8_encrypt()
Dp12_crpt.c25 int saltlen, iter, ret; in PKCS12_PBE_keyivgen() local
52 saltlen = pbe->salt->length; in PKCS12_PBE_keyivgen()
53 if (!(*pkcs12_key_gen)(pass, passlen, salt, saltlen, PKCS12_KEY_ID, in PKCS12_PBE_keyivgen()
59 if (!(*pkcs12_key_gen)(pass, passlen, salt, saltlen, PKCS12_IV_ID, in PKCS12_PBE_keyivgen()
Dp12_add.c85 unsigned char *salt, int saltlen, int iter, in PKCS12_pack_p7encdata() argument
105 pbe = PKCS5_pbe2_set(pbe_ciph, iter, salt, saltlen); in PKCS12_pack_p7encdata()
107 pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen); in PKCS12_pack_p7encdata()
Dp12_sbag.c141 int saltlen, int iter, in PKCS12_SAFEBAG_create_pkcs8_encrypt() argument
152 p8 = PKCS8_encrypt(pbe_nid, pbe_ciph, pass, passlen, salt, saltlen, iter, in PKCS12_SAFEBAG_create_pkcs8_encrypt()
/third_party/node/deps/npm/node_modules/bcrypt-pbkdf/
Dindex.js497 function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { argument
502 countsalt = new Uint8Array(saltlen+4),
508 if (passlen === 0 || saltlen === 0 || keylen === 0 ||
509 keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20))
515 for (i = 0; i < saltlen; i++)
521 countsalt[saltlen+0] = count >>> 24;
522 countsalt[saltlen+1] = count >>> 16;
523 countsalt[saltlen+2] = count >>> 8;
524 countsalt[saltlen+3] = count;
526 crypto_hash_sha512(sha2salt, countsalt, saltlen + 4);
DREADME.md10 ### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)`
23 * `salt`, a Uint8Array of length `saltlen`
24 * `saltlen`, an integer Number
/third_party/openssl/crypto/rsa/
Drsa_pmeth.c40 int saltlen; member
66 rctx->saltlen = RSA_PSS_SALTLEN_AUTO; in pkey_rsa_init()
174 rctx->saltlen)) in pkey_rsa_sign()
270 rctx->tbuf, rctx->saltlen); in pkey_rsa_verify()
442 *(int *)p2 = rctx->saltlen; in pkey_rsa_ctrl()
459 rctx->saltlen = p1; in pkey_rsa_ctrl()
621 int saltlen; in pkey_rsa_ctrl_str() local
624 saltlen = RSA_PSS_SALTLEN_DIGEST; in pkey_rsa_ctrl_str()
626 saltlen = RSA_PSS_SALTLEN_MAX; in pkey_rsa_ctrl_str()
628 saltlen = RSA_PSS_SALTLEN_AUTO; in pkey_rsa_ctrl_str()
[all …]
Drsa_ameth.c598 int saltlen; in rsa_ctx_to_pss() local
604 if (!EVP_PKEY_CTX_get_rsa_pss_saltlen(pkctx, &saltlen)) in rsa_ctx_to_pss()
606 if (saltlen == -1) { in rsa_ctx_to_pss()
607 saltlen = EVP_MD_size(sigmd); in rsa_ctx_to_pss()
608 } else if (saltlen == -2 || saltlen == -3) { in rsa_ctx_to_pss()
609 saltlen = EVP_PKEY_size(pk) - EVP_MD_size(sigmd) - 2; in rsa_ctx_to_pss()
611 saltlen--; in rsa_ctx_to_pss()
612 if (saltlen < 0) in rsa_ctx_to_pss()
616 return rsa_pss_params_create(sigmd, mgf1md, saltlen); in rsa_ctx_to_pss()
620 const EVP_MD *mgf1md, int saltlen) in rsa_pss_params_create() argument
[all …]
/third_party/openssl/crypto/evp/
Dp5_crpt2.c32 const unsigned char *salt, int saltlen, int iter, in PKCS5_PBKDF2_HMAC() argument
83 if (!HMAC_Update(hctx, salt, saltlen) in PKCS5_PBKDF2_HMAC()
116 h__dump(salt, saltlen); in PKCS5_PBKDF2_HMAC()
125 const unsigned char *salt, int saltlen, int iter, in PKCS5_PBKDF2_HMAC_SHA1() argument
128 return PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, EVP_sha1(), in PKCS5_PBKDF2_HMAC_SHA1()
191 int saltlen, iter; in PKCS5_v2_PBKDF2_keyivgen() local
246 saltlen = kdf->salt->value.octet_string->length; in PKCS5_v2_PBKDF2_keyivgen()
248 if (!PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, prfmd, in PKCS5_v2_PBKDF2_keyivgen()
Dp5_crpt.c33 int saltlen, iter; in PKCS5_PBE_keyivgen() local
69 saltlen = pbe->salt->length; in PKCS5_PBE_keyivgen()
86 if (!EVP_DigestUpdate(ctx, salt, saltlen)) in PKCS5_PBE_keyivgen()
Dpbe_scrypt.c159 const unsigned char *salt, size_t saltlen, in EVP_PBE_scrypt() argument
248 if (PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, 1, EVP_sha256(), in EVP_PBE_scrypt()
/third_party/openssl/include/openssl/
Dpkcs12.h106 int saltlen, int iter,
117 int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8);
123 unsigned char *salt, int saltlen, int iter,
161 int saltlen, int id, int iter, int n,
164 int saltlen, int id, int iter, int n,
167 int saltlen, int id, int iter, int n,
176 unsigned char *salt, int saltlen, int iter,
179 int saltlen, const EVP_MD *md_type);
Dkdf.h53 # define EVP_PKEY_CTX_set1_hkdf_salt(pctx, salt, saltlen) \ argument
55 EVP_PKEY_CTRL_HKDF_SALT, saltlen, (void *)(salt))
73 # define EVP_PKEY_CTX_set1_scrypt_salt(pctx, salt, saltlen) \ argument
75 EVP_PKEY_CTRL_SCRYPT_SALT, saltlen, (void *)(salt))
/third_party/mbedtls/library/
Dpkcs12.c214 const unsigned char *salt, size_t saltlen, in mbedtls_pkcs12_derivation() argument
234 if( datalen > 128 || pwdlen > 64 || saltlen > 64 ) in mbedtls_pkcs12_derivation()
240 if( salt == NULL && saltlen != 0 ) in mbedtls_pkcs12_derivation()
244 use_salt = ( salt && saltlen != 0 ); in mbedtls_pkcs12_derivation()
265 pkcs12_fill_buffer( salt_block, v, salt, saltlen ); in mbedtls_pkcs12_derivation()
/third_party/openssl/doc/man3/
DPKCS5_PBKDF2_HMAC.pod12 const unsigned char *salt, int saltlen, int iter,
17 const unsigned char *salt, int saltlen, int iter,
29 B<salt> is the salt used in the derivation of length B<saltlen>. If the
30 B<salt> is NULL, then B<saltlen> must be 0. The function will not
DEVP_PKEY_CTX_set_scrypt_N.pod17 int saltlen);
34 EVP_PKEY_CTX_set1_scrypt_salt() sets the B<saltlen> bytes long salt
DEVP_PKEY_CTX_set_rsa_pss_keygen_md.pod19 int saltlen);
64 to B<saltlen>.
/third_party/openssl/crypto/pem/
Dpvkfmt.c658 const unsigned char *salt, unsigned int saltlen, in derive_pvk_key() argument
665 || !EVP_DigestUpdate(mctx, salt, saltlen) in derive_pvk_key()
675 unsigned int saltlen, unsigned int keylen, in do_PVK_body() argument
685 if (saltlen) { in do_PVK_body()
701 if (!derive_pvk_key(keybuf, p, saltlen, in do_PVK_body()
704 p += saltlen; in do_PVK_body()
755 unsigned int saltlen, keylen; in b2i_PVK_bio() local
762 if (!do_PVK_header(&p, 24, 0, &saltlen, &keylen)) in b2i_PVK_bio()
764 buflen = (int)keylen + saltlen; in b2i_PVK_bio()
775 ret = do_PVK_body(&p, saltlen, keylen, cb, u); in b2i_PVK_bio()
/third_party/openssl/apps/
Dpasswd.c785 size_t saltlen = 0; in do_passwd() local
790 saltlen = 2; in do_passwd()
794 saltlen = 8; in do_passwd()
797 saltlen = 16; in do_passwd()
799 assert(saltlen != 0); in do_passwd()
802 *salt_p = *salt_malloc_p = app_malloc(saltlen + 1, "salt buffer"); in do_passwd()
803 if (RAND_bytes((unsigned char *)*salt_p, saltlen) <= 0) in do_passwd()
806 for (i = 0; i < saltlen; i++) in do_passwd()
811 ascii2ebcdic(*salt_p, *salt_p, saltlen); in do_passwd()
/third_party/mbedtls/include/mbedtls/
Dpkcs12.h110 const unsigned char *salt, size_t saltlen,

12