/freebsd-13-stable/lib/libcrypt/ |
H A D | crypt.h | 37 int crypt_des(const char *pw, const char *salt, char *buf); 38 int crypt_md5(const char *pw, const char *salt, char *buf); 39 int crypt_nthash(const char *pw, const char *salt, char *buf); 40 int crypt_blowfish(const char *pw, const char *salt, char *buf); 41 int crypt_sha256 (const char *pw, const char *salt, char *buf); 42 int crypt_sha512 (const char *pw, const char *salt, char *buf);
|
H A D | crypt.c | 104 * Hash the given password with the given salt. If the salt begins with a 109 crypt_r(const char *passwd, const char *salt, struct crypt_data *data) argument 118 if (cf->magic != NULL && strstr(salt, cf->magic) == salt) { 123 len = strlen(salt); 124 if ((len == 13 || len == 2) && strspn(salt, DES_SALT_ALPHABET) == len) { 131 if (func(passwd, salt, data->__buf) != 0) 137 crypt(const char *passwd, const char *salt) argument 141 return (crypt_r(passwd, salt, [all...] |
/freebsd-13-stable/crypto/heimdal/lib/kadm5/ |
H A D | keys.c | 60 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 D | default_keys.c | 58 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 D | rename_s.c | 64 /* 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-13-stable/crypto/heimdal/lib/hdb/ |
H A D | keys.c | 49 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-13-stable/usr.sbin/pw/tests/ |
H A D | crypt.c | 35 char *salt, *pass, *hash; local 38 errx(1, "Usage: crypt <salt> <password>"); 39 salt = argv[1]; 42 hash = crypt(pass, salt);
|
/freebsd-13-stable/crypto/openssh/openbsd-compat/ |
H A D | xcrypt.c | 67 * Pick an appropriate password encryption type and salt for the running 69 * salt. Usually this will be root unless the root account is locked out. 70 * If we don't find one we return a traditional DES-based salt. 78 static char salt[32]; local 80 if (salt[0] != '\0') 81 return salt; 82 strlcpy(salt, "xx", sizeof(salt)); 89 strlcpy(salt, passwd, MIN(typelen, sizeof(salt))); 100 xcrypt(const char *password, const char *salt) argument [all...] |
H A D | port-uw.c | 57 char *salt; local 70 /* Encrypt the candidate password using the proper salt. */ 71 salt = (pw_password[0] && pw_password[1]) ? pw_password : "xx"; 79 result = ((strcmp(bigcrypt(password, salt), pw_password) == 0) 80 || (strcmp(osr5bigcrypt(password, salt), pw_password) == 0)); 84 result = (strcmp(xcrypt(password, salt), pw_password) == 0);
|
/freebsd-13-stable/sys/contrib/libsodium/src/libsodium/crypto_kdf/blake2b/ |
H A D | kdf_blake2b.c | 37 unsigned char salt[crypto_generichash_blake2b_SALTBYTES]; local 41 STORE64_LE(salt, subkey_id); 42 memset(salt + 8, 0, (sizeof salt) - 8); 51 salt, ctx_padded);
|
/freebsd-13-stable/crypto/openssl/crypto/pkcs12/ |
H A D | p12_crpt.c | 26 unsigned char *salt; local 29 unsigned char *salt, int slen, 51 salt = pbe->salt->data; 52 saltlen = pbe->salt->length; 53 if (!(*pkcs12_key_gen)(pass, passlen, salt, saltlen, PKCS12_KEY_ID, 59 if (!(*pkcs12_key_gen)(pass, passlen, salt, saltlen, PKCS12_IV_ID,
|
H A D | p12_mutl.c | 32 *psalt = p12->mac->salt; 50 const unsigned char *salt, int saltlen, 60 if (!PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, 73 unsigned char *salt, int slen, 81 unsigned char key[EVP_MAX_MD_SIZE], *salt; local 96 salt = p12->mac->salt->data; 97 saltlen = p12->mac->salt->length; 117 if (!pkcs12_gen_gost_mac_key(pass, passlen, salt, saltlen, iter, 123 if (!(*pkcs12_key_gen)(pass, passlen, salt, saltle 49 pkcs12_gen_gost_mac_key(const char *pass, int passlen, const unsigned char *salt, int saltlen, int iter, int keylen, unsigned char *key, const EVP_MD *digest) argument 70 pkcs12_gen_mac(PKCS12 *p12, const char *pass, int passlen, unsigned char *mac, unsigned int *maclen, int (*pkcs12_key_gen)(const char *pass, int passlen, unsigned char *salt, int slen, int id, int iter, int n, unsigned char *out, const EVP_MD *md_type)) argument 175 PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type) argument 206 PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, const EVP_MD *md_type) argument [all...] |
H A D | p12_p8e.c | 17 unsigned char *salt, int saltlen, int iter, 24 pbe = PKCS5_pbe2_set(cipher, iter, salt, saltlen); 26 pbe = PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, pbe_nid); 29 pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen); 15 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-13-stable/sys/geom/eli/ |
H A D | pkcs5v2.h | 33 void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt,
|
/freebsd-13-stable/contrib/ntp/lib/isc/ |
H A D | iterated_hash.c | 29 const unsigned char *salt, int saltlength, 41 isc_sha1_update(&ctx, salt, saltlength); 27 isc_iterated_hash(unsigned char out[ISC_SHA1_DIGESTLENGTH], unsigned int hashalg, int iterations, const unsigned char *salt, int saltlength, const unsigned char *in, int inlength) argument
|
/freebsd-13-stable/tests/sys/geom/class/eli/ |
H A D | gentestvect.py | 37 def printhmacres(salt, passwd, itr, hmacout): 38 print '\t{ %s, %d, %s, %d, %s, %d },' % (cstring(salt), len(salt), 54 print '\t/* salt, saltlen, passwd, itr, hmacout, hmacoutlen */' 59 salt = randgen(saltl) 61 hmacout = pbkdf2_hmac(hashfun, passwd, salt, 63 printhmacres(salt, passwd, itr, hmacout)
|
/freebsd-13-stable/secure/lib/libcrypt/ |
H A D | crypt-blowfish.c | 40 * 2. state := ExpandKey (state, salt, password) 43 * state := ExpandKey (state, 0, salt) 47 * 6. RETURN Concatenate (salt, ctext); 72 #define BCRYPT_MINLOGROUNDS 4 /* we have log2(rounds) in salt */ 133 /* We handle $Vers$log2(NumRounds)$salt+passwd$ 137 crypt_blowfish(const char *key, const char *salt, char *buffer) argument 154 if (*salt == '$') { 156 salt++; 158 if (*salt > BCRYPT_VERSION) 162 if (salt[ [all...] |
/freebsd-13-stable/crypto/heimdal/kdc/ |
H A D | string2key.c | 74 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 D | mit_dump.c | 62 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-13-stable/crypto/openssl/crypto/asn1/ |
H A D | p5_pbe.c | 19 ASN1_SIMPLE(PBEPARAM, salt, ASN1_OCTET_STRING), 28 const unsigned char *salt, int saltlen) 53 if (salt) 54 memcpy(sstr, salt, saltlen); 58 ASN1_STRING_set0(pbe->salt, sstr, saltlen); 82 const unsigned char *salt, int saltlen) 91 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen))
|
/freebsd-13-stable/sys/contrib/libsodium/test/default/ |
H A D | pwhash_scrypt_ll.c | 24 tv(const char *passwd, const char *salt, uint64_t N, uint32_t r, uint32_t p) argument 30 size_t salt_len = strlen(salt); 34 (const uint8_t *) passwd, passwd_len, (const uint8_t *) salt, 37 salt); 41 printf("scrypt('%s', '%s', %lu, %lu, %lu, %lu) =\n", passwd, salt,
|
/freebsd-13-stable/contrib/subversion/subversion/libsvn_subr/ |
H A D | crypto.h | 64 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-13-stable/contrib/bearssl/src/rsa/ |
H A D | rsa_pss_sig_pad.c | 36 unsigned char *salt, *seed; local 54 * length combined with the intended salt length. 63 * Produce a random salt. 65 salt = x + xlen - hash_len - salt_len - 1; 67 (*rng)->generate(rng, salt, salt_len); 78 hf_data->update(&hc.vtable, salt, salt_len); 82 * Prepare string PS (padded salt). The salt is already at the
|
/freebsd-13-stable/sys/contrib/openzfs/include/sys/ |
H A D | hkdf.h | 25 int hkdf_sha512(uint8_t *key_material, uint_t km_len, uint8_t *salt,
|
/freebsd-13-stable/contrib/ntp/lib/isc/include/isc/ |
H A D | iterated_hash.h | 41 const unsigned char *salt, int saltlength,
|