Home
last modified time | relevance | path

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

12

/external/openssl/crypto/pkcs12/
Dp12_mutl.c73 int saltlen, iter; in PKCS12_gen_mac() local
83 saltlen = p12->mac->salt->length; in PKCS12_gen_mac()
94 if(!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_MAC_ID, iter, in PKCS12_gen_mac()
129 unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type) in PKCS12_set_mac() argument
135 if (PKCS12_setup_mac (p12, iter, salt, saltlen, md_type) == in PKCS12_set_mac()
152 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, in PKCS12_setup_mac() argument
166 if (!saltlen) saltlen = PKCS12_SALT_LEN; in PKCS12_setup_mac()
167 p12->mac->salt->length = saltlen; in PKCS12_setup_mac()
168 if (!(p12->mac->salt->data = OPENSSL_malloc (saltlen))) { in PKCS12_setup_mac()
173 if (RAND_pseudo_bytes (p12->mac->salt->data, saltlen) < 0) in PKCS12_setup_mac()
[all …]
Dp12_key.c78 int saltlen, int id, int iter, int n, unsigned char *out, in PKCS12_key_gen_asc() argument
92 ret = PKCS12_key_gen_uni(unipass, uniplen, salt, saltlen, in PKCS12_key_gen_asc()
104 int saltlen, int id, int iter, int n, unsigned char *out, in PKCS12_key_gen_uni() argument
131 fprintf(stderr, "Salt (length %d):\n", saltlen); in PKCS12_key_gen_uni()
132 h__dump(salt, saltlen); in PKCS12_key_gen_uni()
141 Slen = v * ((saltlen+v-1)/v); in PKCS12_key_gen_uni()
152 for (i = 0; i < Slen; i++) *p++ = salt[i % saltlen]; in PKCS12_key_gen_uni()
Dp12_crpt.c73 int saltlen, iter, ret; in PKCS12_PBE_keyivgen() local
94 saltlen = pbe->salt->length; in PKCS12_PBE_keyivgen()
95 if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_KEY_ID, in PKCS12_PBE_keyivgen()
101 if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_IV_ID, in PKCS12_PBE_keyivgen()
Dp12_p8e.c65 unsigned char *salt, int saltlen, int iter, in PKCS8_encrypt() argument
76 if(pbe_nid == -1) pbe = PKCS5_pbe2_set(cipher, iter, salt, saltlen); in PKCS8_encrypt()
77 else pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen); in PKCS8_encrypt()
Dpkcs12.h183 unsigned char *salt, int saltlen, int iter,
187 int saltlen, int iter,
192 unsigned char *salt, int saltlen, int iter,
219 int saltlen, int id, int iter, int n,
221 int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int id, …
229 unsigned char *salt, int saltlen, int iter,
232 int saltlen, const EVP_MD *md_type);
Dp12_add.c105 int passlen, unsigned char *salt, int saltlen, int iter, in PKCS12_MAKE_SHKEYBAG() argument
125 PKCS8_encrypt(pbe_nid, pbe_ciph, pass, passlen, salt, saltlen, iter, in PKCS12_MAKE_SHKEYBAG()
169 unsigned char *salt, int saltlen, int iter, in PKCS12_pack_p7encdata() argument
188 pbe = PKCS5_pbe2_set(pbe_ciph, iter, salt, saltlen); in PKCS12_pack_p7encdata()
190 pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen); in PKCS12_pack_p7encdata()
/external/dropbear/libtomcrypt/src/pk/pkcs1/
Dpkcs_1_pss_encode.c34 unsigned long saltlen, prng_state *prng, in pkcs_1_pss_encode() argument
60 if ((saltlen > modulus_len) || (modulus_len < hLen + saltlen + 2)) { in pkcs_1_pss_encode()
87 if (saltlen > 0) { 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()
114 XMEMSET(DB + x, 0, modulus_len - saltlen - hLen - 2); in pkcs_1_pss_encode()
115 x += modulus_len - saltlen - hLen - 2; in pkcs_1_pss_encode()
117 XMEMCPY(DB + x, salt, saltlen); in pkcs_1_pss_encode()
118 x += saltlen; in pkcs_1_pss_encode()
Dpkcs_1_pss_decode.c34 unsigned long saltlen, int hash_idx, in pkcs_1_pss_decode() argument
57 if ((saltlen > modulus_len) || in pkcs_1_pss_decode()
58 (modulus_len < hLen + saltlen + 2) || (siglen != modulus_len)) { in pkcs_1_pss_decode()
120 for (x = 0; x < modulus_len - saltlen - hLen - 2; x++) { in pkcs_1_pss_decode()
144 if ((err = hash_descriptor[hash_idx].process(&md, DB+x, saltlen)) != CRYPT_OK) { in pkcs_1_pss_decode()
/external/openssl/crypto/asn1/
Dp5_pbe.c78 const unsigned char *salt, int saltlen)
97 if (!saltlen)
98 saltlen = PKCS5_SALT_LEN;
99 if (!ASN1_STRING_set(pbe->salt, NULL, saltlen))
106 memcpy(sstr, salt, saltlen);
107 else if (RAND_pseudo_bytes(sstr, saltlen) < 0)
133 const unsigned char *salt, int saltlen) in PKCS5_pbe_set() argument
143 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen)) in PKCS5_pbe_set()
Dp5_pbev2.c90 unsigned char *salt, int saltlen,
151 if (!saltlen) saltlen = PKCS5_SALT_LEN;
152 if (!(osalt->data = OPENSSL_malloc (saltlen))) goto merr;
153 osalt->length = saltlen;
154 if (salt) memcpy (osalt->data, salt, saltlen);
155 else if (RAND_pseudo_bytes (osalt->data, saltlen) < 0) goto merr;
232 unsigned char *salt, int saltlen) in PKCS5_pbe2_set() argument
234 return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1); in PKCS5_pbe2_set()
/external/dropbear/libtomcrypt/testprof/
Dpkcs_1_test.c9 unsigned long x, y, l1, l2, l3, i1, i2, lparamlen, saltlen, modlen; in pkcs_1_test() local
34 saltlen = abs(rand()) % 17; in pkcs_1_test()
63 … DO(pkcs_1_pss_encode(buf[0], l3, saltlen, &yarrow_prng, prng_idx, hash_idx, modlen, buf[1], &l1)); in pkcs_1_test()
64 DO(pkcs_1_pss_decode(buf[0], l3, buf[1], l1, saltlen, hash_idx, modlen, &res1)); in pkcs_1_test()
67 DO(pkcs_1_pss_decode(buf[0], l3, buf[1], l1, saltlen, hash_idx, modlen, &res2)); in pkcs_1_test()
71 pkcs_1_pss_decode(buf[0], l3, buf[1], l1, saltlen, hash_idx, modlen, &res3); in pkcs_1_test()
73 fprintf(stderr, "PSS failed: %d, %d, %d, %lu, %lu\n", res1, res2, res3, l3, saltlen); in pkcs_1_test()
/external/openssl/crypto/evp/
Dp5_crpt2.c80 const unsigned char *salt, int saltlen, int iter, in PKCS5_PBKDF2_HMAC() argument
114 HMAC_Update(&hctx, salt, saltlen); in PKCS5_PBKDF2_HMAC()
134 h__dump (salt, saltlen); in PKCS5_PBKDF2_HMAC()
143 const unsigned char *salt, int saltlen, int iter, in PKCS5_PBKDF2_HMAC_SHA1() argument
146 return PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, EVP_sha1(), in PKCS5_PBKDF2_HMAC_SHA1()
173 int saltlen, iter, plen; in PKCS5_v2_PBE_keyivgen() local
276 saltlen = kdf->salt->value.octet_string->length; in PKCS5_v2_PBE_keyivgen()
278 if(!PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, prfmd, in PKCS5_v2_PBE_keyivgen()
Dp5_crpt.c81 int saltlen, iter; in PKCS5_PBE_keyivgen() local
102 saltlen = pbe->salt->length; in PKCS5_PBE_keyivgen()
110 EVP_DigestUpdate(&ctx, salt, saltlen); in PKCS5_PBE_keyivgen()
Devp.h915 const unsigned char *salt, int saltlen, int iter,
918 const unsigned char *salt, int saltlen, int iter,
/external/grub/stage2/
Dmd5.c212 int saltlen; in md5_password() local
224 saltlen = strstr (salt, "$") - salt; in md5_password()
230 saltlen = end - salt; in md5_password()
232 saltlen = 8; in md5_password()
234 salt[saltlen] = '$'; in md5_password()
239 md5_update (salt, saltlen); in md5_password()
247 md5_update (crypted, 3 + saltlen); /* include the $1$ header */ in md5_password()
268 md5_update (salt, saltlen); in md5_password()
280 p = salt + saltlen + 1; in md5_password()
/external/openssl/include/openssl/
Dpkcs12.h183 unsigned char *salt, int saltlen, int iter,
187 int saltlen, int iter,
192 unsigned char *salt, int saltlen, int iter,
219 int saltlen, int id, int iter, int n,
221 int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int id, …
229 unsigned char *salt, int saltlen, int iter,
232 int saltlen, const EVP_MD *md_type);
Dx509.h1154 const unsigned char *salt, int saltlen);
1157 const unsigned char *salt, int saltlen);
1159 unsigned char *salt, int saltlen);
1161 unsigned char *salt, int saltlen,
Devp.h915 const unsigned char *salt, int saltlen, int iter,
918 const unsigned char *salt, int saltlen, int iter,
/external/openssl/crypto/rsa/
Drsa_pmeth.c83 int saltlen; member
100 rctx->saltlen = -2; in pkey_rsa_init()
190 rctx->md, rctx->saltlen)) in pkey_rsa_sign()
293 rctx->tbuf, rctx->saltlen); in pkey_rsa_verify()
414 rctx->saltlen = p1; in pkey_rsa_ctrl()
493 int saltlen; in pkey_rsa_ctrl_str() local
494 saltlen = atoi(value); in pkey_rsa_ctrl_str()
495 return EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, saltlen); in pkey_rsa_ctrl_str()
/external/openssl/crypto/pem/
Dpvkfmt.c708 const unsigned char *salt, unsigned int saltlen, in derive_pvk_key() argument
714 EVP_DigestUpdate(&mctx, salt, saltlen); in derive_pvk_key()
723 unsigned int saltlen, unsigned int keylen, in do_PVK_body() argument
730 if (saltlen) in do_PVK_body()
751 if (!derive_pvk_key(keybuf, p, saltlen, in do_PVK_body()
754 p += saltlen; in do_PVK_body()
791 if (enctmp && saltlen) in do_PVK_body()
803 unsigned int saltlen, keylen; in b2i_PVK_bio() local
811 if (!do_PVK_header(&p, 24, 0, &saltlen, &keylen)) in b2i_PVK_bio()
813 buflen = (int) keylen + saltlen; in b2i_PVK_bio()
[all …]
/external/dropbear/libtomcrypt/src/headers/
Dtomcrypt_pkcs.h58 unsigned long saltlen, prng_state *prng,
65 unsigned long saltlen, int hash_idx,
Dtomcrypt_pk.h76 int hash_idx, unsigned long saltlen,
82 int hash_idx, unsigned long saltlen,
/external/dropbear/libtomcrypt/src/pk/rsa/
Drsa_sign_hash.c38 int hash_idx, unsigned long saltlen, in rsa_sign_hash_ex() argument
77 if ((err = pkcs_1_pss_encode(in, inlen, saltlen, prng, prng_idx, in rsa_sign_hash_ex()
Drsa_verify_hash.c36 int hash_idx, unsigned long saltlen, in rsa_verify_hash_ex() argument
95 err = pkcs_1_pss_decode(hash, hashlen, tmpbuf, x, saltlen, hash_idx, modulus_bitlen, stat); in rsa_verify_hash_ex()
/external/openssl/crypto/x509/
Dx509.h1154 const unsigned char *salt, int saltlen);
1157 const unsigned char *salt, int saltlen);
1159 unsigned char *salt, int saltlen);
1161 unsigned char *salt, int saltlen,

12