Lines Matching refs:key

34  *	Initialise the key schedule from the user supplied key. The key
39 * The following macros implement a single cycle in the key
89 aes_encrypt_key128(const unsigned char *key, uint32_t rk[])
93 rk[0] = ss[0] = word_in(key, 0);
94 rk[1] = ss[1] = word_in(key, 1);
95 rk[2] = ss[2] = word_in(key, 2);
96 rk[3] = ss[3] = word_in(key, 3);
129 aes_encrypt_key192(const unsigned char *key, uint32_t rk[])
133 rk[0] = ss[0] = word_in(key, 0);
134 rk[1] = ss[1] = word_in(key, 1);
135 rk[2] = ss[2] = word_in(key, 2);
136 rk[3] = ss[3] = word_in(key, 3);
137 rk[4] = ss[4] = word_in(key, 4);
138 rk[5] = ss[5] = word_in(key, 5);
173 aes_encrypt_key256(const unsigned char *key, uint32_t rk[])
177 rk[0] = ss[0] = word_in(key, 0);
178 rk[1] = ss[1] = word_in(key, 1);
179 rk[2] = ss[2] = word_in(key, 2);
180 rk[3] = ss[3] = word_in(key, 3);
181 rk[4] = ss[4] = word_in(key, 4);
182 rk[5] = ss[5] = word_in(key, 5);
183 rk[6] = ss[6] = word_in(key, 6);
184 rk[7] = ss[7] = word_in(key, 7);
202 * Expand the cipher key into the encryption key schedule.
204 * Return the number of rounds for the given cipher key size.
205 * The size of the key schedule depends on the number of rounds
206 * (which can be computed from the size of the key), i.e. 4 * (Nr + 1).
209 * rk AES key schedule 32-bit array to be initialized
210 * cipherKey User key
211 * keyBits AES key size (128, 192, or 256 bits)
327 aes_decrypt_key128(const unsigned char *key, uint32_t rk[])
333 rk[v(40, (0))] = ss[0] = word_in(key, 0);
334 rk[v(40, (1))] = ss[1] = word_in(key, 1);
335 rk[v(40, (2))] = ss[2] = word_in(key, 2);
336 rk[v(40, (3))] = ss[3] = word_in(key, 3);
407 aes_decrypt_key192(const unsigned char *key, uint32_t rk[])
413 rk[v(48, (0))] = ss[0] = word_in(key, 0);
414 rk[v(48, (1))] = ss[1] = word_in(key, 1);
415 rk[v(48, (2))] = ss[2] = word_in(key, 2);
416 rk[v(48, (3))] = ss[3] = word_in(key, 3);
419 ss[4] = word_in(key, 4);
421 ss[5] = word_in(key, 5);
428 rk[v(48, (4))] = ss[4] = word_in(key, 4);
429 rk[v(48, (5))] = ss[5] = word_in(key, 5);
505 aes_decrypt_key256(const unsigned char *key, uint32_t rk[])
511 rk[v(56, (0))] = ss[0] = word_in(key, 0);
512 rk[v(56, (1))] = ss[1] = word_in(key, 1);
513 rk[v(56, (2))] = ss[2] = word_in(key, 2);
514 rk[v(56, (3))] = ss[3] = word_in(key, 3);
517 ss[4] = word_in(key, 4);
519 ss[5] = word_in(key, 5);
521 ss[6] = word_in(key, 6);
523 ss[7] = word_in(key, 7);
530 rk[v(56, (4))] = ss[4] = word_in(key, 4);
531 rk[v(56, (5))] = ss[5] = word_in(key, 5);
532 rk[v(56, (6))] = ss[6] = word_in(key, 6);
533 rk[v(56, (7))] = ss[7] = word_in(key, 7);
550 * Expand the cipher key into the decryption key schedule.
552 * Return the number of rounds for the given cipher key size.
553 * The size of the key schedule depends on the number of rounds
554 * (which can be computed from the size of the key), i.e. 4 * (Nr + 1).
557 * rk AES key schedule 32-bit array to be initialized
558 * cipherKey User key
559 * keyBits AES key size (128, 192, or 256 bits)