Skip to main content

aes_mix_key_kernel

Function aes_mix_key_kernel 

Source
pub fn aes_mix_key_kernel(state: [b8; 16], key: [b8; 16]) -> [b8; 16]
Expand description

Second half of AESENC: MixColumns followed by AddRoundKey.

Uses the XOR-saving form of MixColumns: out[r] = s[r] ⊕ t ⊕ 2·(s[r] ⊕ s[r+1]) ⊕ key[r], with t the XOR of the whole column. It equals the textbook 2·s[r] ⊕ 3·s[r+1] ⊕ s[r+2] ⊕ s[r+3] but shares t across the four rows. Combinational, XOR only.