Home
last modified time | relevance | path

Searched refs:salt (Results 1 – 25 of 85) sorted by relevance

1234

/titanic_51/usr/src/lib/crypt_modules/bsdbf/
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) in encode_salt() argument
148 salt[0] = '$'; in encode_salt()
149 salt[1] = BCRYPT_VERSION; in encode_salt()
150 salt[2] = 'a'; in encode_salt()
151 salt[3] = '$'; in encode_salt()
153 (void) snprintf(salt in encode_salt()
191 bcrypt(key,salt) bcrypt() argument
[all...]
H A Dbsdbf.c60 const char *salt, in crypt_genhash_impl() argument
63 (void) strlcpy(ctbuffer, bcrypt(plaintext, salt), ctbufflen); in crypt_genhash_impl()
/titanic_51/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; global() local
[all...]
/titanic_51/usr/src/lib/libbc/libc/gen/common/
H A Dcrypt.c36 crypt(pw, salt) in crypt() argument
37 char *pw, *salt; in crypt()
49 * In this case, the salt will start with "##". We should call
51 * the salt, and otherwise return NULL. If salt does not start with
54 if (salt[0] == '#' && salt[1] == '#') {
55 if (pwdauth(salt+2, pw) == 0)
56 strcpy(iobuf, salt);
62 * In this case, the salt wil
[all...]
/titanic_51/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) in mit_des_string_to_key_int() argument
74 if (salt in mit_des_string_to_key_int()
75 && (salt->length == SALT_TYPE_AFS_LENGTH in mit_des_string_to_key_int()
77 || salt->length == (unsigned) -1)) { in mit_des_string_to_key_int()
81 afssalt.data = salt->data; in mit_des_string_to_key_int()
91 length = data->length + (salt ? salt->length : 0); in mit_des_string_to_key_int()
99 if (salt) in mit_des_string_to_key_int()
100 (void) memcpy(copystr + data->length, (char *)salt in mit_des_string_to_key_int()
[all...]
H A Dafsstring2key.c80 const krb5_data *salt) in mit_afs_string_to_key() argument
89 char *realm = salt->data; in mit_afs_string_to_key()
97 returned bytes after the copy of the (fixed) salt. in mit_afs_string_to_key()
106 memcpy (password, realm, min (salt->length, 8)); in mit_afs_string_to_key()
116 /* Out-of-bounds salt characters are equivalent to a salt string in mit_afs_string_to_key()
134 unsigned int pw_len = salt->length+data->length; in mit_afs_string_to_key()
141 for (i=data->length, j = 0; j < salt->length; i++, j++) { in mit_afs_string_to_key()
184 krb5_xfree(salt->data); in mit_afs_string_to_key()
368 char *afs_crypt(const char *pw, const char *salt, in afs_crypt() argument
[all...]
/titanic_51/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, in krb5_c_string_to_key() argument
49 return krb5_c_string_to_key_with_params(context, enctype, string, salt, in krb5_c_string_to_key()
56 const krb5_data *salt, in krb5_c_string_to_key_with_params() argument
74 * the salt in much of the code. However only the DES enctypes can in krb5_c_string_to_key_with_params()
76 if (salt && salt->length == SALT_TYPE_AFS_LENGTH) { in krb5_c_string_to_key_with_params()
101 ret = (*krb5_enctypes_list[i].str2key)(context, enc, string, salt, in krb5_c_string_to_key_with_params()
/titanic_51/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/
H A Dpreauth2.c58 krb5_data *salt, krb5_data *s2kparams,
509 krb5_data *salt, in krb5_run_preauth_plugins() argument
565 gak_fct, gak_data, salt, s2kparams, in krb5_run_preauth_plugins()
593 krb5_data *salt, krb5_data *s2kparams, in pa_salt() argument
604 krb5_free_data_contents(context, salt); in pa_salt()
605 krb5int_copy_data_contents(context, &tmp, salt); in pa_salt()
609 salt->length = SALT_TYPE_AFS_LENGTH; in pa_salt()
620 krb5_data *salt, in pa_enc_timestamp() argument
638 if (salt != NULL && salt in pa_enc_timestamp()
764 pa_sam(krb5_context context,krb5_kdc_req * request,krb5_pa_data * in_padata,krb5_pa_data ** out_padata,krb5_data * salt,krb5_data * s2kparams,krb5_enctype * etype,krb5_keyblock * as_key,krb5_prompter_fct prompter,void * prompter_data,krb5_gic_get_as_key_fct gak_fct,void * gak_data) pa_sam() argument
1035 pa_sam_2(krb5_context context,krb5_kdc_req * request,krb5_pa_data * in_padata,krb5_pa_data ** out_padata,krb5_data * salt,krb5_data * s2kparams,krb5_enctype * etype,krb5_keyblock * as_key,krb5_prompter_fct prompter,void * prompter_data,krb5_gic_get_as_key_fct gak_fct,void * gak_data) pa_sam_2() argument
1405 krb5_do_preauth_tryagain(krb5_context kcontext,krb5_kdc_req * request,krb5_data * encoded_request_body,krb5_data * encoded_previous_request,krb5_pa_data ** padata,krb5_pa_data *** return_padata,krb5_error * err_reply,krb5_data * salt,krb5_data * s2kparams,krb5_enctype * etype,krb5_keyblock * as_key,krb5_prompter_fct prompter,void * prompter_data,krb5_gic_get_as_key_fct gak_fct,void * gak_data,krb5_preauth_client_rock * get_data_rock,krb5_gic_opt_ext * opte) krb5_do_preauth_tryagain() argument
1474 krb5_do_preauth(krb5_context context,krb5_kdc_req * request,krb5_data * encoded_request_body,krb5_data * encoded_previous_request,krb5_pa_data ** in_padata,krb5_pa_data *** out_padata,krb5_data * salt,krb5_data * s2kparams,krb5_enctype * etype,krb5_keyblock * as_key,krb5_prompter_fct prompter,void * prompter_data,krb5_gic_get_as_key_fct gak_fct,void * gak_data,krb5_preauth_client_rock * get_data_rock,krb5_gic_opt_ext * opte) krb5_do_preauth() argument
[all...]
H A Dpreauth.c144 krb5_data salt; in krb5_obtain_padata() local
177 salt.data = 0; in krb5_obtain_padata()
178 salt.length = SALT_TYPE_NO_LENGTH; in krb5_obtain_padata()
181 salt.data = (char *) etype_info[0]->salt; in krb5_obtain_padata()
183 salt.length = SALT_TYPE_NO_LENGTH; /* XXX */ in krb5_obtain_padata()
185 salt.length = etype_info[0]->length; in krb5_obtain_padata()
187 if (salt.length == SALT_TYPE_NO_LENGTH) { in krb5_obtain_padata()
189 * This will set the salt length in krb5_obtain_padata()
191 if ((retval = krb5_principal2salt(context, request->client, &salt))) in krb5_obtain_padata()
334 krb5_data salt; process_pw_salt() local
[all...]
/titanic_51/usr/src/lib/gss_mechs/mech_krb5/crypto/dk/
H A Dstringtokey.c42 const krb5_data *string, const krb5_data *salt, in krb5int_dk_string_to_key() argument
56 concatlen = string->length+(salt?salt->length:0); in krb5int_dk_string_to_key()
70 /* construct input string ( = string + salt), fold it, make_key it */ in krb5int_dk_string_to_key()
73 if (salt) in krb5int_dk_string_to_key()
74 memcpy(concat+string->length, salt->data, salt->length); in krb5int_dk_string_to_key()
/titanic_51/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, in krb5int_des_string_to_key() argument
56 return(mit_des_string_to_key_int(context, key, string, salt)); in krb5int_des_string_to_key()
59 return mit_afs_string_to_key(context, key, string, salt); in krb5int_des_string_to_key()
/titanic_51/usr/src/lib/crypt_modules/sha256/
H A Dcrypt_sha.c170 char *salt; in crypt_genhash_impl() local
183 /* Refine the salt */ in crypt_genhash_impl()
184 salt = (char *)switchsalt; in crypt_genhash_impl()
187 if (strncmp((char *)salt, crypt_alg_magic, crypt_alg_magic_len) == 0) { in crypt_genhash_impl()
188 salt += crypt_alg_magic_len + 1; in crypt_genhash_impl()
191 srounds = getrounds(salt); in crypt_genhash_impl()
195 p = strchr(salt, '$'); in crypt_genhash_impl()
197 salt = p + 1; in crypt_genhash_impl()
200 salt_len = MIN(strcspn(salt, "$"), MAX_SALT_LEN); in crypt_genhash_impl()
209 /* 3. Then the raw salt */ in crypt_genhash_impl()
[all...]
H A Dtest.c33 const char *salt; member
51 "we have a short salt string but not a short password",
64 const char *salt; member
83 "we have a short salt string but not a short password",
120 tests2[cnt].input, tests2[cnt].salt, NULL); in main()
/titanic_51/usr/src/grub/grub-0.97/stage2/
H A Dmd5.c205 CRYPTED must have a salt. */
210 char *salt = crypted + 3; /* skip $1$ header */ in md5_password() local
224 saltlen = strstr (salt, "$") - salt; in md5_password()
228 char *end = strstr (salt, "$"); in md5_password()
229 if (end && end - salt < 8) in md5_password()
230 saltlen = end - salt; in md5_password()
234 salt[saltlen] = '$'; in md5_password()
239 md5_update (salt, saltlen); in md5_password()
268 md5_update (salt, saltle in md5_password()
[all...]
/titanic_51/usr/src/lib/libc/port/gen/
H A Dcrypt.c114 static char *getalgfromsalt(const char *salt);
119 static char *_unix_crypt(const char *pw, const char *salt, char *iobuf);
129 * as passwords. It generates the password hash given the plaintext and salt.
131 * If the first character of salt is "$" then we use crypt.conf(4) to
144 crypt(const char *plaintext, const char *salt) in crypt() argument
158 * '$' is never a possible salt char with the traditional unix in crypt()
159 * algorithm. If the salt passed in is NULL or the first char in crypt()
160 * of the salt isn't a $ then do the traditional thing. in crypt()
161 * We also do the traditional thing if the salt is only 1 char. in crypt()
163 if (salt in crypt()
282 getalgfromsalt(const char * salt) getalgfromsalt() argument
1065 _unix_crypt(const char * pw,const char * salt,char * iobuf) _unix_crypt() argument
[all...]
/titanic_51/usr/src/cmd/makekey/
H A Dmakekey.c46 char salt[2]; in main() local
49 (void) read(0, salt, 2); in main()
50 (void) write(1, crypt(key, salt), 13); in main()
/titanic_51/usr/src/lib/gss_mechs/mech_krb5/krb5/keytab/
H A Dkt_solaris.c74 krb5_data password, salt; in kt_add_entry() local
84 if ((code = krb5_principal2salt(ctx, svc_princ, &salt)) != 0) { in kt_add_entry()
88 if ((krb5_c_string_to_key(ctx, enctype, &password, &salt, &key)) != 0) in kt_add_entry()
99 krb5_xfree(salt.data); in kt_add_entry()
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; in krb5_kt_add_ad_entries() local
197 * and only use the host svc princ as the salt, in krb5_kt_add_ad_entries()
[all...]
/titanic_51/usr/src/uts/common/fs/zfs/
H A Dskein_zfs.c70 zio_checksum_skein_tmpl_init(const zio_cksum_salt_t *salt) in zio_checksum_skein_tmpl_init() argument
76 salt->zcs_bytes, sizeof (salt->zcs_bytes)); in zio_checksum_skein_tmpl_init()
H A Dedonr_zfs.c67 zio_checksum_edonr_tmpl_init(const zio_cksum_salt_t *salt) in zio_checksum_edonr_tmpl_init() argument
74 * blocks, but the salt is too small. Rather than simply padding it in zio_checksum_edonr_tmpl_init()
75 * with zeros, we expand the salt into a new salt block of proper in zio_checksum_edonr_tmpl_init()
76 * size by double-hashing it (the new salt block will be composed of in zio_checksum_edonr_tmpl_init()
77 * H(salt) || H(H(salt))). in zio_checksum_edonr_tmpl_init()
80 EdonRHash(EDONR_MODE, salt->zcs_bytes, sizeof (salt->zcs_bytes) * 8, in zio_checksum_edonr_tmpl_init()
86 * Feed the new salt bloc in zio_checksum_edonr_tmpl_init()
[all...]
/titanic_51/usr/src/lib/pkcs11/pkcs11_softtoken/common/
H A DsoftKeystore.c55 * salt: input argument (if non-NULL), or
57 * address of pointer to the "salt" of the hashed pin
70 soft_gen_hashed_pin(CK_UTF8CHAR_PTR pPin, char **result, char **salt) in soft_gen_hashed_pin() argument
87 if (*salt == NULL) { in soft_gen_hashed_pin()
90 * crypt_gensalt() will allocate memory to store the new salt. in soft_gen_hashed_pin()
95 if ((*salt = crypt_gensalt("$5", pw)) == NULL) { in soft_gen_hashed_pin()
100 if ((*result = crypt((char *)pPin, *salt)) == NULL) { in soft_gen_hashed_pin()
102 free(*salt); in soft_gen_hashed_pin()
118 char *salt = NULL; in soft_verify_pin() local
136 if (soft_keystore_get_pin_salt(&salt) < in soft_verify_pin()
212 char *salt = NULL; soft_setpin() local
1996 CK_BYTE salt[PBKD2_SALT_SIZE]; soft_gen_crypt_key() local
2121 CK_BYTE salt[PBKD2_SALT_SIZE]; soft_gen_hmac_key() local
[all...]
/titanic_51/usr/src/lib/crypt_modules/sunmd5/
H A Dsunmd5.c191 * was in the old salt use that, otherwise keep what was in the in crypt_gensalt_impl()
192 * old salt. in crypt_gensalt_impl()
245 const char *salt, in crypt_genhash_impl() argument
282 * Extract the puresalt (if it exists) from the existing salt string in crypt_genhash_impl()
285 saltend = strrchr(salt, '$'); in crypt_genhash_impl()
286 if (saltend == NULL || saltend == salt) { in crypt_genhash_impl()
290 size_t len = saltend - salt + 1; in crypt_genhash_impl()
294 (void) strlcpy(puresalt, salt, len); in crypt_genhash_impl()
296 puresalt = strdup(salt); in crypt_genhash_impl()
302 maxrounds += getrounds(salt); in crypt_genhash_impl()
[all...]
/titanic_51/usr/src/cmd/krb5/kadmin/kclient/
H A Dksetpw.c58 krb5_principal victim, salt; in main() local
150 code = krb5_parse_name(ctx, vprincstr, &salt); in main()
248 kt_add_entry(ctx, kt, victim, salt, enctypes[i], kvno, newpw); in main()
334 krb5_data password, salt; in kt_add_entry() local
354 if ((code = krb5_principal2salt(ctx, sprinc, &salt)) != 0) { in kt_add_entry()
356 gettext("Could not compute salt for %s"), enctype); in kt_add_entry()
360 code = krb5_c_string_to_key(ctx, enctype, &password, &salt, &key); in kt_add_entry()
363 com_err(whoami, code, gettext("Could not compute salt for %s"), in kt_add_entry()
365 krb5_xfree(salt.data); in kt_add_entry()
/titanic_51/usr/src/lib/libast/common/uwin/
H A Dcrypt.c684 static int des_cipher(const char *in, char *out, long salt, int num_iter) { in des_cipher() argument
694 L0 = salt; in des_cipher()
695 TO_SIX_BIT(salt, L0); /* convert to 4*(6+2) format */ in des_cipher()
698 salt = ~salt; /* "x &~ y" is faster than "x & y". */ in des_cipher()
699 #define SALT (~salt) in des_cipher()
701 #define SALT salt in des_cipher()
847 long salt; in crypt() local
904 salt = 0; in crypt()
909 salt = (salt<<6) | a64toi[t]; in crypt()
913 salt, num_iter)) in crypt()
/titanic_51/usr/src/contrib/ast/src/lib/libast/uwin/
H A Dcrypt.c159 * "salt" are also converted to this 8*(6+2) format. The SPE table size is
229 * The Bell Labs "salt" (Bob Baldwin):
232 * Specifically, if bit i (1 <= i <= 24) of the salt is set then bits i and
233 * i+24 of the result are swapped. The salt is thus a 24 bit number, with
234 * 16777216 possible values. (The original salt was 12 bits and could not
237 * It is possible, but ugly, to warp the SPE table to account for the salt
678 * iterations of DES, using the the given 24-bit salt and the pre-computed key
684 static int des_cipher(const char *in, char *out, long salt, int num_iter) { in des_cipher() argument
694 L0 = salt; in des_cipher()
695 TO_SIX_BIT(salt, L in des_cipher()
847 long salt; crypt() local
[all...]
/titanic_51/usr/src/cmd/cmd-crypto/decrypt/
H A Ddecrypt.c428 CK_BYTE salt[CK_PKCS5_PBKD2_SALT_SIZE]; in execute_cmd() local
503 bzero(salt, sizeof (salt)); in execute_cmd()
764 * Read iteration count and salt data. in execute_cmd()
782 if (read(infd, salt, sizeof (salt)) in execute_cmd()
783 != sizeof (salt)) { in execute_cmd()
785 "failed to get salt data from " in execute_cmd()
803 * salt data to create the key. If decrypting, in execute_cmd()
804 * the salt shoul in execute_cmd()
[all...]

1234