Score:0

Key expansion in AES CTR mode

ls flag

While working with AES 256 in CBC mode, I learned that it requires Key Expansion - forward (for encryption) and reverse (for decryption). Does AES CTR mode also requires such a step ? Or can the 256 bit key be used as is ?

Score:2
my flag

When AES performs an encryption (or decryption) with a key, it internally converts the key into a series of subkeys (either 11, 13 or 15 subkeys, depending on whether you start with a 128 bit, 192 bit or 256 bit AES key). This process is known as key expansion and needs to be done, whether you encrypt and decrypt.

And, yes, this needs to be done for AES-CTR (or any other mode of operation of AES).

Now, when AES is implemented in software, we usually generate the subkeys once (and store them in memory); in hardware, it is not uncommon to generate the subkeys on the fly in parallel with processing the AES block (because the logic to do this on-the-fly generation is cheaper for hardware than storing the subkeys).

shaiko avatar
ls flag
When you're saying "in hardware it's cheaper to calculate than to store" do you mean that the required FPGA / ASIC logic for the expansion is more compact than storing the pre-calculated 128 * 15 bits per AES256 key ?
poncho avatar
my flag
@shaiko: I believe it might be. In addition, some hardware (including the ones I dealt with) can deal with multiple keys; the on-chip hardware to store all those subkeys, or alternatively, to shuffle in the subkeys from off-chip, is rather more expensive than the on-the-fly computation.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.