diff options
Diffstat (limited to 'src/lib/prov')
-rw-r--r-- | src/lib/prov/pkcs11/p11_rsa.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/prov/pkcs11/p11_rsa.cpp b/src/lib/prov/pkcs11/p11_rsa.cpp index 331e1d0a7..9e5675301 100644 --- a/src/lib/prov/pkcs11/p11_rsa.cpp +++ b/src/lib/prov/pkcs11/p11_rsa.cpp @@ -163,12 +163,7 @@ class PKCS11_RSA_Decryption_Operation : public PK_Ops::Decryption // Unblind for RSA/RAW decryption if(!m_mechanism.padding_size()) { - secure_vector<byte> unblinded_data = BigInt::encode_locked(m_blinder.unblind(BigInt::decode(decrypted_data))); - - // pad possible leading zeros that were stripped off during conversion to BigInt - secure_vector<byte> padded_result(m_key.get_n().bits() / 8 - unblinded_data.size()); - padded_result.insert(padded_result.end(), unblinded_data.begin(), unblinded_data.end()); - decrypted_data = padded_result; + decrypted_data = BigInt::encode_1363(m_blinder.unblind(BigInt::decode(decrypted_data)), m_key.get_n().bits() / 8 ); } valid_mask = 0xFF; |