pub struct DecryptingKey {
inner: PrivateKey,
}Expand description
Decryption key for PKCS#1 v1.5 decryption as described in RFC8017 § 7.2.
Invalid padding returns deterministic synthetic plaintext using the implicit rejection algorithm
documented on super::Pkcs1v15Encrypt. Successful decryption does not establish message
authenticity.
Decryptor::decrypt uses the operating system RNG for blinding when the getrandom
feature is enabled (the default). Otherwise, use RandomizedDecryptor::decrypt_with_rng
to supply an RNG for blinding.
Fields§
§inner: PrivateKeyImplementations§
Source§impl DecryptingKey
impl DecryptingKey
Sourcepub fn new(key: PrivateKey) -> Self
pub fn new(key: PrivateKey) -> Self
Create a new decryption key from an RSA private key.
Trait Implementations§
Source§impl Clone for DecryptingKey
impl Clone for DecryptingKey
Source§fn clone(&self) -> DecryptingKey
fn clone(&self) -> DecryptingKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecryptingKey
impl Debug for DecryptingKey
Source§impl Decryptor for DecryptingKey
impl Decryptor for DecryptingKey
Source§impl EncryptingKeypair for DecryptingKey
impl EncryptingKeypair for DecryptingKey
Source§type EncryptingKey = EncryptingKey
type EncryptingKey = EncryptingKey
Encrypting key type for this keypair.
Source§fn encrypting_key(&self) -> EncryptingKey
fn encrypting_key(&self) -> EncryptingKey
Get the encrypting key which can encrypt messages to be decrypted by
the decryption key portion of this keypair.
Source§impl PartialEq for DecryptingKey
impl PartialEq for DecryptingKey
Source§impl RandomizedDecryptor for DecryptingKey
impl RandomizedDecryptor for DecryptingKey
Source§fn decrypt_with_rng<R: TryCryptoRng + ?Sized>(
&self,
rng: &mut R,
ciphertext: &[u8],
) -> Result<Vec<u8>>
fn decrypt_with_rng<R: TryCryptoRng + ?Sized>( &self, rng: &mut R, ciphertext: &[u8], ) -> Result<Vec<u8>>
Decrypt the given message.
impl StructuralPartialEq for DecryptingKey
impl ZeroizeOnDrop for DecryptingKey
Auto Trait Implementations§
impl Freeze for DecryptingKey
impl RefUnwindSafe for DecryptingKey
impl Send for DecryptingKey
impl Sync for DecryptingKey
impl Unpin for DecryptingKey
impl UnsafeUnpin for DecryptingKey
impl UnwindSafe for DecryptingKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more