Closed ronaldtse closed 6 years ago
FYI: I'm happy to take care of this stuff after librepgp
Thanks @flowher ! When do you think we could have this done?
@ronaldtse end of september if I put on hold repgp
. I'm assuming OCB, EAX and GCM implementations are in Botan (which seems to be the case).
But maybe you would prefer have it done quicker (as I'm working only in the evenings, it will take me more time). So than don't hesitate to assign differently.
@flowher we should definitely finish repgp
first. Indeed those implementations are in Botan.
@riboseinc/rnp is anyone interested + have time for AEAD support? Thanks!
@ronaldtse @flowher I can take this after password encryption - anyway I digged into symmetric crypto.
@ronaldtse @dewyatt @flowher
During working on AEAD I got the following questions related to rfc4880bis:
AEAD Encrypted Data Packet (Tag 20). For each chunk, the AEAD construction is given the packet header, version number, cipher algorithm octet, AEAD algorithm octet, chunk size octet, and an eight-octet, big-endian chunk index as additional data.
What is meant under the packet header here? While AEAD construction may be used in SESK, AEAD Encrypted data packet and AEAD encrypted secret key, would this mean that 'packet header' will be the full PGP packet header (i.e. tag + flags + packet length bytes)?
{5.1} Public-Key Encrypted Session Key Packets (Tag 1) ...Zero or more Public-Key Encrypted Session Key packets and/or Symmetric-Key Encrypted Session Key packets may precede a Symmetrically Encrypted Data Packet...
and encrypted data is still the old one - one octet of symmetric algorithm + following symmetric key's octets. Should not this be updated for the AEAD, at least mentioning that this packet may precede AEAD Encrypted Data Packet? Given construction still can be used with AEAD without the changes, but probably some clarification should be made in the RFC draft.
will be the full PGP packet header (i.e. tag + flags + packet length bytes)?
That's how I understand it, but it should be OK as long as same information is available during encryption and decryption, isn't? That's just AAD
Should not this be updated for the AEAD?
Indeed, seems draft wasn't updated yet
BTW, I'd like to point out that the latest 4880bis draft is at 03, which includes our patch to include OCB:
https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-03
@ronaldtse Thanks. OCB looks good, however I think it would be logical to implement it after the AEAD :) Also looks like paragraph with OCB description is missing the clause stating the message IV length (it's logical that it must be 15 octets as a nonce, but)
So @ni4 is pretty much done with AEAD-EAX! This makes RNP the first OpenPGP implementation to support EAX and the new AEAD format in 4880bis 👍
AEAD is implemented for a while so closing this.
Description
rnp should support AEAD, OCB and GCM. In the latest draft only EAX is supported, we should add OCB and GCM.
OpenPGP AEAD is specified in the ongoing draft of RFC 4880-bis: https://gitlab.com/openpgp-wg/rfc4880bis
Relevant file: https://gitlab.com/openpgp-wg/rfc4880bis/blob/master/middle.mkd
Relevant portions below:
Symmetric-Key Encrypted Session Key Packets (Tag 3)
AEAD Encrypted Data Packet (Tag 20)
EAX Mode
AEAD Algorithms