Age | Commit message (Collapse) | Author |
|
|
|
These are typos in comments only.
|
|
|
|
- When the decryptor returns a short session key without reporting
an error, an overflow occurs. Avoid this by using saturating
subtraction. Then, the resulting range is empty, and an error
will be reported just a few lines down.
- Fixes #913.
|
|
|
|
|
|
- Adapt to the new API:
- Gen is now a struct, not a Trait, and replaces StdThreadGen.
- The rand re-export has been removed. As a consequence, we need
our own function to generate an arbitrary value from a range.
|
|
Suggested by Neal Walfield.
Found by clippy lint useless_format:
https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
|
|
|
|
|
|
- https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice
|
|
|
|
- See #627.
|
|
- Adjust code to test for `cfg(test)` only,
- Remove `quickcheck` and `rand` from dependencies so that they stay
only in dev-dependencies,
- Remove mention of `x-quickcheck` feature from the documentation,
- Fixes #545.
|
|
|
|
|
|
- Make quickcheck dependency optional.
- Make quickcheck a dev-dependency for tests.
- Fix doctests for
- cert::ValidCert::user_attributes,
- cert::builder::CertBuilder::add_user_attribute,
- cert::revoke::UserAttributeRevocationBuilder
- cert::revoke::UserAttributeRevocationBuilder::build.
Doctests do not use cfg(test), so we cannot use quickcheck in there.
|
|
- Returning rich errors from this function may compromise secret key
material due to Bleichenbacher-style attacks. Change the API to
prevent this.
- Hat tip to Hanno Böck.
- See #507.
|
|
- Replace bitshifts with the conversion functions from the standard
library.
|
|
To be consistent; we don't use plural forms for modules anywhere else
and Rust always uses singular forms.
|
|
- 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.
|
|
|
|
- All packets should be considered equal if the serialized OpenPGP
form is equal, modulo framing (i.e. CTB type, packet length
encoding, partial body chunking).
- In cases this may lead to surprising outcomes, discuss this in the
documentation, and provide additional equality predicates.
- Fixes #92.
|
|
|
|
- Add two new traits: `Marshal` and `MarshalInto`.
- Implement them instead of `Serialize` and `SerializeInto`.
- Only implement `Serialize` and `SerializeInto` for data structures
that are normally exported.
- This should prevent users from accidentally serializing a bare
signature (`Signature`) when they meant to serialize a signature
packet (`Packet`), for instance.
- Fixes #368.
|
|
- 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.
|
|
|
|
|
|
- If we know the length of the plaintext, we can reduce the
side-channel leakage of the RSA decryption operation.
|
|
|
|
- We explicitly exclude the common fields.
- See #92.
|
|
- These are low-level cryptographic traits that are not concerned
with the role of a key.
- Fixes #382.
|
|
- Now that we store timestamps in OpenPGP's native encoding, the
canonicalization happens when converting to it.
|
|
- Fixes #387.
|
|
- Fixes #381.
|
|
|
|
- Fixes #380.
|
|
- In sq and sqv, use chrono to interface with the user.
- Fixes #341.
|
|
Newer Rust compilers requre `dyn` marking trait objects.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
- In addition to providing some added protection, this allows us to
implement 'From<Key<_, _>> for Packet'.
|
|
- Also rename the `subkey` method to `key`.
|
|
- When the `SecretKey` type only refers to the secret key material
and not a TPK-like thing, call it `SecretKeyMaterial`.
|
|
- 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.
|
|
|
|
- Introduce a new type, ProtectedMPI, that uses
crypto::mem::Protected for storing the MPI. Change
mpis::SecretKey to use this.
- Fixes #181.
|
|
|
|
- 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.
|
|
|
|
|
|
|