Skip to content
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
wants to merge 1,397 commits into
base: master
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Oct 3, 2019

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Oct 3, 2019
@dingelish dingelish force-pushed the master branch 2 times, most recently from bdfc1ca to 6447161 Compare October 5, 2019 19:19
@pull pull bot added the merge-conflict Resolve conflicts manually label Feb 28, 2020
tarcieri and others added 24 commits October 31, 2023 13:19
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.
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.
baloo and others added 30 commits February 12, 2025 15:50
Fixes #1677

This merge types defined in `async-signature` back into `signature` and
effectively deprecates `async-signature`
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.
Renames `AeadInPlaceDetached` to `AeadInOut`, and changes the type
signature so the provided `buffer` is now an `InOutBuf`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⤵️ pull merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.