Home
last modified time | relevance | path

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

123

/openssl/crypto/asn1/
H A Dp5_pbe.c29 const unsigned char *salt, int saltlen,
48 if (!saltlen)
49 saltlen = PKCS5_DEFAULT_PBE1_SALT_LEN;
50 if (saltlen < 0)
53 sstr = OPENSSL_malloc(saltlen);
57 memcpy(sstr, salt, saltlen);
58 else if (RAND_bytes_ex(ctx, sstr, saltlen, 0) <= 0)
61 ASN1_STRING_set0(pbe->salt, sstr, saltlen);
83 const unsigned char *salt, int saltlen) in PKCS5_pbe_set0_algor() argument
109 const unsigned char *salt, int saltlen) in PKCS5_pbe_set() argument
[all …]
H A Dp5_pbev2.c52 unsigned char *salt, int saltlen,
167 unsigned char *salt, int saltlen, in PKCS5_pbe2_set_iv() argument
175 unsigned char *salt, int saltlen) in PKCS5_pbe2_set() argument
177 return PKCS5_pbe2_set_iv_ex(cipher, iter, salt, saltlen, NULL, -1, in PKCS5_pbe2_set()
202 if (saltlen < 0) { in PKCS5_pbkdf2_set_ex()
206 if (saltlen == 0) in PKCS5_pbkdf2_set_ex()
207 saltlen = PKCS5_DEFAULT_PBE2_SALT_LEN; in PKCS5_pbkdf2_set_ex()
208 if ((osalt->data = OPENSSL_malloc(saltlen)) == NULL) in PKCS5_pbkdf2_set_ex()
212 osalt->length = saltlen; in PKCS5_pbkdf2_set_ex()
215 memcpy(osalt->data, salt, saltlen); in PKCS5_pbkdf2_set_ex()
[all …]
H A Dp5_scrypt.c33 static X509_ALGOR *pkcs5_scrypt_set(const unsigned char *salt, size_t saltlen,
42 const unsigned char *salt, int saltlen, in PKCS5_pbe2_set_scrypt() argument
118 pbe2->keyfunc = pkcs5_scrypt_set(salt, saltlen, keylen, N, r, p); in PKCS5_pbe2_set_scrypt()
156 static X509_ALGOR *pkcs5_scrypt_set(const unsigned char *salt, size_t saltlen, in pkcs5_scrypt_set() argument
168 if (!saltlen) in pkcs5_scrypt_set()
169 saltlen = PKCS5_DEFAULT_PBE2_SALT_LEN; in pkcs5_scrypt_set()
172 if (ASN1_STRING_set(sparam->salt, salt, saltlen) == 0) { in pkcs5_scrypt_set()
177 if (salt == NULL && RAND_bytes(sparam->salt->data, saltlen) <= 0) in pkcs5_scrypt_set()
243 size_t saltlen; in PKCS5_v2_scrypt_keyivgen_ex() local
292 saltlen = sparam->salt->length; in PKCS5_v2_scrypt_keyivgen_ex()
[all …]
/openssl/crypto/pkcs12/
H A Dp12_key.c20 int saltlen, int id, int iter, int n, in PKCS12_key_gen_asc_ex() argument
35 ret = PKCS12_key_gen_uni_ex(unipass, uniplen, salt, saltlen, id, iter, in PKCS12_key_gen_asc_ex()
42 int saltlen, int id, int iter, int n, in PKCS12_key_gen_asc() argument
45 return PKCS12_key_gen_asc_ex(pass, passlen, salt, saltlen, id, iter, n, in PKCS12_key_gen_asc()
50 int saltlen, int id, int iter, int n, in PKCS12_key_gen_utf8_ex() argument
72 int saltlen, int id, int iter, int n, in PKCS12_key_gen_utf8() argument
80 int saltlen, int id, int iter, int n, in PKCS12_key_gen_uni_ex() argument
106 salt, saltlen); in PKCS12_key_gen_uni_ex()
116 BIO_printf(trc_out, "Salt (length %d):\n", saltlen); in PKCS12_key_gen_uni_ex()
117 BIO_hex_string(trc_out, 0, saltlen, salt, saltlen); in PKCS12_key_gen_uni_ex()
[all …]
H A Dp12_mutl.c73 if (!PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, in pkcs12_gen_gost_mac_key()
170 int saltlen, iter; in pkcs12_gen_mac() local
188 saltlen = p12->mac->salt->length; in pkcs12_gen_mac()
345 unsigned char *salt, int saltlen, int iter, in PKCS12_set_mac() argument
406 if (saltlen == 0) in pkcs12_setup_mac()
407 saltlen = PKCS12_SALT_LEN; in pkcs12_setup_mac()
408 else if (saltlen < 0) in pkcs12_setup_mac()
412 p12->mac->salt->length = saltlen; in pkcs12_setup_mac()
415 (size_t)saltlen, 0) <= 0) in pkcs12_setup_mac()
418 memcpy(p12->mac->salt->data, salt, saltlen); in pkcs12_setup_mac()
[all …]
H A Dp12_p8e.c18 unsigned char *salt, int saltlen, int iter, in PKCS8_encrypt_ex() argument
30 pbe = PKCS5_pbe2_set_iv_ex(cipher, iter, salt, saltlen, NULL, -1, in PKCS8_encrypt_ex()
40 pbe = PKCS5_pbe2_set_iv_ex(cipher, iter, salt, saltlen, NULL, in PKCS8_encrypt_ex()
44 pbe = PKCS5_pbe_set_ex(pbe_nid, iter, salt, saltlen, libctx); in PKCS8_encrypt_ex()
62 unsigned char *salt, int saltlen, int iter, in PKCS8_encrypt() argument
65 return PKCS8_encrypt_ex(pbe_nid, cipher, pass, passlen, salt, saltlen, iter, in PKCS8_encrypt()
H A Dp12_crpt.c29 int saltlen, iter, ret; in PKCS12_PBE_keyivgen_ex() local
50 saltlen = pbe->salt->length; in PKCS12_PBE_keyivgen_ex()
51 if (!PKCS12_key_gen_utf8_ex(pass, passlen, salt, saltlen, PKCS12_KEY_ID, in PKCS12_PBE_keyivgen_ex()
60 if (!PKCS12_key_gen_utf8_ex(pass, passlen, salt, saltlen, PKCS12_IV_ID, in PKCS12_PBE_keyivgen_ex()
H A Dp12_add.c95 unsigned char *salt, int saltlen, int iter, in PKCS12_pack_p7encdata_ex() argument
120 pbe = PKCS5_pbe2_set_iv_ex(pbe_ciph, iter, salt, saltlen, NULL, -1, ctx); in PKCS12_pack_p7encdata_ex()
122 pbe = PKCS5_pbe_set_ex(pbe_nid, iter, salt, saltlen, ctx); in PKCS12_pack_p7encdata_ex()
149 unsigned char *salt, int saltlen, int iter, in PKCS12_pack_p7encdata() argument
152 return PKCS12_pack_p7encdata_ex(pbe_nid, pass, passlen, salt, saltlen, in PKCS12_pack_p7encdata()
/openssl/providers/implementations/signature/
H A Drsa_sig.c137 int saltlen; member
257 int saltlen = ctx->saltlen; in rsa_pss_compute_saltlen() local
305 return saltlen; in rsa_pss_compute_saltlen()
315 int saltlen; in rsa_generate_signature_aid() local
642 int approved = (saltlen >= 0 && saltlen <= mdsize); in rsa_pss_saltlen_check_passed()
790 saltlen = prsactx->saltlen; in rsa_sign_directly()
1078 saltlen = prsactx->saltlen; in rsa_verify_directly()
1537 int saltlen; in rsa_set_ctx_params() local
1565 saltlen = prsactx->saltlen; in rsa_set_ctx_params()
1729 if (saltlen >= 0 && saltlen < prsactx->min_saltlen) { in rsa_set_ctx_params()
[all …]
/openssl/crypto/rsa/
H A Drsa_ameth.c455 int saltlen; in rsa_ctx_to_pss() local
469 saltlen = md_size; in rsa_ctx_to_pss()
478 saltlen = RSA_PSS_SALTLEN_MAX; in rsa_ctx_to_pss()
481 if (saltlen == RSA_PSS_SALTLEN_MAX || saltlen == RSA_PSS_SALTLEN_AUTO) { in rsa_ctx_to_pss()
484 saltlen--; in rsa_ctx_to_pss()
485 if (saltlen < 0) in rsa_ctx_to_pss()
488 saltlen = saltlenMax; in rsa_ctx_to_pss()
501 if (saltlen != 20) { in ossl_rsa_pss_params_create()
545 int saltlen; in ossl_rsa_pss_to_ctx() local
726 int mdnid, saltlen, md_size; in rsa_sig_info_set() local
[all …]
H A Drsa_pmeth.c47 int saltlen; member
75 rctx->saltlen = RSA_PSS_SALTLEN_AUTO; in pkey_rsa_init()
102 dctx->saltlen = sctx->saltlen; in pkey_rsa_copy()
492 *(int *)p2 = rctx->saltlen; in pkey_rsa_ctrl()
514 rctx->saltlen = p1; in pkey_rsa_ctrl()
685 int saltlen; in pkey_rsa_ctrl_str() local
690 saltlen = RSA_PSS_SALTLEN_MAX; in pkey_rsa_ctrl_str()
692 saltlen = RSA_PSS_SALTLEN_AUTO; in pkey_rsa_ctrl_str()
694 saltlen = atoi(value); in pkey_rsa_ctrl_str()
737 int saltlen = atoi(value); in pkey_rsa_ctrl_str() local
[all …]
H A Drsa_backend.c314 int saltlen = ossl_rsa_pss_params_30_saltlen(pss); in ossl_rsa_pss_params_30_todata() local
346 || (!ossl_param_build_set_int(bld, params, key_saltlen, saltlen))) in ossl_rsa_pss_params_30_todata()
361 int saltlen; in ossl_rsa_pss_params_30_fromdata() local
442 if (!OSSL_PARAM_get_int(param_saltlen, &saltlen) in ossl_rsa_pss_params_30_fromdata()
443 || !ossl_rsa_pss_params_30_set_saltlen(pss_params, saltlen)) in ossl_rsa_pss_params_30_fromdata()
597 int md_nid, mgf1md_nid, saltlen, trailerField; in ossl_rsa_sync_to_pss_params_30() local
610 &saltlen, &trailerField)) in ossl_rsa_sync_to_pss_params_30()
618 || !ossl_rsa_pss_params_30_set_saltlen(&pss_params, saltlen) in ossl_rsa_sync_to_pss_params_30()
/openssl/crypto/evp/
H A Dp5_crpt2.c23 const unsigned char *salt, int saltlen, int iter, in ossl_pkcs5_pbkdf2_hmac_ex() argument
41 if (salt == NULL && saltlen == 0) in ossl_pkcs5_pbkdf2_hmac_ex()
55 (unsigned char *)salt, saltlen); in ossl_pkcs5_pbkdf2_hmac_ex()
72 0, saltlen, salt, saltlen); in ossl_pkcs5_pbkdf2_hmac_ex()
84 int saltlen, int iter, const EVP_MD *digest, int keylen, in PKCS5_PBKDF2_HMAC() argument
87 return ossl_pkcs5_pbkdf2_hmac_ex(pass, passlen, salt, saltlen, iter, digest, in PKCS5_PBKDF2_HMAC()
93 const unsigned char *salt, int saltlen, int iter, in PKCS5_PBKDF2_HMAC_SHA1() argument
100 r = ossl_pkcs5_pbkdf2_hmac_ex(pass, passlen, salt, saltlen, iter, in PKCS5_PBKDF2_HMAC_SHA1()
186 int saltlen, iter, t; in PKCS5_v2_PBKDF2_keyivgen_ex() local
252 saltlen = kdf->salt->value.octet_string->length; in PKCS5_v2_PBKDF2_keyivgen_ex()
[all …]
H A Dpbe_scrypt.c38 const unsigned char *salt, size_t saltlen, in EVP_PBE_scrypt_ex() argument
61 saltlen = 0; in EVP_PBE_scrypt_ex()
77 (unsigned char *)salt, saltlen); in EVP_PBE_scrypt_ex()
91 const unsigned char *salt, size_t saltlen, in EVP_PBE_scrypt() argument
95 return EVP_PBE_scrypt_ex(pass, passlen, salt, saltlen, N, r, p, maxmem, in EVP_PBE_scrypt()
H A Dp5_crpt.c35 int saltlen, iter; in PKCS5_PBE_keyivgen_ex() local
73 saltlen = pbe->salt->length; in PKCS5_PBE_keyivgen_ex()
92 salt, saltlen); in PKCS5_PBE_keyivgen_ex()
/openssl/doc/man3/
H A DPKCS5_PBE_keyivgen.pod32 const unsigned char *salt, size_t saltlen,
36 const unsigned char *salt, size_t saltlen,
51 const unsigned char *salt, int saltlen);
53 const unsigned char *salt, int saltlen,
57 const unsigned char *salt, int saltlen);
59 const unsigned char *salt, int saltlen,
63 unsigned char *salt, int saltlen);
65 unsigned char *salt, int saltlen,
68 unsigned char *salt, int saltlen,
103 I<salt> is NULL, then I<saltlen> must be 0. The function will not
[all …]
H A DPKCS12_key_gen_utf8_ex.pod14 int saltlen, int id, int iter, int n,
17 int saltlen, int id, int iter, int n,
21 int saltlen, int id, int iter, int n,
24 int saltlen, int id, int iter, int n,
28 int saltlen, int id, int iter, int n,
31 int saltlen, int id, int iter, int n,
39 I<saltlen>, an iteration count I<iter> and a digest algorithm I<md_type>.
83 I<salt> is the salt used in the derivation of length I<saltlen>. If the
84 I<salt> is NULL, then I<saltlen> must be 0. The function will not
H A 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
H A DPKCS12_pack_p7encdata.pod13 unsigned char *salt, int saltlen, int iter,
16 unsigned char *salt, int saltlen, int iter,
27 The password I<pass> of length I<passlen>, salt I<salt> of length I<saltlen>
/openssl/apps/
H A Denc.c138 int saltlen = 0; in enc_main() local
300 if (!opt_int(opt_arg(), &saltlen)) in enc_main()
302 if (saltlen > (int)sizeof(salt)) in enc_main()
303 saltlen = (int)sizeof(salt); in enc_main()
329 if (saltlen == 0 || pbkdf2 == 0) in enc_main()
330 saltlen = PKCS5_SALT_LEN; in enc_main()
516 if (RAND_bytes(salt, saltlen) <= 0) { in enc_main()
529 saltlen) != saltlen)) { in enc_main()
542 saltlen) != saltlen) { in enc_main()
564 int islen = (sptr != NULL ? saltlen : 0); in enc_main()
[all …]
H A Dpkcs8.c96 int saltlen = 0; /* A value of zero chooses the default */ in pkcs8_main() local
199 if (!opt_int(opt_arg(), &saltlen)) in pkcs8_main()
257 pbe = PKCS5_pbe2_set_scrypt(cipher, NULL, saltlen, NULL, in pkcs8_main()
261 pbe = PKCS5_pbe2_set_iv(cipher, iter, NULL, saltlen, NULL, in pkcs8_main()
264 pbe = PKCS5_pbe_set(pbe_nid, iter, NULL, saltlen); in pkcs8_main()
/openssl/include/openssl/
H A Dpkcs12.h.in132 int saltlen, int iter,
158 int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8);
171 unsigned char *salt, int saltlen, int iter,
238 int saltlen, int id, int iter, int n,
241 int saltlen, int id, int iter, int n,
245 int saltlen, int id, int iter, int n,
248 int saltlen, int id, int iter, int n,
252 int saltlen, int id, int iter, int n,
255 int saltlen, int id, int iter, int n,
270 unsigned char *salt, int saltlen, int iter,
[all …]
/openssl/providers/common/der/
H A Dder_rsa_key.c287 int saltlen, default_saltlen; in ossl_DER_w_RSASSA_PSS_params() local
305 saltlen = ossl_rsa_pss_params_30_saltlen(pss); in ossl_DER_w_RSASSA_PSS_params()
308 if (saltlen < 0) { in ossl_DER_w_RSASSA_PSS_params()
351 && (saltlen == default_saltlen || ossl_DER_w_uint32(pkt, 2, (uint32_t)saltlen)) in ossl_DER_w_RSASSA_PSS_params()
/openssl/providers/implementations/kdfs/
H A Dpbkdf2.c63 const unsigned char *salt, int saltlen, uint64_t iter,
181 static int pbkdf2_lower_bound_check_passed(int saltlen, uint64_t iter, in pbkdf2_lower_bound_check_passed() argument
191 if (saltlen < KDF_PBKDF2_MIN_SALT_LEN) { in pbkdf2_lower_bound_check_passed()
378 const unsigned char *salt, int saltlen, uint64_t iter, in pbkdf2_derive() argument
408 int passed = pbkdf2_lower_bound_check_passed(saltlen, iter, keylen, in pbkdf2_derive()
443 if (!HMAC_Update(hctx, salt, saltlen) in pbkdf2_derive()
/openssl/crypto/hpke/
H A Dhpke_util.c249 const unsigned char *salt, size_t saltlen, in kdf_derive() argument
259 (char *)salt, saltlen); in kdf_derive()
275 const unsigned char *salt, size_t saltlen, in ossl_hpke_kdf_extract() argument
279 salt, saltlen, ikm, ikmlen, NULL, 0); in ossl_hpke_kdf_extract()
297 const unsigned char *salt, size_t saltlen, in ossl_hpke_labeled_extract() argument
333 ret = ossl_hpke_kdf_extract(kctx, prk, prklen, salt, saltlen, in ossl_hpke_labeled_extract()

Completed in 52 milliseconds

123