diff options
author | Igor Matuszewski <igor@sequoia-pgp.org> | 2020-10-06 12:05:58 +0200 |
---|---|---|
committer | Igor Matuszewski <igor@sequoia-pgp.org> | 2020-10-06 12:05:58 +0200 |
commit | 2ce9716ae2ec7d5a2a7d8861b62557b13a193e0e (patch) | |
tree | 400f3f76728d4f6a3232776d112a3cca1b576910 /openpgp/src | |
parent | 9b399d5d251999398dfbc40847696191dfccce96 (diff) |
openpgp: Use padding instead of alignment in one more place
Diffstat (limited to 'openpgp/src')
-rw-r--r-- | openpgp/src/crypto/backend/cng/asymmetric.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/crypto/backend/cng/asymmetric.rs b/openpgp/src/crypto/backend/cng/asymmetric.rs index b5a3fe1e..c2fd0647 100644 --- a/openpgp/src/crypto/backend/cng/asymmetric.rs +++ b/openpgp/src/crypto/backend/cng/asymmetric.rs @@ -324,8 +324,8 @@ impl Decryptor for KeyPair { } )?; - // CNG expects RSA ciphertexts to be aligned to 8 bytes. Since - // this is a big endian MPI, left-pad with zeroes as necessary + // CNG expects RSA ciphertext length to be a multiple of 8 + // bytes. Since this is a big endian MPI, left-pad it with zeros let mut _c: Protected = Protected::from(Vec::new()); let missing = (8 - (c.value().len() % 8)) % 8; let c = if missing > 0 { |