HomeSort by: relevance | last modified time | path
    Searched refs:salt (Results 1 - 25 of 42) sorted by relevancy

1 2

  /src/lib/libcrypt/
pw_gensalt.c 89 __gensalt_old(char *salt, size_t saltsiz, const char *option)
95 __crypt_to64(&salt[0], arc4random(), 2);
96 salt[2] = '\0';
102 __gensalt_new(char *salt, size_t saltsiz, const char* option)
119 salt[0] = _PASSWORD_EFMT1;
120 __crypt_to64(&salt[1], (uint32_t)nrounds, 4);
121 __crypt_to64(&salt[5], arc4random(), 4);
122 salt[9] = '\0';
128 __gensalt_md5(char *salt, size_t saltsiz, const char *option)
130 if (saltsiz < 13) { /* $1$8salt$\0 *
    [all...]
crypt-sha1.c 54 * Support a reasonably? long salt.
90 * $<tag>$<iterations>$<salt>$<digest>
99 * <salt> up to 64 bytes of random data, 8 bytes is
110 __crypt_sha1 (const char *pw, const char *salt)
128 * Salt format is
129 * $<tag>$<iterations>$salt[$]
134 if (!strncmp(salt, magic, strlen(magic))) {
135 salt += strlen(magic);
137 iterations = strtoul(salt, &ep, 10);
140 salt = ep + 1; /* skip over the '$' *
    [all...]
bcrypt.c 38 * 2. state := ExpandKey (state, salt, password) 3.
40 * state := ExpandKey (state, 0, salt)
45 * 6. RETURN Concatenate (salt, ctext);
71 #define BCRYPT_MINROUNDS 16 /* we have log2(rounds) in salt */
140 encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, u_int8_t logr)
142 salt[0] = '$';
143 salt[1] = BCRYPT_VERSION;
144 salt[2] = 'a';
145 salt[3] = '$';
147 snprintf(salt + 4, 4, "%2.2u$", logr)
    [all...]
  /src/sys/external/isc/libsodium/dist/src/libsodium/crypto_kdf/blake2b/
kdf_blake2b.c 37 unsigned char salt[crypto_generichash_blake2b_SALTBYTES]; local in function:crypto_kdf_blake2b_derive_from_key
41 STORE64_LE(salt, subkey_id);
42 memset(salt + 8, 0, (sizeof salt) - 8);
51 salt, ctx_padded);
  /src/libexec/makekey/
makekey.c 56 char *r, key[9], salt[3]; local in function:main
59 get(salt, sizeof(salt) - 1);
60 len = strlen(r = crypt(key, salt));
  /src/sys/external/isc/libsodium/dist/test/default/
pwhash_scrypt_ll.c 24 tv(const char *passwd, const char *salt, uint64_t N, uint32_t r, uint32_t p)
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,
pwhash_argon2i.c 82 unsigned char salt[crypto_pwhash_SALTBYTES]; local in function:tv
91 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex,
94 tests[i].passwd_len, (const unsigned char *) salt,
134 unsigned char salt[crypto_pwhash_SALTBYTES]; local in function:tv2
143 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex,
146 tests[i].passwd_len, (const unsigned char *) salt,
156 if (crypto_pwhash(out, sizeof out, "password", strlen("password"), salt, 3,
160 if (crypto_pwhash_argon2i(out, sizeof out, "password", strlen("password"), salt, 3
234 char *salt; local in function:str_tests
    [all...]
pwhash_scrypt.c 94 unsigned char salt[crypto_pwhash_scryptsalsa208sha256_SALTBYTES]; local in function:tv
103 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex,
107 tests[i].passwdlen, (const unsigned char *) salt,
143 unsigned char salt[crypto_pwhash_scryptsalsa208sha256_SALTBYTES]; local in function:tv2
152 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex,
156 tests[i].passwdlen, (const unsigned char *) salt,
302 char *salt; local in function:str_tests
305 salt = (char *) sodium_malloc(crypto_pwhash_scryptsalsa208sha256_SALTBYTES)
    [all...]
generichash3.c 10 unsigned char salt[crypto_generichash_blake2b_SALTBYTES] local in function:main
32 1 + i % crypto_generichash_blake2b_BYTES_MAX, salt, personal);
44 &st, k, 0U, crypto_generichash_blake2b_BYTES_MAX, salt, personal);
55 &st, NULL, 1U, crypto_generichash_blake2b_BYTES_MAX, salt, personal);
79 crypto_generichash_blake2b_BYTES_MAX, salt, NULL);
91 k, 0U, salt, personal);
100 NULL, 0U, salt, personal);
109 k, crypto_generichash_blake2b_KEYBYTES_MAX, salt, personal);
127 k, crypto_generichash_blake2b_KEYBYTES_MAX, salt, NULL);
156 salt, NULL)
    [all...]
pwhash_argon2id.c 82 unsigned char salt[crypto_pwhash_SALTBYTES]; local in function:tv
91 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex,
94 tests[i].passwd_len, (const unsigned char *) salt,
134 unsigned char salt[crypto_pwhash_SALTBYTES]; local in function:tv2
143 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex,
146 tests[i].passwd_len, (const unsigned char *) salt,
156 if (crypto_pwhash_argon2id(out, sizeof out, "password", strlen("password"), salt, 3,
160 if (crypto_pwhash_argon2id(out, sizeof out, "password", strlen("password"), salt, 3
230 char *salt; local in function:str_tests
    [all...]
  /src/sys/external/isc/libsodium/dist/src/libsodium/crypto_pwhash/argon2/
argon2.c 88 const void *salt, const size_t saltlen, void *hash,
117 context.salt = (uint8_t *) salt;
161 const size_t pwdlen, const void *salt,
165 return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen,
172 const size_t pwdlen, const void *salt, const size_t saltlen,
175 return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen,
182 const size_t pwdlen, const void *salt,
186 return argon2_hash(t_cost, m_cost, parallelism, pwd, pwdlen, salt, saltlen,
193 const size_t pwdlen, const void *salt, const size_t saltlen
    [all...]
pwhash_argon2id.c 138 const unsigned char *const salt,
165 (uint32_t) 1U, passwd, (size_t) passwdlen, salt,
183 unsigned char salt[crypto_pwhash_argon2id_SALTBYTES]; local in function:crypto_pwhash_argon2id_str
198 randombytes_buf(salt, sizeof salt);
200 (uint32_t) 1U, passwd, (size_t) passwdlen, salt,
201 sizeof salt, STR_HASHBYTES, out,
argon2.h 61 /* Minimum and maximum salt length in bytes */
141 * salt and its length,
153 * pwd[32], salt is stored in salt[16], you do not have keys nor associated
161 * Argon2_Context(out,8,pwd,32,salt,16,NULL,0,NULL,0,5,1<<20,4,4,NULL,NULL,true,false,false,false).
170 uint8_t *salt; /* salt array */ member in struct:Argon2_Context
171 uint32_t saltlen; /* salt length */
204 * @param salt Pointer to salt
    [all...]
pwhash_argon2i.c 142 const unsigned char *const salt,
169 (uint32_t) 1U, passwd, (size_t) passwdlen, salt,
187 unsigned char salt[crypto_pwhash_argon2i_SALTBYTES]; local in function:crypto_pwhash_argon2i_str
202 randombytes_buf(salt, sizeof salt);
204 (uint32_t) 1U, passwd, (size_t) passwdlen, salt,
205 sizeof salt, STR_HASHBYTES, out,
260 ctx.out = ctx.pwd = ctx.salt = fodder;
  /src/sys/external/isc/libsodium/dist/src/libsodium/crypto_generichash/blake2b/ref/
blake2b-ref.c 78 blake2b_param_set_salt(blake2b_param *P, const uint8_t salt[BLAKE2B_SALTBYTES])
80 memcpy(P->salt, salt, BLAKE2B_SALTBYTES);
140 memset(P->salt, 0, sizeof(P->salt));
147 const void *salt, const void *personal)
163 if (salt != NULL) {
164 blake2b_param_set_salt(P, (const uint8_t *) salt);
166 memset(P->salt, 0, sizeof(P->salt));
    [all...]
generichash_blake2b.c 30 const unsigned char *salt, const unsigned char *personal)
40 (uint64_t) inlen, (uint8_t) keylen, salt,
69 const size_t keylen, const size_t outlen, const unsigned char *salt,
79 if (blake2b_init_salt_personal(state, (uint8_t) outlen, salt,
84 (uint8_t) keylen, salt,
blake2.h 64 uint8_t salt[BLAKE2B_SALTBYTES]; /* 48 */ member in struct:blake2b_param_
79 const void *salt, const void *personal);
84 const void *salt, const void *personal);
94 uint8_t keylen, const void *salt,
  /src/sbin/cgdconfig/
argon2_utils.c 91 uint8_t *key = NULL, *salt = NULL; local in function:argon2id_calibrate
96 salt = emalloc(saltlen);
99 arc4random_buf(salt, saltlen);
117 salt, saltlen,
148 salt, saltlen,
168 free(salt);
  /src/sys/external/isc/libsodium/dist/src/libsodium/crypto_pwhash/scryptsalsa208sha256/
crypto_scrypt-common.c 143 const uint8_t *salt; local in function:escrypt_r
160 salt = src;
161 src = (uint8_t *) strrchr((char *) salt, '$');
163 saltlen = src - salt;
165 saltlen = strlen((char *) salt);
178 if (escrypt_kdf(local, passwd, passwdlen, salt, saltlen, N, r, p, hash,
240 const uint8_t *salt, size_t saltlen,
257 retval = escrypt_kdf(&local, passwd, passwdlen, salt, saltlen, N, r, p, buf,
pbkdf2-sha256.c 42 * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen):
43 * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and
47 PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt,
67 crypto_auth_hmacsha256_update(&PShctx, salt, saltlen);
pwhash_scryptsalsa208sha256.c 150 const unsigned char *const salt,
169 (const uint8_t *) passwd, (size_t) passwdlen, (const uint8_t *) salt,
180 uint8_t salt[crypto_pwhash_scryptsalsa208sha256_STRSALTBYTES]; local in function:crypto_pwhash_scryptsalsa208sha256_str
197 randombytes_buf(salt, sizeof salt);
198 if (escrypt_gensalt_r(N_log2, r, p, salt, sizeof salt, (uint8_t *) setting,
  /src/sys/external/isc/libsodium/dist/src/libsodium/crypto_pwhash/
crypto_pwhash.c 131 const unsigned char * const salt,
136 return crypto_pwhash_argon2i(out, outlen, passwd, passwdlen, salt,
139 return crypto_pwhash_argon2id(out, outlen, passwd, passwdlen, salt,
  /src/usr.bin/pwhash/
pwhash.c 74 "Usage: %s [-km] [-A variant[,params]] [-b rounds] [-S rounds] [-s salt] [-p | string]\n",
76 "Usage: %s [-km] [-b rounds] [-S rounds] [-s salt] [-p | string]\n",
105 const char *salt = buf; local in function:print_passwd
110 * makekey mode: parse string into separate DES key and salt.
117 salt = &string[8];
133 salt = extra;
160 err(1, "Cannot generate salt");
162 (void)fputs(crypt(string, salt), stdout);
171 const char *extra = NULL; /* Store salt or number of rounds */
  /src/sys/external/isc/libsodium/dist/src/libsodium/include/sodium/
crypto_generichash_blake2b.h 85 const unsigned char *salt,
97 const unsigned char *salt,
crypto_pwhash_scryptsalsa208sha256.h 84 const unsigned char * const salt,
105 const uint8_t * salt, size_t saltlen,

Completed in 21 milliseconds

1 2