diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2023-03-23 17:01:35 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2023-03-24 10:08:31 +0100 |
commit | a57ab94eede982de517c6a07695a33999dac26e3 (patch) | |
tree | 8ee6ff098ceba0b12af8a05412fd6f86e43d1c09 /openpgp/src/crypto/backend | |
parent | 1112af3b3b5aa8daf89690665968959823984cd4 (diff) |
openpgp: Fix IDEA support in Botan.
- Supply key and block size for IDEA. Without that information,
IDEA is not usable in practice.
Diffstat (limited to 'openpgp/src/crypto/backend')
-rw-r--r-- | openpgp/src/crypto/backend/botan/symmetric.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openpgp/src/crypto/backend/botan/symmetric.rs b/openpgp/src/crypto/backend/botan/symmetric.rs index a0fdf562..4b5afd74 100644 --- a/openpgp/src/crypto/backend/botan/symmetric.rs +++ b/openpgp/src/crypto/backend/botan/symmetric.rs @@ -82,6 +82,7 @@ impl SymmetricAlgorithm { /// Fails if Sequoia does not support this algorithm. pub fn key_size(self) -> Result<usize> { match self { + SymmetricAlgorithm::IDEA => Ok(16), SymmetricAlgorithm::TripleDES => Ok(24), SymmetricAlgorithm::CAST5 => Ok(16), // RFC4880, Section 9.2: Blowfish (128 bit key, 16 rounds) @@ -102,6 +103,7 @@ impl SymmetricAlgorithm { /// Fails if Sequoia does not support this algorithm. pub fn block_size(self) -> Result<usize> { match self { + SymmetricAlgorithm::IDEA => Ok(8), SymmetricAlgorithm::TripleDES => Ok(8), SymmetricAlgorithm::CAST5 => Ok(8), SymmetricAlgorithm::Blowfish => Ok(8), |