Skip to content

Commit

Permalink
fix: remove oaep decrypt key size limit (#418) (#441)
Browse files Browse the repository at this point in the history
As per #418, let me know if this is the preferred way or if you'd rather
remove the limit some other way

Co-authored-by: Gabriele Musco <gabmus@disroot.org>
  • Loading branch information
GabMus and Gabriele Musco authored Jul 8, 2024
1 parent fd92bd9 commit c666902
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/oaep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,6 @@ fn decrypt<R: CryptoRngCore + ?Sized>(
mgf_digest: &mut dyn DynDigest,
label: Option<String>,
) -> Result<Vec<u8>> {
key::check_public(priv_key)?;

if ciphertext.len() != priv_key.size() {
return Err(Error::Decryption);
}
Expand Down

0 comments on commit c666902

Please sign in to comment.