1
$\begingroup$

I have a hard time understanding the purpose of ADATA in GCM algorithm. Is ADATA the plaintext itself we would like to encrypt or is it some random data as for the IV ? Otherwise from what I have understood so far, is that one cannot get the GMAC (i.e. Tag) of some plaintext unless he does encrypt it where the ciphertext is fed to the XOR function. Is that right?

$\endgroup$
2
$\begingroup$

GCM is an algorithm for building an "authenticated encryption with associated data" (AEAD) scheme. The ADATA in the spec refers to associated data. Associated data is auxiliary information or metadata that needs to be in plaintext for functionality reasons (for example, headers in an IP packet) but which needs some integrity guarantees. The idea of AEAD was folklore, but Phil Rogaway introduced it as a design goal for symmetric encryption and formalized security notions for it. See this paper for more details.

$\endgroup$
1
$\begingroup$

I have a hard time understanding the purpose of ADATA in GCM algorithm. Is ADATA the plaintext itself we would like to encrypt or is it some random data as for the IV.

ADATA seems to be the CryptoPP term for the AAD, the additional authenticated data. The AAD is used for any protocol specific data that needs to be authenticated but not encrypted.

An example is the header of a data packet containing the address where to deliver the packet. If it would be encrypted then any router would not be able to view the address. But if isn't MAC'ed then the receiver could not verify it was originally send to them.

The IV is already included in the calculation of the authentication tag so it doesn't need to be included.

Otherwise from what I have understood so far, is that one cannot get the GMAC (i.e. Tag) of some plaintext unless he does encrypt it where the ciphertext is fed to the XOR function. Is that right?

No, you can encrypt an empty plaintext and then include your message in ADATA to create an authentication tag over it. That tag would be different from the one where your message was encrypted though. Here "your message" is any amount of bytes.

$\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.