Score:0

AES GCM Difference between the IV and the Secret Key?

al flag

Below is part of AES GCM diagram. However, it only shows the behavior of the IV/counter.

The GCM specification examples state both an IV and a Secret Key as two inputs.

Can someone please explain where both are used?

Is the 96 bit IV expanded to 128 bits, incremented (most-significant byte?) and used to create the AES Key Expansion?

And the Secret Key is passed (with the Key Expansion) to E_k for encryption?

enter image description here

Score:2
my flag

And the Secret Key is passed (with the Key Expansion) to E_k for encryption?

Yes, the key is given to the block cipher - it is indeed the $k$ in $E_k$

user997112 avatar
al flag
Awesome, thanks! And am I right the 96 bit IV is expanded to 128 bits at the beginning and then the most significant byte is incremented, before then being used to generate the expansion?
poncho avatar
my flag
@user997112: actually, with 96 bit IVs (GCM supports other IV sizes; those are rarely used), the IV is used as the top 96 bits (counting bits in bigendian order) of the AES input; the lower 32 bits is a counter (which is 1 for generating the mask for the tag; 2 for encrypting the first plaintext block; 3 for the second, etc). Hence, it is the least significant byte which is incremented (again, counting 'least' in bigendian order)
user997112 avatar
al flag
Lets say our IV is all zeros. This value is only used for the hashing (as you mentioned). The IV is then incremented. Does `iv[0]` contain 1, or is it `iv[15]`?
poncho avatar
my flag
@user997112: well, for IV - 96 0 bits, the value given to AES to generate the tag mask has iv as all zeros except iv[15] = 1.
user997112 avatar
al flag
I've asked the problem in a new question, if you could take a glance: https://crypto.stackexchange.com/questions/104243/implementing-aes-gcm-but-not-getting-correct-output-from-cipher-block
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.