Padding scheme used for encryption.
| 9 | |
| 10 | /// Padding scheme used for encryption. |
| 11 | pub trait PaddingScheme { |
| 12 | /// Decrypt the given message using the given private key. |
| 13 | /// |
| 14 | /// If an `rng` is passed, it uses RSA blinding to help mitigate timing side-channel attacks. |
| 15 | #[allow(clippy::missing_errors_doc, reason = "TODO")] |
| 16 | fn decrypt<Rng: TryCryptoRng + ?Sized>( |
| 17 | self, |
| 18 | rng: Option<&mut Rng>, |
| 19 | priv_key: &PrivateKey, |
| 20 | ciphertext: &[u8], |
| 21 | ) -> Result<Vec<u8>>; |
| 22 | |
| 23 | /// Encrypt the given message using the given public key. |
| 24 | #[allow(clippy::missing_errors_doc, reason = "TODO")] |
| 25 | fn encrypt<Rng: TryCryptoRng + ?Sized>( |
| 26 | self, |
| 27 | rng: &mut Rng, |
| 28 | pub_key: &PublicKey, |
| 29 | msg: &[u8], |
| 30 | ) -> Result<Vec<u8>>; |
| 31 | } |
| 32 | |
| 33 | /// Digital signature scheme. |
| 34 | pub trait SignatureScheme { |
nothing calls this directly
no outgoing calls
no test coverage detected