forked from RustCrypto/traits
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from RustCrypto:master #4
Open
pull
wants to merge
1,397
commits into
mesalock-linux:master
Choose a base branch
from
RustCrypto:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bdfc1ca
to
6447161
Compare
This commit splits the existing `generate_*` functions into two different variants: - `fn generate_*`: accepts no parameters and uses `OsRng` automatically. Gated on the `getrandom` feature. - `fn generate_*_with_rng`: accepts a `&mut impl CryptoRngCore` parameter. Gated on the `rand_core`. Previously all of the `generate_*` methods were parameterized on a `CryptoRngCore`. Splitting them up like this makes it very easy for users to do the right thing, which is use `getrandom`/`OsRng`, but without the need to document how to import `OsRng` into their code everywhere. Retaining the parameterized versions as `*_with_rng` allows users to pass a custom RNG where it makes sense, for example `rand::thread_rng`, or potentially an embedded peripheral/entropy pool.
Adds a fallible `try_*` variant to each `generate_*_with_rng` function, changing usages of `fill_bytes` to `try_fill_bytes`, and returning a `Result` with `rand_core::Error` in the event an RNG error has occurred.
Pre-1.60 crates can't be used in workspaces with other crates that use namespaced/weak features. This commit places all MSRV 1.60+ crates into `members` and moves the ones with earlier MSRVs into `exclude`.
When both `getrandom` and `rand_core` are enabled, activates the `rand_core/getrandom` feature, which makes `OsRng` available as `crypto_common::rand_core::OsRng`.
Replaces `generic-array` with `hybrid-array`, which is built on a combination of `typenum` and const generics, providing a degree of interoperability between the two systems.
Replaces `generic-array` with `hybrid-array`, which is built on a combination of `typenum` and const generics, providing a degree of interoperability between the two systems.
To simplify the workspace, which contains weak/namespaced features, this bumps both `async-signature` and `signature` to MSRV 1.60. So as for the bump to have some justification, it adds weak feature activation for `rand_core?/std`, and uses this impl to write a `From<rand_core::Error>` conversion which can preserve the original error as the boxed source.
These crates were previously nested under `signature/async` and `signature/derive`, which complicates tooling that expects crates to be in toplevel directories, and as things currently stand also meant that releases of the `signature` crate accidentally included stale copies of the other two crates. This commit moves them to toplevel `async-signature` and `signature-derive` directories.
Accidentally removed in #1375
The crate name contains an underscore, not a hyphen, but #1391 accidentally used `signature-derive` instead
Previously the traits were generic around a reference type. The problem with that is reference types have lifetimes, which requires notating them in generic code, in this case requiring an HRTB per generic parameter. HRTBs work because the output has no lifetime dependencies on the input, but if that's the case we can just explicitly borrow in the trait, which means no HRTB is needed in generic code, which makes notating the trait bounds significantly simpler.
Fixes #1677 This merge types defined in `async-signature` back into `signature` and effectively deprecates `async-signature`
Followup to #1720
This is so that a `RandomizedDigestSigner` can call into `hazmat::RandomizedPrehashSigner` directly with the provided rng. Example use: RustCrypto/signatures#901
As discussed [here][0] the tests are not particularity useful and block migration to rand_core v0.9. [0]: #1642 (comment)
`#[must_use]` annotations have no effect on trait methods.
Factors apart the detached methods of `AeadInPlace` into a separate `AeadInPlaceDetached` trait, which itself can now more easily be further refactored (by adding e.g. `inout` support). Also adds a `PostfixTagged` trait which is used to gate the blanket impls.
Depends: - zkcrypto/ff#126 - zkcrypto/ff#127 This is to provide an `ecdsa::SigningKey::try_from_rng` API (RustCrypto/signatures#915)
New trait for customized hash function with variable output `CtVariableCoreWrapper` like Blake2 to implement the `CustomizedInit` trait.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )