8 bytes issue . . .
Kahil D. Jallad
kdj4 at cs.columbia.edu
Mon Apr 2 06:52:05 CEST 2001
After looking at the code, I think this is actually a bug - build-packet
assumes that all ciphers have a blocksize of 8 for encrypted packets (both
with and without MDC), so it says the Symmetric Key Encrypted Packet is
(data_size + 10) bytes long regardless of the blocksize of the alorithm.
(I'm using the default, AES with blocksize 16.)
I'm not too good at writing C, or I'd propose a fix . . .I think the
PKT_encrypted struct needs to have algorithm info added.
(The problem comes from lines 533 and 554 of build_packet.c)
Encryption/Decryption still works, so I think this is only an issue
for OpenPGP compliance . . . also, I'm not using compression, which I
assume is rare . . .
>"gpg -v --output secret.txt --openpgp -z 0 -e data.txt"
>The file seems to be eight bytes longer than it should be, according to
>the packet headers. The message syntax, according to OpenPGP, is :
>Public Key Encrypted Session Key Packet, Symmetrically Encrypted Data
>When I look at a hex dump of the file "secret.txt", I see the headers for
>the two packets (and gpg --list-packets confirms the lengths seen in the
>headers) but the Symmetrically Encrypted Data Packet is eight bytes too
More information about the Gnupg-devel