summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/backend/nettle.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/crypto/backend/nettle.rs')
-rw-r--r--openpgp/src/crypto/backend/nettle.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/openpgp/src/crypto/backend/nettle.rs b/openpgp/src/crypto/backend/nettle.rs
index 62c62f4b..7109fa3a 100644
--- a/openpgp/src/crypto/backend/nettle.rs
+++ b/openpgp/src/crypto/backend/nettle.rs
@@ -68,6 +68,8 @@ impl AEADAlgorithm {
=> true,
OCB
=> nettle::aead::OCB_IS_SUPPORTED,
+ GCM
+ => true,
Private(_) | Unknown(_)
=> false,
}
@@ -98,6 +100,17 @@ impl AEADAlgorithm {
SymmetricAlgorithm::Camellia256 => true,
_ => false,
},
+ AEADAlgorithm::GCM =>
+ match algo {
+ SymmetricAlgorithm::AES128 |
+ SymmetricAlgorithm::AES192 |
+ SymmetricAlgorithm::AES256 |
+ SymmetricAlgorithm::Twofish |
+ SymmetricAlgorithm::Camellia128 |
+ SymmetricAlgorithm::Camellia192 |
+ SymmetricAlgorithm::Camellia256 => true,
+ _ => false,
+ },
_ => false
}
}