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

123

/illumos-gate/usr/src/cmd/makekey/
H A Dmakekey.c46 char salt[2]; local
49 (void) read(0, salt, 2);
50 (void) write(1, crypt(key, salt), 13);
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/crypto/old/
H A Ddes_stringtokey.c36 const krb5_data * salt);
43 const krb5_data *salt, const krb5_data *parm,
56 return(mit_des_string_to_key_int(context, key, string, salt));
59 return mit_afs_string_to_key(context, key, string, salt);
40 krb5int_des_string_to_key(krb5_context context, const struct krb5_enc_provider *enc, const krb5_data *string, const krb5_data *salt, const krb5_data *parm, krb5_keyblock *key) argument
/illumos-gate/usr/src/lib/crypt_modules/bsdbf/
H A Dbsdbf.c60 const char *salt,
63 (void) strlcpy(ctbuffer, bcrypt(plaintext, salt), ctbufflen);
57 crypt_genhash_impl(char *ctbuffer, size_t ctbufflen, const char *plaintext, const char *salt, const char **params) argument
H A Dbcrypt.c43 * 2. state := ExpandKey (state, salt, password) 3.
45 * state := ExpandKey (state, 0, salt)
50 * 6. RETURN Concatenate (salt, ctext);
76 #define BCRYPT_MINLOGROUNDS 4 /* we have log2(rounds) in salt */
146 encode_salt(char *salt, uint8_t *csalt, uint16_t clen, uint8_t logr) argument
148 salt[0] = '$';
149 salt[1] = BCRYPT_VERSION;
150 salt[2] = 'a';
151 salt[3] = '$';
153 (void) snprintf(salt
[all...]
/illumos-gate/usr/src/lib/crypt_modules/sha256/
H A Dtest.c33 const char *salt; member in struct:__anon2454
51 "we have a short salt string but not a short password",
64 const char *salt; member in struct:__anon2455
83 "we have a short salt string but not a short password",
120 tests2[cnt].input, tests2[cnt].salt, NULL);
H A Dcrypt_sha.c170 char *salt; local
183 /* Refine the salt */
184 salt = (char *)switchsalt;
187 if (strncmp((char *)salt, crypt_alg_magic, crypt_alg_magic_len) == 0) {
188 salt += crypt_alg_magic_len + 1;
191 srounds = getrounds(salt);
195 p = strchr(salt, '$');
197 salt = p + 1;
200 salt_len = MIN(strcspn(salt, "$"), MAX_SALT_LEN);
209 /* 3. Then the raw salt */
[all...]
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/crypto/aes/
H A Daes_s2k.c47 const krb5_data *salt,
95 string, salt);
44 krb5int_aes_string_to_key(krb5_context context, const struct krb5_enc_provider *enc, const krb5_data *string, const krb5_data *salt, const krb5_data *params, krb5_keyblock *key) argument
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/crypto/arcfour/
H A Darcfour_str2key.c24 const krb5_data *string, const krb5_data *salt,
37 /* We ignore salt per the Microsoft spec*/
22 krb5int_arcfour_string_to_key(krb5_context context, const struct krb5_enc_provider *enc, const krb5_data *string, const krb5_data *salt, const krb5_data *params, krb5_keyblock *key) argument
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/crypto/
H A Dstring_to_key.c39 const krb5_data *salt,
46 const krb5_data *string, const krb5_data *salt,
49 return krb5_c_string_to_key_with_params(context, enctype, string, salt,
56 const krb5_data *salt,
74 * the salt in much of the code. However only the DES enctypes can
76 if (salt && salt->length == SALT_TYPE_AFS_LENGTH) {
101 ret = (*krb5_enctypes_list[i].str2key)(context, enc, string, salt,
45 krb5_c_string_to_key(krb5_context context, krb5_enctype enctype, const krb5_data *string, const krb5_data *salt, krb5_keyblock *key) argument
54 krb5_c_string_to_key_with_params(krb5_context context, krb5_enctype enctype, const krb5_data *string, const krb5_data *salt, const krb5_data *params, krb5_keyblock *key) argument
H A Dpbkdf2.c53 const krb5_data *pass, const krb5_data *salt)
103 params.pSaltSourceData = (void *)salt->data;
104 params.ulSaltSourceDataLen = salt->length;
48 krb5int_pbkdf2_hmac_sha1( krb5_context context, const krb5_data *out, unsigned long count, krb5_enctype enctype, const krb5_data *pass, const krb5_data *salt) argument
H A Dold_api_glue.c127 const krb5_data *salt)
129 return(krb5_c_string_to_key(context, eblock->crypto_entry, data, salt,
125 krb5_string_to_key(krb5_context context, const krb5_encrypt_block *eblock, krb5_keyblock *keyblock, const krb5_data *data, const krb5_data *salt) argument
/illumos-gate/usr/src/uts/common/fs/zfs/
H A Dedonr_zfs.c67 zio_checksum_edonr_tmpl_init(const zio_cksum_salt_t *salt) argument
74 * blocks, but the salt is too small. Rather than simply padding it
75 * with zeros, we expand the salt into a new salt block of proper
76 * size by double-hashing it (the new salt block will be composed of
77 * H(salt) || H(H(salt))).
80 EdonRHash(EDONR_MODE, salt->zcs_bytes, sizeof (salt->zcs_bytes) * 8,
86 * Feed the new salt bloc
[all...]
H A Dskein_zfs.c70 zio_checksum_skein_tmpl_init(const zio_cksum_salt_t *salt) argument
76 salt->zcs_bytes, sizeof (salt->zcs_bytes));
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/crypto/des/
H A Dstring2key.c39 The routine may use "salt" to seed or alter the conversion
52 const krb5_data *salt)
74 if (salt
75 && (salt->length == SALT_TYPE_AFS_LENGTH
77 || salt->length == (unsigned) -1)) {
81 afssalt.data = salt->data;
91 length = data->length + (salt ? salt->length : 0);
99 if (salt)
100 (void) memcpy(copystr + data->length, (char *)salt
49 mit_des_string_to_key_int(krb5_context context, krb5_keyblock *keyblock, const krb5_data *data, const krb5_data *salt) argument
[all...]
H A Dafsstring2key.c80 const krb5_data *salt)
89 char *realm = salt->data;
97 returned bytes after the copy of the (fixed) salt.
106 memcpy (password, realm, min (salt->length, 8));
116 /* Out-of-bounds salt characters are equivalent to a salt string
134 unsigned int pw_len = salt->length+data->length;
141 for (i=data->length, j = 0; j < salt->length; i++, j++) {
184 krb5_xfree(salt->data);
368 char *afs_crypt(const char *pw, const char *salt, argument
78 mit_afs_string_to_key(krb5_context context, krb5_keyblock *keyblock, const krb5_data *data, const krb5_data *salt) argument
[all...]
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/crypto/dk/
H A Dstringtokey.c42 const krb5_data *string, const krb5_data *salt,
56 concatlen = string->length+(salt?salt->length:0);
70 /* construct input string ( = string + salt), fold it, make_key it */
73 if (salt)
74 memcpy(concat+string->length, salt->data, salt->length);
39 krb5int_dk_string_to_key( krb5_context context, const struct krb5_enc_provider *enc, const krb5_data *string, const krb5_data *salt, const krb5_data *parms, krb5_keyblock *key) argument
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/crypto/arcfour/
H A Dk5_arcfour.c17 /* salt string used for exportable ARCFOUR */
84 krb5_data d1, d2, d3, salt, plaintext, checksum, ciphertext, confounder; local
97 * k1 = HMAC(input_key, salt)
143 salt.length=14;
144 salt.data=MALLOC(salt.length);
146 if (salt.data == NULL) {
164 FREE(salt.data, salt.length);
184 (void) strncpy(salt
280 krb5_data d1,d2,d3,salt,ciphertext,plaintext,checksum; local
[all...]
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/
H A Dgic_keytab.c47 krb5_data *salt,
41 krb5_get_as_key_keytab( krb5_context context, krb5_principal client, krb5_enctype etype, krb5_prompter_fct prompter, void *prompter_data, krb5_data *salt, krb5_data *params, krb5_keyblock *as_key, void *gak_data) argument
/illumos-gate/usr/src/cmd/krb5/kadmin/kclient/
H A Dksetpw.c58 krb5_principal victim, salt; local
150 code = krb5_parse_name(ctx, vprincstr, &salt);
248 kt_add_entry(ctx, kt, victim, salt, enctypes[i], kvno, newpw);
334 krb5_data password, salt; local
354 if ((code = krb5_principal2salt(ctx, sprinc, &salt)) != 0) {
356 gettext("Could not compute salt for %s"), enctype);
360 code = krb5_c_string_to_key(ctx, enctype, &password, &salt, &key);
363 com_err(whoami, code, gettext("Could not compute salt for %s"),
365 krb5_xfree(salt.data);
/illumos-gate/usr/src/cmd/krb5/kadmin/ktutil/
H A Dktutil_funcs.c115 krb5_data password, salt; local
179 retval = krb5_principal2salt(context, princ, &salt);
183 &salt, &key);
/illumos-gate/usr/src/lib/krb5/plugins/kdb/db2/
H A Dkdb_compat.h88 krb5_octet *salt; member in struct:_old_krb5_db_entry
/illumos-gate/usr/src/lib/passwdutil/
H A Dnis_attr.c384 char *salt; local
396 salt = crypt_gensalt(
399 if (salt == NULL) {
410 nisbuf->pwd->pw_passwd = crypt(p->data.val_s, salt);
411 free(salt);
/illumos-gate/usr/src/lib/pkcs11/libpkcs11/common/
H A Dpkcs11SUNWExtensions.c378 size_t passphrase_len, void *salt, size_t salt_len, CK_ULONG iterations,
427 if (salt == NULL || salt_len == 0) {
433 params.pSaltSourceData = salt;
563 size_t passphrase_len, void *salt, size_t salt_len, CK_KEY_TYPE key_type,
570 salt, salt_len, CK_PKCS5_PBKD2_ITERATIONS, key_type, key_len, 0,
377 pkcs11_PasswdToPBKD2Object(CK_SESSION_HANDLE hSession, char *passphrase, size_t passphrase_len, void *salt, size_t salt_len, CK_ULONG iterations, CK_KEY_TYPE key_type, CK_ULONG key_len, CK_FLAGS key_flags, CK_OBJECT_HANDLE_PTR obj) argument
562 pkcs11_PasswdToKey(CK_SESSION_HANDLE hSession, char *passphrase, size_t passphrase_len, void *salt, size_t salt_len, CK_KEY_TYPE key_type, CK_ULONG key_len, void **rawkey, size_t *rawkey_len) argument
/illumos-gate/usr/src/lib/crypt_modules/sunmd5/
H A Dsunmd5.c191 * was in the old salt use that, otherwise keep what was in the
192 * old salt.
245 const char *salt,
282 * Extract the puresalt (if it exists) from the existing salt string
285 saltend = strrchr(salt, '$');
286 if (saltend == NULL || saltend == salt) {
290 size_t len = saltend - salt + 1;
294 (void) strlcpy(puresalt, salt, len);
296 puresalt = strdup(salt);
302 maxrounds += getrounds(salt);
242 crypt_genhash_impl(char *ctbuffer, size_t ctbufflen, const char *plaintext, const char *salt, const char **params) argument
[all...]
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/keytab/
H A Dkt_solaris.c74 krb5_data password, salt; local
84 if ((code = krb5_principal2salt(ctx, svc_princ, &salt)) != 0) {
88 if ((krb5_c_string_to_key(ctx, enctype, &password, &salt, &key)) != 0)
99 krb5_xfree(salt.data);
116 * constructing the salt in the string-to-key function.
144 * Note: In Active Directory environments the salt is constructed by truncating
145 * the host name to 15 characters and only use the host svc princ as the salt,
150 * derive the salt by sending an initial authentication exchange.
161 krb5_principal princ = NULL, salt = NULL, f_princ = NULL; local
197 * and only use the host svc princ as the salt,
[all...]

Completed in 84 milliseconds

123