This PR incorporates and obsoletes #1793 and #1795
Decryption of symmetrically encrypted LibrePGP messages which make used of AEAD (SKESKv5 and OCBEDv1) was failing due to erroneous parsing of the SKESKv5 packet (which does omit some counter octets introduced in v6), plus decryption of the session key from the SKESKv5 packet omits a HKDF step also introduced with v6.
Decryption of asymmetrically encrypted LibrePGP messages using AEAD (PKESKv3 and OCBEDv1 using an ECDH (legacy X25519) was also failing (which took me 3 days or so to get to the bottom of the bug), because it turns out that during the ECDH handshake, the "UserKeyingMaterial" which contains the fingerprint of the recipient key would only get updated with 20 of the 32 fingerprint octets of a v5 key (https://www.ietf.org/archive/id/draft-koch-librepgp-01.html#section-13.5-4.5).
These issues have been fixed and are now covered by test cases.
This PR incorporates and obsoletes #1793 and #1795
Decryption of symmetrically encrypted LibrePGP messages which make used of AEAD (SKESKv5 and OCBEDv1) was failing due to erroneous parsing of the SKESKv5 packet (which does omit some counter octets introduced in v6), plus decryption of the session key from the SKESKv5 packet omits a HKDF step also introduced with v6.
Decryption of asymmetrically encrypted LibrePGP messages using AEAD (PKESKv3 and OCBEDv1 using an ECDH (legacy X25519) was also failing (which took me 3 days or so to get to the bottom of the bug), because it turns out that during the ECDH handshake, the "UserKeyingMaterial" which contains the fingerprint of the recipient key would only get updated with 20 of the 32 fingerprint octets of a v5 key (https://www.ietf.org/archive/id/draft-koch-librepgp-01.html#section-13.5-4.5).
These issues have been fixed and are now covered by test cases.