Searched defs:salt (Results 1 - 25 of 68) sorted by relevance

123

/external/openssh/openbsd-compat/
H A Dxcrypt.c61 xcrypt(const char *password, const char *salt) argument
66 if (is_md5_salt(salt))
67 crypted = md5_crypt(password, salt);
69 crypted = crypt(password, salt);
72 crypted = bigcrypt(password, salt);
74 crypted = crypt(password, salt);
76 crypted = bigcrypt(password, salt);
78 crypted = crypt(password, salt);
H A Dport-uw.c56 char *salt; local
66 /* Encrypt the candidate password using the proper salt. */
67 salt = (pw_password[0] && pw_password[1]) ? pw_password : "xx";
75 result = ((strcmp(bigcrypt(password, salt), pw_password) == 0)
76 || (strcmp(osr5bigcrypt(password, salt), pw_password) == 0));
80 result = (strcmp(xcrypt(password, salt), pw_password) == 0);
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/
H A DMacData.java21 byte[] salt; field in class:MacData
44 this.salt = ((ASN1OctetString)seq.getObjectAt(1)).getOctets();
58 byte[] salt,
62 this.salt = salt;
73 return salt;
97 v.add(new DEROctetString(salt));
56 MacData( DigestInfo digInfo, byte[] salt, int iterationCount) argument
H A DPBEParameter.java18 ASN1OctetString salt; field in class:PBEParameter
21 byte[] salt,
24 if (salt.length != 8)
26 throw new IllegalArgumentException("salt length must be 8");
28 this.salt = new DEROctetString(salt);
35 salt = (ASN1OctetString)seq.getObjectAt(0);
61 return salt.getOctets();
68 v.add(salt);
20 PBEParameter( byte[] salt, int iterations) argument
H A DPBKDF2Params.java39 byte[] salt,
42 this.octStr = new DEROctetString(salt);
47 byte[] salt,
51 this(salt, iterationCount);
38 PBKDF2Params( byte[] salt, int iterationCount) argument
46 PBKDF2Params( byte[] salt, int iterationCount, int keyLength) argument
H A DPKCS12PBEParams.java21 byte[] salt,
24 this.iv = new DEROctetString(salt);
20 PKCS12PBEParams( byte[] salt, int iterations) argument
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/
H A DOpenSSLPBEParametersGenerator.java37 * @param salt salt to use.
41 byte[] salt)
43 super.init(password, salt, 1);
47 * the derived key function, the ith hash of the password and the salt.
59 digest.update(salt, 0, salt.length);
83 * Generate a key parameter derived from the password, salt, and iteration
102 * the password, salt, and iteration count we are currently initialised
124 * salt, an
39 init( byte[] password, byte[] salt) argument
[all...]
/external/chromium/chrome/common/
H A Dvisitedlink_common.cc79 const uint8 salt[LINK_SALT_LENGTH]) {
84 MD5Update(&ctx, salt, sizeof(salt));
76 ComputeURLFingerprint( const char* canonical_url, size_t url_len, const uint8 salt[LINK_SALT_LENGTH]) argument
H A Dvisitedlink_common.h15 // number of bytes in the salt
42 // a salt value for the links on one computer so that an attacker can not
90 uint8 salt[LINK_SALT_LENGTH]; member in struct:VisitedLinkCommon::SharedHeader
104 // pass the salt as a parameter. See the non-static version above if you
105 // want to use the current class' salt.
108 const uint8 salt[LINK_SALT_LENGTH]);
128 // salt used for each URL when computing the fingerprint
/external/chromium/crypto/
H A Dsymmetric_key_openssl.cc45 const std::string& salt,
57 reinterpret_cast<const uint8*>(salt.data()),
58 salt.length(), iterations,
43 DeriveKeyFromPassword(Algorithm algorithm, const std::string& password, const std::string& salt, size_t iterations, size_t key_size_in_bits) argument
H A Dsymmetric_key_unittest.cc71 const char* salt; member in struct:PBKDF2TestVector
84 // The OS X crypto libraries have minimum salt and iteration requirements
86 if (strlen(test_data.salt) < 8 || test_data.rounds < 1000) {
95 test_data.password, test_data.salt,
113 "salt",
121 "salt",
129 "salt",
139 "salt",
H A Dsymmetric_key_nss.cc41 const std::string& salt,
45 if (salt.empty() || iterations == 0 || key_size_in_bits == 0)
57 const_cast<char *>(salt.data()));
58 salt_item.len = salt.size();
39 DeriveKeyFromPassword(Algorithm algorithm, const std::string& password, const std::string& salt, size_t iterations, size_t key_size_in_bits) argument
/external/dropbear/libtomcrypt/src/misc/pkcs5/
H A Dpkcs_5_1.c22 @param salt The salt (or nonce) which is 8 octets long
30 const unsigned char *salt,
40 LTC_ARGCHK(salt != NULL);
62 /* hash initial password + salt */
69 if ((err = hash_descriptor[hash_idx].process(md, salt, 8)) != CRYPT_OK) {
29 pkcs_5_alg1(const unsigned char *password, unsigned long password_len, const unsigned char *salt, int iteration_count, int hash_idx, unsigned char *out, unsigned long *outlen) argument
H A Dpkcs_5_2.c23 @param salt The salt (or nonce)
24 @param salt_len The length of the salt (octets)
32 const unsigned char *salt, unsigned long salt_len,
43 LTC_ARGCHK(salt != NULL);
81 if ((err = hmac_process(hmac, salt, salt_len)) != CRYPT_OK) {
31 pkcs_5_alg2(const unsigned char *password, unsigned long password_len, const unsigned char *salt, unsigned long salt_len, int iteration_count, int hash_idx, unsigned char *out, unsigned long *outlen) argument
/external/openssl/crypto/pkcs12/
H A Dp12_mutl.c72 unsigned char key[EVP_MAX_MD_SIZE], *salt; local
82 salt = p12->mac->salt->data;
83 saltlen = p12->mac->salt->length;
94 if(!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_MAC_ID, iter,
133 unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type)
139 if (PKCS12_setup_mac (p12, iter, salt, saltlen, md_type) ==
156 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, argument
171 p12->mac->salt->length = saltlen;
172 if (!(p12->mac->salt
132 PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type) argument
[all...]
H A Dp12_p8e.c65 unsigned char *salt, int saltlen, int iter,
76 if(pbe_nid == -1) pbe = PKCS5_pbe2_set(cipher, iter, salt, saltlen);
77 else pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen);
63 PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8inf) argument
H A Dp12_crpt.c74 unsigned char *salt; local
93 salt = pbe->salt->data;
94 saltlen = pbe->salt->length;
95 if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_KEY_ID,
101 if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_IV_ID,
H A Dp12_add.c105 int passlen, unsigned char *salt, int saltlen, int iter,
125 PKCS8_encrypt(pbe_nid, pbe_ciph, pass, passlen, salt, saltlen, iter,
169 unsigned char *salt, int saltlen, int iter,
188 pbe = PKCS5_pbe2_set(pbe_ciph, iter, salt, saltlen);
190 pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen);
104 PKCS12_MAKE_SHKEYBAG(int pbe_nid, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8) argument
168 PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, STACK_OF(PKCS12_SAFEBAG) *bags) argument
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/
H A DPBEParametersGenerator.java11 protected byte[] salt; field in class:PBEParametersGenerator
25 * @param salt the salt to be mixed with the password.
31 byte[] salt,
35 this.salt = salt;
50 * return the salt byte array.
52 * @return the salt byte array.
56 return salt;
29 init( byte[] password, byte[] salt, int iterationCount) argument
/external/dropbear/libtomcrypt/src/pk/pkcs1/
H A Dpkcs_1_pss_decode.c26 @param saltlen The length of the salt used (octets)
37 unsigned char *DB, *mask, *salt, *hash; local
62 /* allocate ram for DB/mask/salt/hash of size modulus_len */
65 salt = XMALLOC(modulus_len);
67 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) {
74 if (salt != NULL) {
75 XFREE(salt);
117 /* DB = PS || 0x01 || salt, PS == modulus_len - saltlen - hLen - 2 zero bytes */
133 /* M = (eight) 0x00 || msghash || salt, mask = H(M) */
161 zeromem(salt, modulus_le
[all...]
H A Dpkcs_1_pss_encode.c24 @param saltlen The length of the salt desired (octets)
39 unsigned char *DB, *mask, *salt, *hash; local
64 /* allocate ram for DB/mask/salt/hash of size modulus_len */
67 salt = XMALLOC(modulus_len);
69 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) {
76 if (salt != NULL) {
77 XFREE(salt);
86 /* generate random salt */
88 if (prng_descriptor[prng_idx].read(salt, saltlen, prng) != saltlen) {
94 /* M = (eight) 0x00 || msghash || salt, has
[all...]
/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/crypto/
H A DPEMDecoder.java74 private static byte[] generateKeyFromPasswordSaltWithMD5(byte[] password, byte[] salt, int keyLen) argument
77 if (salt.length < 8)
88 md5.update(salt, 0, 8); // ARGH we only use the first 8 bytes of the salt in this step.
230 throw new IOException("Broken PEM, no mode and salt given, but encryption enabled");
236 byte[] salt = hexToByteArray(ps.dekInfo[1]);
243 des3.init(false, generateKeyFromPasswordSaltWithMD5(pw, salt, 24));
244 bc = new CBCMode(des3, salt, false);
249 des.init(false, generateKeyFromPasswordSaltWithMD5(pw, salt, 8));
250 bc = new CBCMode(des, salt, fals
[all...]
/external/openssh/
H A Dmd5crypt.c45 is_md5_salt(const char *salt) argument
47 return (strncmp(salt, magic, strlen(magic)) == 0);
51 md5_crypt(const char *pw, const char *salt) argument
61 sp = salt;
73 /* get the length of the true salt */
76 /* Stash the salt */
88 /* Then the raw salt */
91 /* Then just as many characters of the MD5(pw, salt, pw) */
/external/openssl/crypto/des/
H A Dfcrypt.c27 /* Added more values to handle illegal salt values the way normal
61 char *DES_crypt(const char *buf, const char *salt) argument
66 return(DES_fcrypt(buf,salt,buff));
72 /* Copy at most 2 chars of salt */
73 if ((e_salt[0] = salt[0]) != '\0')
74 e_salt[1] = salt[1];
99 char *DES_fcrypt(const char *buf, const char *salt, char *ret) argument
119 x=ret[0]=((salt[0] == '\0')?'A':salt[0]);
121 x=ret[1]=((salt[
[all...]
/external/openssl/crypto/evp/
H A Dp5_crpt.c82 unsigned char *salt; local
103 salt = pbe->salt->data;
104 saltlen = pbe->salt->length;
113 if (!EVP_DigestUpdate(&ctx, salt, saltlen))

Completed in 250 milliseconds

123