/freebsd-current/lib/libcrypt/ |
H A D | crypt.h | 35 int crypt_des(const char *pw, const char *salt, char *buf); 36 int crypt_md5(const char *pw, const char *salt, char *buf); 37 int crypt_nthash(const char *pw, const char *salt, char *buf); 38 int crypt_blowfish(const char *pw, const char *salt, char *buf); 39 int crypt_sha256 (const char *pw, const char *salt, char *buf); 40 int crypt_sha512 (const char *pw, const char *salt, char *buf);
|
H A D | crypt.c | 100 * Hash the given password with the given salt. If the salt begins with a 105 crypt_r(const char *passwd, const char *salt, struct crypt_data *data) argument 114 if (cf->magic != NULL && strstr(salt, cf->magic) == salt) { 119 len = strlen(salt); 120 if ((len == 13 || len == 2) && strspn(salt, DES_SALT_ALPHABET) == len) { 127 if (func(passwd, salt, data->__buf) != 0) 133 crypt(const char *passwd, const char *salt) argument 137 return (crypt_r(passwd, salt, [all...] |
/freebsd-current/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)); 72 salt.type = hdb_pw_salt; 73 salt.salt = salt2.saltvalue; 75 if(ent.entry.keys.val[i].salt == NULL){ 76 ent.entry.keys.val[i].salt = 77 malloc(sizeof(*ent.entry.keys.val[i].salt)); [all...] |
/freebsd-current/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-current/usr.sbin/pw/tests/ |
H A D | crypt.c | 33 char *salt, *pass, *hash; local 36 errx(1, "Usage: crypt <salt> <password>"); 37 salt = argv[1]; 40 hash = crypt(pass, salt);
|
/freebsd-current/crypto/openssl/test/recipes/ |
H A D | 20-test_passwd.t | 22 salt => 'saltstring', 26 salt => 'rounds=10000$saltstringsaltstring', 30 salt => 'rounds=5000$toolongsaltstring', 34 salt => 'rounds=1400$anotherlongsaltstring', 38 salt => 'rounds=10$roundstoolow', 42 salt => 'saltstring', 46 salt => 'rounds=10000$saltstringsaltstring', 50 salt => 'rounds=5000$toolongsaltstring', 54 salt => 'rounds=1400$anotherlongsaltstring', 58 salt [all...] |
/freebsd-current/crypto/openssh/openbsd-compat/ |
H A D | xcrypt.c | 65 * Pick an appropriate password encryption type and salt for the running 67 * salt. Usually this will be root unless the root account is locked out. 68 * If we don't find one we return a traditional DES-based salt. 76 static char salt[32]; local 78 if (salt[0] != '\0') 79 return salt; 80 strlcpy(salt, "xx", sizeof(salt)); 87 strlcpy(salt, passwd, MINIMUM(typelen, sizeof(salt))); 98 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-current/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-current/sys/geom/eli/ |
H A D | pkcs5v2.h | 31 void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt,
|
/freebsd-current/tests/sys/geom/class/eli/ |
H A D | gentestvect.py | 36 def printhmacres(salt, passwd, itr, hmacout): 37 print '\t{ %s, %d, %s, %d, %s, %d },' % (cstring(salt), len(salt), 53 print '\t/* salt, saltlen, passwd, itr, hmacout, hmacoutlen */' 58 salt = randgen(saltl) 60 hmacout = pbkdf2_hmac(hashfun, passwd, salt, 62 printhmacres(salt, passwd, itr, hmacout)
|
/freebsd-current/secure/lib/libcrypt/ |
H A D | crypt-blowfish.c | 38 * 2. state := ExpandKey (state, salt, password) 41 * state := ExpandKey (state, 0, salt) 45 * 6. RETURN Concatenate (salt, ctext); 70 #define BCRYPT_MINLOGROUNDS 4 /* we have log2(rounds) in salt */ 131 /* We handle $Vers$log2(NumRounds)$salt+passwd$ 135 crypt_blowfish(const char *key, const char *salt, char *buffer) argument 152 if (*salt == '$') { 154 salt++; 156 if (*salt > BCRYPT_VERSION) 160 if (salt[ [all...] |
/freebsd-current/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, 56 if (salt) 57 memcpy(sstr, salt, saltlen); 61 ASN1_STRING_set0(pbe->salt, sstr, saltlen); 83 const unsigned char *salt, int saltlen) 85 return PKCS5_pbe_set0_algor_ex(algor, alg, iter, salt, saltlen, NULL); 91 const unsigned char *salt, int saltlen, 101 if (PKCS5_pbe_set0_algor_ex(ret, alg, iter, salt, saltlen, ctx)) 109 const unsigned char *salt, in [all...] |
/freebsd-current/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-current/sys/contrib/openzfs/tests/zfs-tests/tests/functional/hkdf/ |
H A D | hkdf_test.c | 34 const char *salt; member in struct:hkdf_tv 57 .salt = "\x00\x01\x02\x03\x04\x05\x06\x07" 83 .salt = "\x60\x61\x62\x63\x64\x65\x66\x67" 123 .salt = NULL, 139 .salt = "\x00\x01\x02\x03\x04\x05\x06\x07" 158 .salt = NULL, 189 ret = hkdf_sha512((uint8_t *)tv->ikm, tv->ikm_len, (uint8_t *)tv->salt,
|
/freebsd-current/crypto/openssl/crypto/pkcs12/ |
H A D | p12_key.c | 19 int PKCS12_key_gen_asc_ex(const char *pass, int passlen, unsigned char *salt, argument 35 ret = PKCS12_key_gen_uni_ex(unipass, uniplen, salt, saltlen, id, iter, 41 int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, argument 45 return PKCS12_key_gen_asc_ex(pass, passlen, salt, saltlen, id, iter, n, 49 int PKCS12_key_gen_utf8_ex(const char *pass, int passlen, unsigned char *salt, argument 65 ret = PKCS12_key_gen_uni_ex(unipass, uniplen, salt, saltlen, id, iter, 71 int PKCS12_key_gen_utf8(const char *pass, int passlen, unsigned char *salt, argument 75 return PKCS12_key_gen_utf8_ex(pass, passlen, salt, saltlen, id, iter, n, 79 int PKCS12_key_gen_uni_ex(unsigned char *pass, int passlen, unsigned char *salt, argument 106 salt, saltle 133 PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, int saltlen, int id, int iter, int n, unsigned char *out, const EVP_MD *md_type) argument [all...] |
H A D | p12_mutl.c | 38 *psalt = p12->mac->salt; 56 const unsigned char *salt, int saltlen, 66 if (!PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, 79 unsigned char *salt, int slen, 88 unsigned char key[EVP_MAX_MD_SIZE], *salt; local 106 salt = p12->mac->salt->data; 107 saltlen = p12->mac->salt->length; 139 if (!pkcs12_gen_gost_mac_key(pass, passlen, salt, saltlen, iter, 146 if (!(*pkcs12_key_gen)(pass, passlen, salt, saltle 55 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 76 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 209 PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type) argument 242 PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, const EVP_MD *md_type) argument [all...] |
H A D | p12_crpt.c | 30 unsigned char *salt; local 49 salt = pbe->salt->data; 50 saltlen = pbe->salt->length; 51 if (!PKCS12_key_gen_utf8_ex(pass, passlen, salt, saltlen, PKCS12_KEY_ID, 60 if (!PKCS12_key_gen_utf8_ex(pass, passlen, salt, saltlen, PKCS12_IV_ID,
|
/freebsd-current/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-current/crypto/openssl/crypto/evp/ |
H A D | pbe_scrypt.c | 38 const unsigned char *salt, size_t saltlen, 59 if (salt == NULL) { 60 salt = (const unsigned char *)empty; 77 (unsigned char *)salt, saltlen); 91 const unsigned char *salt, size_t saltlen, 95 return EVP_PBE_scrypt_ex(pass, passlen, salt, saltlen, N, r, p, maxmem, 37 EVP_PBE_scrypt_ex(const char *pass, size_t passlen, const unsigned char *salt, size_t saltlen, uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem, unsigned char *key, size_t keylen, OSSL_LIB_CTX *ctx, const char *propq) argument 90 EVP_PBE_scrypt(const char *pass, size_t passlen, const unsigned char *salt, size_t saltlen, uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem, unsigned char *key, size_t keylen) argument
|
/freebsd-current/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-current/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,
|