Searched refs:salt (Results 1 - 25 of 118) sorted by relevance

12345

/freebsd-10.0-release/lib/libcrypt/
H A Dcrypt.h35 char *crypt_des(const char *pw, const char *salt);
36 char *crypt_md5(const char *pw, const char *salt);
37 char *crypt_nthash(const char *pw, const char *salt);
38 char *crypt_blowfish(const char *pw, const char *salt);
39 char *crypt_sha256 (const char *pw, const char *salt);
40 char *crypt_sha512 (const char *pw, const char *salt);
H A Dcrypt.c130 crypt(const char *passwd, const char *salt) argument
136 if (crypt_types[i].magic != NULL && strncmp(salt,
138 return (crypt_types[i].func(passwd, salt));
140 return (crypt_types[crypt_type].func(passwd, salt));
H A Dcrypt-sha256.c47 /* Define our magic string to mark salt for SHA256 "encryption" replacement. */
53 /* Maximum salt string length. */
63 crypt_sha256_r(const char *key, const char *salt, char *buffer, int buflen) argument
81 /* Find beginning of salt string. The prefix should normally always
83 if (strncmp(sha256_salt_prefix, salt, sizeof(sha256_salt_prefix) - 1) == 0)
84 /* Skip salt prefix. */
85 salt += sizeof(sha256_salt_prefix) - 1;
87 if (strncmp(salt, sha256_rounds_prefix, sizeof(sha256_rounds_prefix) - 1)
89 num = salt + sizeof(sha256_rounds_prefix) - 1;
93 salt
271 crypt_sha256(const char *key, const char *salt) argument
360 const char *salt; member in struct:__anon5512
[all...]
/freebsd-10.0-release/crypto/heimdal/lib/kadm5/
H A Dkeys.c60 keys[i].salt = NULL;
77 if ((keys1[i].salt != NULL && keys2[j].salt == NULL)
78 || (keys1[i].salt == NULL && keys2[j].salt != NULL))
81 if (keys1[i].salt != NULL) {
82 if (keys1[i].salt->type != keys2[j].salt->type)
84 if (keys1[i].salt->salt
[all...]
H A Ddefault_keys.c58 if (keys[i].salt) {
59 printf(" salt: ");
61 switch (keys[i].salt->type) {
63 printf("pw-salt:");
66 printf("afs3-salt:");
69 printf("unknown salt: %d", keys[i].salt->type);
72 if (keys[i].salt->salt.length)
73 printf("%.*s", (int)keys[i].salt
[all...]
H A Drename_s.c64 /* fix salt */
66 Salt salt; local
68 memset(&salt, 0, sizeof(salt));
70 salt.type = hdb_pw_salt;
71 salt.salt = salt2.saltvalue;
73 if(ent.entry.keys.val[i].salt == NULL){
74 ent.entry.keys.val[i].salt =
75 malloc(sizeof(*ent.entry.keys.val[i].salt));
[all...]
/freebsd-10.0-release/crypto/heimdal/lib/hdb/
H A Dkeys.c49 if (keys[i].salt != NULL) {
50 free_Salt(keys[i].salt);
51 free(keys[i].salt);
52 keys[i].salt = NULL;
61 * of etype:salttype:salt, syntax of this if something like:
62 * [(des|des3|etype):](pw-salt|afs3)[:string], if etype is omitted it
65 * v5 == pw-salt, and
66 * v4 == des:pw-salt:
67 * afs or afs3 == des:afs3-salt
85 krb5_salt *salt, krb5_principa
83 parse_key_set(krb5_context context, const char *key, krb5_enctype **ret_enctypes, size_t *ret_num_enctypes, krb5_salt *salt, krb5_principal principal) argument
200 add_enctype_to_key_set(Key **key_set, size_t *nkeyset, krb5_enctype enctype, krb5_salt *salt) argument
279 krb5_salt salt; local
375 krb5_salt salt; local
[all...]
/freebsd-10.0-release/crypto/openssl/crypto/asn1/
H A Dp5_pbe.c68 ASN1_SIMPLE(PBEPARAM, salt, ASN1_OCTET_STRING),
78 const unsigned char *salt, int saltlen)
99 if (!ASN1_STRING_set(pbe->salt, NULL, saltlen))
104 sstr = ASN1_STRING_data(pbe->salt);
105 if (salt)
106 memcpy(sstr, salt, saltlen);
133 const unsigned char *salt, int saltlen)
143 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen))
/freebsd-10.0-release/sys/geom/eli/
H A Dpkcs5v2.h31 void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt,
/freebsd-10.0-release/crypto/openssh/openbsd-compat/
H A Dxcrypt.c66 xcrypt(const char *password, const char *salt) argument
71 if (is_md5_salt(salt))
72 crypted = md5_crypt(password, salt);
74 crypted = crypt(password, salt);
77 crypted = bigcrypt(password, salt);
79 crypted = crypt(password, salt);
81 crypted = bigcrypt(password, salt);
83 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);
/freebsd-10.0-release/crypto/openssl/crypto/pkcs12/
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_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
/freebsd-10.0-release/secure/lib/libcrypt/
H A Dcrypt-blowfish.c38 * 2. state := ExpandKey (state, salt, password) 3.
40 * state := ExpandKey (state, 0, salt)
45 * 6. RETURN Concatenate (salt, ctext);
69 #define BCRYPT_MINROUNDS 16 /* we have log2(rounds) in salt */
132 /* We handle $Vers$log2(NumRounds)$salt+passwd$
136 crypt_blowfish(const char *key, const char *salt) argument
153 if(!strncmp(salt, magic, strlen(magic))) {
154 salt += strlen(magic);
156 else if (*salt == '$') {
159 salt
[all...]
/freebsd-10.0-release/crypto/heimdal/kdc/
H A Dstring2key.c74 krb5_salt salt,
82 ret = krb5_string_to_key_salt(context, enctype, pw, salt, &key);
102 krb5_salt salt; local
167 krb5_get_pw_salt(context, princ, &salt);
168 tokey(context, etype, password, salt, "Kerberos 5 (%s)");
169 krb5_free_salt(context, salt);
172 salt.salttype = KRB5_PW_SALT;
173 salt.saltvalue.length = 0;
174 salt.saltvalue.data = NULL;
175 tokey(context, ETYPE_DES_CBC_MD5, password, salt, "Kerbero
71 tokey(krb5_context context, krb5_enctype enctype, const char *pw, krb5_salt salt, const char *label) argument
[all...]
H A Dmit_dump.c62 foreach version 0 to key data version - 1 (a key or a salt)
155 Salt *salt = ent->keys.val[key_num].salt; local
156 /* fix salt type */
157 switch((int)salt->type) {
159 salt->type = KRB5_PADATA_PW_SALT;
162 krb5_data_free(&salt->salt);
163 salt->type = KRB5_PADATA_PW_SALT;
174 ret = krb5_data_alloc (&salt
[all...]
/freebsd-10.0-release/release/picobsd/tinyware/passwd/
H A Dlocal_passwd.c106 char buf[_PASSWORD_LEN+1], salt[32]; local
170 salt[0] = _PASSWORD_EFMT1;
171 to64(&salt[1], (long)(29 * 25), 4);
172 to64(&salt[5], random(), 4);
173 salt[9] = '\0';
175 /* Make a good size salt for algorithms that can use it. */
185 to64(&salt[0], random(), 3);
186 to64(&salt[3], tv.tv_usec, 3);
187 to64(&salt[6], tv.tv_sec, 2);
188 to64(&salt[
[all...]
/freebsd-10.0-release/crypto/openssh/
H A Dauth2-jpake.c63 * anyway because they will mismatch on fake salt.
120 /* Returns 1 if 'c' is a valid crypt(3) salt character, 0 otherwise */
134 * Derive fake salt as H(username || first_private_host_key)
185 /* ASCII an integer [0, 64) for inclusion in a password/salt */
194 /* Generate ASCII salt bytes for user */
216 * a stable fake salt under it for use by a non-existent account.
220 fake_salt_and_scheme(Authctxt *authctxt, char **salt, char **scheme) argument
240 xasprintf(salt, "$1$%s$", makesalt(8, authctxt->user));
243 *salt = xstrdup(makesalt(2, authctxt->user));
248 xasprintf(salt, "
272 auth2_jpake_get_pwdata(Authctxt *authctxt, BIGNUM **s, char **hash_scheme, char **salt) argument
377 char *salt, *hash_scheme; local
[all...]
/freebsd-10.0-release/contrib/subversion/subversion/libsvn_subr/
H A Dcrypto.h64 The salt used for PBKDF2 is returned in SALT, and the IV used for
77 const svn_string_t **salt,
93 const svn_string_t *salt,
103 Set *IV and *SALT to the initialization vector and salt used for
114 const svn_string_t **salt,
133 const svn_string_t *salt,
/freebsd-10.0-release/crypto/heimdal/lib/krb5/
H A Dsalt.c99 krb5_salt *salt)
106 salt->salttype = KRB5_PW_SALT;
110 ret = krb5_data_alloc (&salt->saltvalue, len);
113 p = salt->saltvalue.data;
127 krb5_salt salt)
129 krb5_data_free(&salt.saltvalue);
141 krb5_salt salt; local
143 ret = krb5_get_pw_salt(context, principal, &salt);
146 ret = krb5_string_to_key_data_salt(context, enctype, password, salt, key);
147 krb5_free_salt(context, salt);
97 krb5_get_pw_salt(krb5_context context, krb5_const_principal principal, krb5_salt *salt) argument
126 krb5_free_salt(krb5_context context, krb5_salt salt) argument
165 krb5_string_to_key_data_salt(krb5_context context, krb5_enctype enctype, krb5_data password, krb5_salt salt, krb5_keyblock *key) argument
184 krb5_string_to_key_data_salt_opaque(krb5_context context, krb5_enctype enctype, krb5_data password, krb5_salt salt, krb5_data opaque, krb5_keyblock *key) argument
216 krb5_string_to_key_salt(krb5_context context, krb5_enctype enctype, const char *password, krb5_salt salt, krb5_keyblock *key) argument
229 krb5_string_to_key_salt_opaque(krb5_context context, krb5_enctype enctype, const char *password, krb5_salt salt, krb5_data opaque, krb5_keyblock *key) argument
[all...]
H A Dsalt-des3.c41 krb5_salt salt,
51 len = password.length + salt.saltvalue.length;
58 memcpy(str + password.length, salt.saltvalue.data, salt.saltvalue.length);
106 krb5_salt salt,
111 size_t len = password.length + salt.saltvalue.length;
120 memcpy(s + password.length, salt.saltvalue.data, salt.saltvalue.length);
136 "pw-salt",
146 "pw-salt",
38 DES3_string_to_key(krb5_context context, krb5_enctype enctype, krb5_data password, krb5_salt salt, krb5_data opaque, krb5_keyblock *key) argument
103 DES3_string_to_key_derived(krb5_context context, krb5_enctype enctype, krb5_data password, krb5_salt salt, krb5_data opaque, krb5_keyblock *key) argument
[all...]
/freebsd-10.0-release/crypto/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...]
/freebsd-10.0-release/crypto/openssl/crypto/evp/
H A Dp5_crpt2.c81 const unsigned char *salt, int saltlen, int iter,
124 if (!HMAC_Update(&hctx, salt, saltlen)
161 h__dump (salt, saltlen);
170 const unsigned char *salt, int saltlen, int iter,
173 return PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, EVP_sha1(),
181 unsigned char salt[] = {0x12, 0x34, 0x56, 0x78}; local
182 PKCS5_PBKDF2_HMAC_SHA1("password", -1, salt, 4, 5, 4, out);
256 unsigned char *salt, key[EVP_MAX_KEY_LENGTH]; local
317 if(kdf->salt->type != V_ASN1_OCTET_STRING) {
324 salt
80 PKCS5_PBKDF2_HMAC(const char *pass, int passlen, const unsigned char *salt, int saltlen, int iter, const EVP_MD *digest, int keylen, unsigned char *out) argument
169 PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, const unsigned char *salt, int saltlen, int iter, int keylen, unsigned char *out) argument
[all...]
/freebsd-10.0-release/contrib/apr-util/include/
H A Dapr_md5.h135 * @param salt The salt string to use for the encoding
139 APU_DECLARE(apr_status_t) apr_md5_encode(const char *password, const char *salt,
146 * @param salt Pointer to binary data to be used as salt for the encoding
147 * @param salt_len The size of the salt data (must be >= 16)
153 const unsigned char *salt,

Completed in 154 milliseconds

12345