Lines Matching refs:secret

73 static uchar_t TLS_MASTER_SECRET_LABEL[] = {"master secret"};
88 static void P_MD5(uchar_t *secret, uint_t secretlen, uchar_t *label,
91 static void P_SHA1(uchar_t *secret, uint_t secretlen, uchar_t *label,
98 static void soft_ssl_weaken_key(CK_MECHANISM_PTR mech, uchar_t *secret,
104 * Called for derivation of the master secret from the pre-master secret,
109 soft_ssl3_churn(uchar_t *secret, uint_t secretlen, uchar_t *rand1,
122 SHA1Update(&sha1_ctx, secret, secretlen);
128 MD5Update(&md5_ctx, secret, secretlen);
137 * {secret, label, seed} into any arbitrary length string of pseudo
139 * Here, it is called for the derivation of the master secret from the
140 * pre-master secret, and for the derivation of the key_block in a TLS
144 soft_tls_prf(uchar_t *secret, uint_t secretlen, uchar_t *label, uint_t labellen,
153 /* secret is NULL for IV's in exportable ciphersuites */
154 if (secret == NULL) {
165 S1 = secret;
166 S2 = secret + (secretlen / 2); /* Possible overlap of S1 and S2. */
187 * PRF(secret, label, seed) = P_MD5(S1, label + seed) XOR
206 * P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed) +
207 * HMAC_hash(secret, A(2) + seed) +
208 * HMAC_hash(secret, A(3) + seed) + ...
212 * A(i) = HMAC_hash(secret, A(i-1))
217 P_MD5(uchar_t *secret, uint_t secretlen, uchar_t *label, uint_t labellen,
235 bcopy(secret, md5_ipad, secretlen);
236 bcopy(secret, md5_opad, secretlen);
239 /* A(1) = HMAC_MD5(secret, rand1 + rand2) */
255 * Compute HMAC_MD5(secret, A(i) + seed);
256 * The secret is already expanded in the ictx and octx, so
289 /* A(i) = HMAC_MD5(secret, A(i-1) */
297 P_SHA1(uchar_t *secret, uint_t secretlen, uchar_t *label, uint_t labellen,
315 bcopy(secret, sha1_ipad, secretlen);
316 bcopy(secret, sha1_opad, secretlen);
319 /* A(1) = HMAC_SHA1(secret, rand1 + rand2) */
335 * Compute HMAC_SHA1(secret, A(i) + seed);
336 * The secret is already expanded in the ictx and octx, so
370 /* A(i) = HMAC_SHA1(secret, A(i-1) */
403 * . basekey_p: The pre-master secret key.
409 * Derive the SSL master secret from the pre-master secret, the client
420 * PRF(pre_master_secret, "master secret",
469 /* Get the SSL version number from the premaster secret */
511 /* Now the actual secret derivation */
602 * . basekey_p: The master secret key.
608 * keys and IVs), from the master secret and the client
749 /* Now the actual secret derivation */
1060 soft_ssl_weaken_key(CK_MECHANISM_PTR mech, uchar_t *secret, uint_t secretlen,
1070 MD5Update(&exp_md5_ctx, secret, secretlen);
1078 soft_tls_prf(secret, secretlen, label, labellen,
1083 soft_tls_prf(secret, secretlen, label, labellen,