Page MenuHome GnuPG

GnuPG 2.2.45 (and earlier) always print 0 instead of the actual AEAD algorithm as last part of DECRYPTION_INFO
Testing, NormalPublic

Description

In 2.2.45, decrypt-data.c, line 284, reads

write_status_printf (STATUS_DECRYPTION_INFO, "%d %d %d",
                       ed->mdc_method, dek->algo, 0);

As you can see the information about the actual AEAD algo used is missing and messages that are encrypted with a key created in a newer version of GnuPG which create an AEAD packet, will look like they have no MDC and no AEAD, unless I'm misunderstanding something here.

Is it correct that the line mentioned above should look like this:

write_status_printf (STATUS_DECRYPTION_INFO, "%d %d %d",
                       ed->mdc_method, dek->algo, ed->aead_algo);

as is the case in 2.4.6?

Details

Version
2.2.45

Event Timeline

werner changed the task status from Open to Testing.Nov 21 2024, 9:52 AM
werner added a project: gnupg22.
werner added a subscriber: werner.

You are right. Printing the algo was missing in gnupg22.

[GNUPG:] BEGIN_DECRYPTION
[GNUPG:] DECRYPTION_INFO 0 9 0
[GNUPG:] PLAINTEXT 62 1732178872 
[GNUPG:] PLAINTEXT_LENGTH 72
You will be advanced socially, without any special effort on your part.
[GNUPG:] DECRYPTION_OKAY

After the change

[GNUPG:] BEGIN_DECRYPTION
[GNUPG:] DECRYPTION_INFO 0 9 2
[GNUPG:] PLAINTEXT 62 1732178872 
[GNUPG:] PLAINTEXT_LENGTH 72
You will be advanced socially, without any special effort on your part.
[GNUPG:] DECRYPTION_OKAY
werner triaged this task as Normal priority.Nov 21 2024, 9:55 AM