0
$\begingroup$

I am trying to understand AES-GCM and I do not understand what I should transmit to Auth Data during encryption. What kind of data is that?

enter image description here

$\endgroup$
1
$\begingroup$

Auth Data 1 as shown in the diagram is the optional "Additional Authentication Data". It's optional & need not be passed if your use-case doesn't need it.

You can use it for stuff which is not secret (like version number of your protocol, address of recipients or anything else)

The purpose of AAD is to send information along with the ciphertext that is not encrypted, but cannot be changed because the MAC is computed over the AAD and the ciphertext together.

For e.g. packet headers which are not secret but whose integrity you want to ensure can be there in AAD.

$\endgroup$
1
$\begingroup$

The relationship between Auth Data and Plaintext can be compared with that of a network packet header and payload. Modern ciphers provide provision to "authenticate" additional data that's not encrypted so that more robust protocols can be designed. Of course, if you don't have header, you can pass an empty bit string to it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.