Home
last modified time | relevance | path

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

1234

/titanic_41/usr/src/lib/crypt_modules/bsdbf/
H A Dbcrypt.c146 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 + 4, 4, "%2.2u$", logr); in encode_salt()
155 encode_base64((uint8_t *)salt + 7, csalt, clen); in encode_salt()
191 bcrypt(key, salt) in bcrypt() argument
193 const char *salt;
206 salt++;
[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_41/usr/src/uts/common/gssapi/mechs/krb5/crypto/arcfour/
H A Dk5_arcfour.c84 krb5_data d1, d2, d3, salt, plaintext, checksum, ciphertext, confounder; local
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.data, l40, salt.length);
185 salt.data[10]=ms_usage & 0xff;
186 salt.data[11]=(ms_usage >> 8) & 0xff;
187 salt.data[12]=(ms_usage >> 16) & 0xff;
188 salt.data[13]=(ms_usage >> 24) & 0xff;
[all …]
/titanic_41/usr/src/lib/libbc/libc/gen/common/
H A Dcrypt.c36 crypt(pw, salt) in crypt() argument
37 char *pw, *salt; in crypt()
54 if (salt[0] == '#' && salt[1] == '#') {
55 if (pwdauth(salt+2, pw) == 0)
56 strcpy(iobuf, salt);
67 if (salt[0] == '#' && salt[1] == '$') {
68 if (grpauth(salt+2, pw) == 0)
69 strcpy(iobuf, salt);
74 return (_crypt(pw, salt));
/titanic_41/usr/src/lib/gss_mechs/mech_krb5/crypto/des/
H A Dstring2key.c52 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->data, salt->length); in mit_des_string_to_key_int()
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()
106 memcpy (password, realm, min (salt->length, 8)); 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
397 c = *salt++; in afs_crypt()
/titanic_41/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
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_41/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->data != NULL) { in pa_enc_timestamp()
640 salt->length); in pa_enc_timestamp()
[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()
191 if ((retval = krb5_principal2salt(context, request->client, &salt))) in krb5_obtain_padata()
196 if ((retval = (*key_proc)(context, enctype, &salt, key_seed, in krb5_obtain_padata()
230 krb5_xfree(salt.data); in krb5_obtain_padata()
[all …]
/titanic_41/usr/src/cmd/ssh/sshd/
H A Dauth-passwd.c102 char *salt; in auth_password()
190 salt = pw_password; in auth_password()
192 salt = "xx"; in auth_password()
195 if (is_md5_salt(salt)) in auth_password()
196 encrypted_password = md5_crypt(password, salt); in auth_password()
198 encrypted_password = crypt(password, salt); in auth_password()
200 encrypted_password = crypt(password, salt); in auth_password()
/titanic_41/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()
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_41/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_41/usr/src/lib/crypt_modules/sha256/
H A Dcrypt_sha.c170 char *salt; in crypt_genhash_impl() local
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()
210 DIGESTUpdate(&ctxA, salt, salt_len); in crypt_genhash_impl()
215 DIGESTUpdate(&ctxB, salt, salt_len); in crypt_genhash_impl()
[all …]
H A Dtest.c33 const char *salt; member
64 const char *salt; member
120 tests2[cnt].input, tests2[cnt].salt, NULL); in main()
/titanic_41/usr/src/grub/grub-0.97/stage2/
H A Dmd5.c210 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, saltlen); in md5_password()
280 p = salt + saltlen + 1; in md5_password()
/titanic_41/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);
144 crypt(const char *plaintext, const char *salt) in crypt() argument
163 if (salt == NULL || salt[0] != '$' || strlen(salt) == 1) { in crypt()
164 return (_unix_crypt(plaintext, salt, ctbuffer)); in crypt()
176 if ((algname = getalgfromsalt(salt)) == NULL) { in crypt()
188 ciphertext = _unix_crypt(plaintext, salt, ctbuffer); in crypt()
191 plaintext, salt, (const char **)alg->a_params); in crypt()
282 getalgfromsalt(const char *salt) in getalgfromsalt() argument
288 if (salt == NULL || strlen(salt) > CRYPT_MAXCIPHERTEXTLEN) in getalgfromsalt()
[all …]
/titanic_41/usr/src/cmd/ssh/libssh/common/
H A Dhostfile.c64 extract_salt(const char *s, u_int l, char *salt, size_t salt_len) in extract_salt() argument
96 ret = __b64_pton(b64salt, (u_char *) salt, salt_len); in extract_salt()
116 char salt[256], result[256], uu_salt[512], uu_result[512]; in host_hash() local
125 salt[i] = arc4random(); in host_hash()
128 if (extract_salt(name_from_hostfile, src_len, salt, in host_hash()
129 sizeof(salt)) == -1) in host_hash()
133 HMAC_Init(&mac_ctx, salt, len, md); in host_hash()
138 if (__b64_ntop((u_char *) salt, len, uu_salt, sizeof(uu_salt)) == -1 || in host_hash()
/titanic_41/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_41/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()
161 krb5_principal princ = NULL, salt = NULL, f_princ = NULL; in krb5_kt_add_ad_entries() local
209 if ((code = krb5_parse_name(ctx, t_host, &salt)) != 0) in krb5_kt_add_ad_entries()
240 code = kt_add_entry(ctx, kt, princ, salt, *tenctype, in krb5_kt_add_ad_entries()
256 if (salt != NULL) in krb5_kt_add_ad_entries()
257 krb5_free_principal(ctx, salt); in krb5_kt_add_ad_entries()
/titanic_41/usr/src/lib/pkcs11/pkcs11_softtoken/common/
H A DsoftKeystore.c70 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()
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) < 0) { in soft_verify_pin()
153 if (soft_gen_hashed_pin(tmp_pin, &user_cryptpin, &salt) < 0) { in soft_verify_pin()
192 if (salt) in soft_verify_pin()
193 free(salt); in soft_verify_pin()
[all …]
/titanic_41/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()
360 code = krb5_c_string_to_key(ctx, enctype, &password, &salt, &key); in kt_add_entry()
365 krb5_xfree(salt.data); in kt_add_entry()
/titanic_41/usr/src/lib/crypt_modules/sunmd5/
H A Dsunmd5.c245 const char *salt, in crypt_genhash_impl() argument
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()
/titanic_41/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_41/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()
782 if (read(infd, salt, sizeof (salt)) in execute_cmd()
783 != sizeof (salt)) { in execute_cmd()
818 rv = pkcs11_get_urandom((void *)salt, sizeof (salt)); in execute_cmd()
883 (size_t)keysize, (void *)salt, sizeof (salt), iterations, in execute_cmd()
938 if (write(outfd, salt, sizeof (salt)) != sizeof (salt)) { in execute_cmd()
/titanic_41/usr/src/lib/smbsrv/libsmbns/common/
H A Dsmbns_ksetpwd.c309 krb5_data salt; in smb_krb5_kt_populate() local
323 code = krb5_principal2salt(ctx, salt_princ, &salt); in smb_krb5_kt_populate()
335 kvno, &salt, passwd) != 0) { in smb_krb5_kt_populate()
337 krb5_xfree(salt.data); in smb_krb5_kt_populate()
345 krb5_xfree(salt.data); in smb_krb5_kt_populate()
394 krb5_enctype enctype, krb5_kvno kvno, const krb5_data *salt, in smb_krb5_kt_addkey() argument
422 code = krb5_c_string_to_key(ctx, enctype, &password, salt, &key); in smb_krb5_kt_addkey()

1234