Lines Matching refs:expkey
512 void aes_expand_key(u8 *key, u8 *expkey) in aes_expand_key() argument
517 memcpy(expkey, key, AES_KEYCOLS * 4); in aes_expand_key()
520 tmp0 = expkey[4*idx - 4]; in aes_expand_key()
521 tmp1 = expkey[4*idx - 3]; in aes_expand_key()
522 tmp2 = expkey[4*idx - 2]; in aes_expand_key()
523 tmp3 = expkey[4*idx - 1]; in aes_expand_key()
537 expkey[4*idx+0] = expkey[4*idx - 4*AES_KEYCOLS + 0] ^ tmp0; in aes_expand_key()
538 expkey[4*idx+1] = expkey[4*idx - 4*AES_KEYCOLS + 1] ^ tmp1; in aes_expand_key()
539 expkey[4*idx+2] = expkey[4*idx - 4*AES_KEYCOLS + 2] ^ tmp2; in aes_expand_key()
540 expkey[4*idx+3] = expkey[4*idx - 4*AES_KEYCOLS + 3] ^ tmp3; in aes_expand_key()
545 void aes_encrypt(u8 *in, u8 *expkey, u8 *out) in aes_encrypt() argument
551 add_round_key((u32 *)state, (u32 *)expkey); in aes_encrypt()
560 (u32 *)expkey + round * AES_STATECOLS); in aes_encrypt()
566 void aes_decrypt(u8 *in, u8 *expkey, u8 *out) in aes_decrypt() argument
574 (u32 *)expkey + AES_ROUNDS * AES_STATECOLS); in aes_decrypt()
579 (u32 *)expkey + round * AES_STATECOLS); in aes_decrypt()