summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Matuszewski <igor@sequoia-pgp.org>2020-10-06 12:05:58 +0200
committerIgor Matuszewski <igor@sequoia-pgp.org>2020-10-06 12:05:58 +0200
commit2ce9716ae2ec7d5a2a7d8861b62557b13a193e0e (patch)
tree400f3f76728d4f6a3232776d112a3cca1b576910
parent9b399d5d251999398dfbc40847696191dfccce96 (diff)
openpgp: Use padding instead of alignment in one more place
-rw-r--r--openpgp/src/crypto/backend/cng/asymmetric.rs4
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 {