Lines Matching refs:expkey
537 void aes_expand_key(u8 *key, u32 key_len, u8 *expkey) in aes_expand_key() argument
545 memcpy(expkey, key, key_len); in aes_expand_key()
548 tmp0 = expkey[4*idx - 4]; in aes_expand_key()
549 tmp1 = expkey[4*idx - 3]; in aes_expand_key()
550 tmp2 = expkey[4*idx - 2]; in aes_expand_key()
551 tmp3 = expkey[4*idx - 1]; in aes_expand_key()
565 expkey[4*idx+0] = expkey[4*idx - 4*aes_keycols + 0] ^ tmp0; in aes_expand_key()
566 expkey[4*idx+1] = expkey[4*idx - 4*aes_keycols + 1] ^ tmp1; in aes_expand_key()
567 expkey[4*idx+2] = expkey[4*idx - 4*aes_keycols + 2] ^ tmp2; in aes_expand_key()
568 expkey[4*idx+3] = expkey[4*idx - 4*aes_keycols + 3] ^ tmp3; in aes_expand_key()
573 void aes_encrypt(u32 key_len, u8 *in, u8 *expkey, u8 *out) in aes_encrypt() argument
581 add_round_key((u32 *)state, (u32 *)expkey); in aes_encrypt()
590 (u32 *)expkey + round * AES_STATECOLS); in aes_encrypt()
596 void aes_decrypt(u32 key_len, u8 *in, u8 *expkey, u8 *out) in aes_decrypt() argument
606 (u32 *)expkey + aes_rounds * AES_STATECOLS); in aes_decrypt()
611 (u32 *)expkey + round * AES_STATECOLS); in aes_decrypt()