diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2022-01-10 16:35:54 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2022-02-17 16:11:38 +0100 |
commit | 984f4c6b8040fc969f54ddf1f8b726f94ffd2383 (patch) | |
tree | 020a0333d46625cbfccb4b9576b279d44a95c332 /openpgp/src/crypto/aead.rs | |
parent | 442f766d6f294399b8986656e942fa1740e22438 (diff) |
openpgp: Implement GCM mode.justus/openpgp-next-gcm
- The Galois/Counter mode for block ciphers is a FIPS-approved AEAD
mode. It will be added to the upcoming OpenPGP standard so that
we have a FIPS-compliant subset of OpenPGP.
- Currently, this is only implemented by the Nettle backend.
Diffstat (limited to 'openpgp/src/crypto/aead.rs')
-rw-r--r-- | openpgp/src/crypto/aead.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openpgp/src/crypto/aead.rs b/openpgp/src/crypto/aead.rs index e602c3a1..5c933fda 100644 --- a/openpgp/src/crypto/aead.rs +++ b/openpgp/src/crypto/aead.rs @@ -89,6 +89,7 @@ impl AEADAlgorithm { EAX => Ok(16), // According to RFC4880bis, Section 5.16.2. OCB => Ok(16), + GCM => Ok(16), _ => Err(Error::UnsupportedAEADAlgorithm(*self).into()), } } @@ -103,6 +104,7 @@ impl AEADAlgorithm { // least 15 octets long". GnuPG hardcodes 15 in // openpgp_aead_algo_info. OCB => Ok(15), + GCM => Ok(12), _ => Err(Error::UnsupportedAEADAlgorithm(*self).into()), } } |