summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/asymmetric.rs
AgeCommit message (Collapse)Author
2020-08-04openpgp: Improve documentation of mod asymmetric.Justus Winter
- See #474.
2020-06-22openpgp: Move Nettle asymmetric impls to the backend moduleIgor Matuszewski
2020-04-08openpgp: Rename crypto::mpis to crypto::mpiIgor Matuszewski
To be consistent; we don't use plural forms for modules anywhere else and Rust always uses singular forms.
2020-04-03Change function names to align to Rust naming conventions.Wiktor Kwapisiewicz
- Change `mark_parts_public` to `parts_into_public`, - Change `mark_parts_public_ref` to `parts_as_public`, - Change `mark_parts_secret` to `parts_into_secret`, - Change `mark_parts_secret_ref` to `parts_as_secret`, - Change `mark_parts_unspecified` to `parts_into_unspecified`, - Change `mark_parts_unspecified_ref` to `parts_as_unspecified`, - Fixes #452.
2020-03-26Remove redundant field names.Wiktor Kwapisiewicz
2020-03-10openpgp: Appease superfluous check in nettle wrapper.Justus Winter
- Make sure that the ciphertext is at least as large as the modulus. - Fixes #440.
2020-03-09openpgp: Update nettle to 7.0.0.Justus Winter
2020-03-09openpgp: Decouple our error type from nettle's.Justus Winter
2020-02-20openpgp: Typo.Justus Winter
2020-02-18openpgp: Improve tracking of secret keys.Justus Winter
- We use marker traits to track with the type system if a Key has secret key material attached. Previously, it was possible to subvert that by taking the secret key material using Key4::set_secret, creating a Key4<SecretParts, ..> without any secrets. - Related, the accessor functions returned an Option<SecretKeyMaterial> even for Key4<SecretParts, ..>. - Replace set_secret by add_secret and take_secret that also change the Key's type accordingly. Make the accessors infallible if we know we have a secret key, rename Key4<P, R>::secret to Key4<P, R>::optional_secret to make the distinction clear. - Fixes #435.
2020-02-12openpgp: Add optional plaintext length to Decryptor::decrypt.Justus Winter
- If we know the length of the plaintext, we can reduce the side-channel leakage of the RSA decryption operation.
2020-02-12openpgp: Update to nettle 6.Justus Winter
2020-01-16openpgp: Return Result<()> from Signature::verify*.Justus Winter
2020-01-16openpgp: Move the high-level methods to packet::Signature.Justus Winter
- Signature4 is only a storage format. The high-level functionality should be implemented on the version enum.
2020-01-16openpgp: Consolidate public key verification code.Justus Winter
2020-01-16openpgp: Consolidate public key encryption code.Justus Winter
2019-12-05openpgp: Make crypto::{Signer,Decryptor} non-polymorphic.Justus Winter
- These are low-level cryptographic traits that are not concerned with the role of a key. - Fixes #382.
2019-11-25openpgp: Rename openpgp::constants to openpgp::types.Justus Winter
- Fixes #381.
2019-11-22openpgp: Make conversions into Key<SecretParts, _> fallible.Justus Winter
- Fixes #380.
2019-11-19openpgp: Use the builder pattern for stream::Signer.Justus Winter
- See #375.
2019-08-23openpgp: Use marker types to denote a Key's type.Neal H. Walfield
- In addition to providing some added protection, this allows us to implement 'From<Key<_, _>> for Packet'.
2019-08-23openpgp: Rename SecretKey to SecretKeyMaterial.Neal H. Walfield
- When the `SecretKey` type only refers to the secret key material and not a TPK-like thing, call it `SecretKeyMaterial`.
2019-08-21openpgp: Typos.Jann Röder
2019-08-21openpgp: Fix warnings emitted by rustc 1.36.0.Jann Röder
2019-07-16openpgp: Rework unencrypted secret key handling.Justus Winter
- Instead of giving out references to the stored secret, use a new function Unencrypted::map that maps a given function over the secret. This allows us to encrypt the secret, and decrypt it on demand.
2019-07-15Prepare for Rust 2018.Justus Winter
- This is the result of running `cargo fix --edition`, with some manual adjustments. - The vast majority of changes merely qualify module paths with 'crate::'. - Two instances of adding an anonymous pattern to a trait's function. - `async` is a keyword in Rust 2018, and hence it needs to be escaped (e.g. in the case of the net::r#async module). - The manual adjustments were needed due to various shortcomings of the analysis employed by `cargo fix`, e.g. unexpanded macros, procedural macros, lalrpop grammars.
2019-06-28openpgp: Make struct MPI opaque.Justus Winter
2019-06-27openpgp: Rework secret key handling.Justus Winter
- Introduce two new types, `Encrypted` and `Unencrypted`, to make the fields of enum `SecretKey` private. Add accessors, implement From<..> to make the new types ergonomic to use, update callsites.
2019-06-26openpgp: Improve documentation.Justus Winter
2019-06-24openpgp: Use SessionKey to protect secrets during ECDH.Justus Winter
2019-06-24openpgp: Rename functions to 'encrypt' and 'decrypt'.Justus Winter
2019-06-24openpgp: Fix error.Justus Winter
2019-06-01openpgp: Implement Clone for KeyPair.Justus Winter
2019-06-01openpgp: Implement From<KeyPair> for packet::Key.Justus Winter
2019-06-01openpgp: Fix documentation.Justus Winter
2019-05-30openpgp: New trait crypto::Decryptor.Justus Winter
2019-03-25openpgp: Rework the DecryptionHelper trait.Justus Winter
- Simplify the protocol by removing the iteration. Instead, the callee gets a proxy for PacketParser::decrypt() that she can use to decrypt the message. If successful, the session key can be cached without involving the DecryptionHelper trait. This also allows us to dump session keys. - Fixes #219.
2019-02-13openpgp: use nettle 4.0Kai Michaelis
2019-01-02openpgp: Improve documentation.Justus Winter
2019-01-02openpgp: Move KeyPair to crypto.Justus Winter
2019-01-02openpgp: Improve documentation.Justus Winter
2019-01-02openpgp: Move Signer trait to crypto.Justus Winter