summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/mod.rs
AgeCommit message (Collapse)Author
2020-08-17openpgp: Move crypto::Keygrip to the ipc crate.Justus Winter
2020-08-17openpgp: Move crypto::sexp to the ipc crate.Justus Winter
- This is only used to communicate with the GnuPG agent, so it should not be in the openpgp crate.
2020-08-17openpgp: Make crypto::ecdh::decrypt_shared public.Justus Winter
- This will be used by all the implementations of crypto::Decryptor, and if we don't want them to end up in the openpgp crate, we need to make it public.
2020-08-13openpgp: Add examples for Password.Justus Winter
- See #474.
2020-08-11openpgp: Move hash_buffered_reader, drop hash_reader.Justus Winter
- Previously, we provided hash_reader to downstream users to verify detached signatures. Nowadays, we have the DetachedVerifier that does the same in a much more convenient way. Therefore, we drop hash_reader, and move its non-public sibling hash_buffered_reader to a more appropriate location.
2020-08-10openpgp: Correctly handle text signatures when verifying.Justus Winter
- Text signatures require normalizing the line endings to "\r\n" before the text is hashed. This change implements this for the consumption of signatures. The next commit will handle the production of such signatures. - See #530.
2020-08-04openpgp: Improve documentation.Justus Winter
- See #474.
2020-08-04openpgp: Improve documentation of mod asymmetric.Justus Winter
- See #474.
2020-07-31openpgp: Improve the introduction of module crypto.Justus Winter
- See #474.
2020-07-31openpgp: Improve documentation of crypto::Password.Justus Winter
- See #474.
2020-07-31openpgp: Improve documentation of crypto::SessionKey.Justus Winter
- See #474.
2020-06-22openpgp: Move random generation to Nettle backendIgor Matuszewski
2020-06-22openpgp: Introduce crypto::backend facade moduleIgor Matuszewski
2020-04-08openpgp: Move around some crypto pub re-exportsIgor Matuszewski
To keep it consistent with other re-exports and to easier see at a glance what is re-exported from the module.
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-03-25openpgp: Provide crypto::hash_buffered_reader.Justus Winter
2020-03-09openpgp: Update nettle to 7.0.0.Justus Winter
2020-02-24openpgp: De-optimize crypto::random.Justus Winter
- Previously, we used a thread-local cache of the Yarrow CPRNG state. However, without fork(2)-detection this is not safe. For now, just initialize a fresh one on every invocation.
2020-01-03openpgp: Rename hash_file to hash_reader, improve documentation.Justus Winter
2020-01-03openpgp: Simplify SignatureGroup::hashes.Justus Winter
- The hash context knows the algorithm now.
2020-01-03openpgp: Simplify crypto::hash_file.Justus Winter
- The context knows the algorithm now.
2020-01-03openpgp: Move crypto::s2k::S2K to crypto.Justus Winter
- The module contains only one exported item.
2020-01-03openpgp: Make Protected::into_vec private, remove from SessionKey.Justus Winter
2019-12-19openpgp: Encrypt passwords in memory.Justus Winter
2019-12-19openpgp: Make crypto::mem public and improve the documentation.Justus Winter
2019-12-19openpgp: Prepare to encrypt passwords.Justus Winter
- Remove direct access, provide Password::map instead.
2019-12-03openpgp: Rename openpgp::conversions to openpgp::fmt.Justus Winter
2019-11-25openpgp: Rename openpgp::constants to openpgp::types.Justus Winter
- Fixes #381.
2019-11-07openpgp: Use a Vec instead of a HashMap.Neal H. Walfield
- A SignatureGroup currently contains a hash mapping hash algorithms to hash contexts. Typically this will only contain one or two mappings. At most it will contain one mapping for each algorithm that we support (currently, we support 7 hash algorithms). - Given the small expected and small maximum size, a vector is the better data structure: - The small number of elements means that look up time will be comparable whether we do a linear scan or look in a hash (in fact, the linear scan is probably cache friendlier). - Iterating over a vector is faster than iterating over a hash map. The is the fast path. - A vector takes up less space. - Change SignatureGroup::hashes to use a Vec instead of a HashMap.
2019-07-15openpgp: Implement AsMut<[u8]> for SessionKey.Justus Winter
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-07-02openpgp: New function crypto::random.Justus Winter
- Add and use a function that fills a buffer with a thread-local random number generator.
2019-07-02openpgp: Simplify SessionKey::new.Justus Winter
2019-07-02openpgp: Introduce an abstraction for hash contexts.Justus Winter
- See #302.
2019-07-02openpgp: Make the crypto::hash module public, remove re-export.Justus Winter
2019-06-27openpgp: Refactor memory protection.Justus Winter
- Create a new module for memory protection. Move common code from `Password` and `SessionKey` to a new type `Protected`.
2019-06-24openpgp: Add a function to convert SessionKeys back to Vec<u8>.Justus Winter
2019-06-06openpgp: New type representing s-expressions.Justus Winter
- *S-Expressions* as described in the internet draft [S-Expressions], are a way to communicate cryptographic primitives like keys, signatures, and ciphertexts between agents or implementations. [S-Expressions]: https://people.csail.mit.edu/rivest/Sexp.txt
2019-05-30openpgp: New trait crypto::Decryptor.Justus Winter
2019-05-14openpgp: Add a filesystem-like framework for test data.Justus Winter
- Fixes #267.
2019-03-25openpgp: New constructors for SessionKey and Password.Justus Winter
2019-03-25openpgp: Implement AsRef<[u8]> for SessionKey and Password.Justus Winter
2019-03-14openpgp: Don't read beyond the end of the bufferNeal H. Walfield
2019-03-01buffered-reader: Drop BufferedReader prefix.Justus Winter
- For example, `buffered_reader::BufferedReaderMemory` is now called `buffered_reader::Memory`. This makes the type names less unwieldy. - Fixes #206.
2019-02-18openpgp: Compute Keygrips.Justus Winter
- Keygrips are a proprietary, protocol agnostic way to identify public keys used by GnuPG. - Fixes #195.
2019-02-13openpgp: use nettle 4.0Kai Michaelis
2019-02-13openpgp: Introduce crypto::Hash.Justus Winter
- This trait formalizes the hashing of OpenPGP packets and related types. - Fixes #183.
2019-02-13openpgp: Qualify nettle::Hash.Justus Winter
2019-02-06openpgp: Improve secret key handling.Justus Winter
- Use curve25519::secret_key() to generate keys in crypto::ecdh. - Wrap the secret keys into SessionKey objects to make sure they are zeroed when dropped.
2019-01-02openpgp: Move KeyPair to crypto.Justus Winter