Lines Matching defs:key
159 * Given 21 bytes of random bits, make a triple DES key.
163 des3_make_key(const unsigned char randombits[21], des_cblock key[3])
168 memcpy(&key[i], &randombits[i*7], 7);
169 key[i][7] = (((key[i][0] & 1) << 1) |
170 ((key[i][1] & 1) << 2) |
171 ((key[i][2] & 1) << 3) |
172 ((key[i][3] & 1) << 4) |
173 ((key[i][4] & 1) << 5) |
174 ((key[i][5] & 1) << 6) |
175 ((key[i][6] & 1) << 7));
176 des_fixup_key_parity(&key[i]);
182 * Given the session key in in key, produce a new key in out key using
203 /* loop encrypting the blocks until enough key bytes are generated */
217 /* postprocess the key */
232 * if drived is true we derive a new key
237 HMAC_SHA1_DES3KD_Init(HMAC_SHA1_DES3KD_CTX *ctx, des_cblock key[3], int derive)
244 des3_derive_key(key, ctx->dk, KEY_USAGE_DES3_SIGN, KEY_USAGE_LEN);
246 memcpy(ctx->dk, key, 3*sizeof(des_cblock));