Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Feb 26, 2020

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 ⤵️ pull merge-conflict Resolve conflicts manually labels Feb 26, 2020
tarcieri and others added 27 commits September 16, 2022 16:30
Includes stubs for all current non-prerelease releases (except v0.0.0)
which we can eventually fill out, or just add new versions going
forward.
- added Clone and Debug for SigningKey & VerifyingKey
of pss and pkcs1v15

Signed-off-by: Xynnn007 <[email protected]>
Signed-off-by: Nathaniel McCallum <[email protected]>
Implement PrehashSigner and PrehashVerifier traits for PKCS1v15
structures.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Signed-off-by: Nathaniel McCallum <[email protected]>

Signed-off-by: Nathaniel McCallum <[email protected]>
The crate is now using the `PrehashSigner`/`PrehashVerifier` traits,
which were added in `signature` v1.6.1.

However, that release was also yanked, so this commit pins to 1.6.2.
Implement PrehashSigner and PrehashVerifier traits for PSS
key structures.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Implement key -> der conversion for public keys.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Constructor for `RsaPublicKey` which bypasses all checks around the
modulus and public exponent size.
Implement encoding Signing keys to PKCS#8 DER format.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Several types and methods were missing documentation.

This commit adds document and enables warnings for `missing_docs`.

Additionally it updates all references to PKCS#1 RFCs to use RFC8017,
which documents the latest version of PKCS#1.
Makes each code example a linkable section of the rustdoc.

Uses these links to link from individual modules to code examples in the
toplevel rustdoc.
It's needed to use the `SigningKey`/`VerifyingKey` types in the
`pkcs1v15` and `pss` modules.

Also updates the code examples to use the re-export.
...and test they build in CI
Now that dignifiedquire/num-bigint#42 has landed
it is no longer needed.
LWEdslev and others added 30 commits September 26, 2025 10:50
Changed tests to use the rstest #571. 
On my machine it makes the test (`--release`) run about 40% faster (2.8s
to 1.6s)

Places where the pattern was `let tests = [...]` with only one test
case, I changed to use rstest, since this makes adding more test cases
easier. I assumed that was the reason for the `tests` variable being
there despite there only being one test case.
It's otherwise unclear what needs to be done to address these errors in
the event the wycheproof submodule has not been initialized
When a downstream crate enables the `subtle` feature in `hybrid-array`,
the crate would fail to compile:
```
src/algorithms/pss.rs:375:31
    |
375 |     if (salt_valid & h0.ct_eq(h)).into() {
    |                         ----- ^ expected `&Array<u8, ...>`, found `&mut [u8]`
    |                         |
    |                         arguments to this method are incorrect
    |
    = note:      expected reference `&Array<u8, <D as OutputSizeUser>::OutputSize>`
            found mutable reference `&mut [u8]`
```

This is because the `hybrid_array::Array` was automatically deref'ed to
a slice. Now `Array` implements `subtle::ConstantTimeEq` that automatic
deref no longer happens.

This commit fixes that by converting one of the arguments of the
conversion that brings back the auto-deref.

Thanks to @tarcieri for the help debugging:
RustCrypto/formats#2049 (comment)
I'm not sure I see why usage of `DynDigest` was originally introduced.
The need to make the Digest also Send is hard to use in downstream
crates.

I don't believe this was necessary, this removes its use and makes the
consumer specify the Digest types.
The existing support through `impl AsRef<RsaPublicKey> for
RsaPrivateKey` was initially difficult to find.
Also bumps `pkcs8` to v0.11.0-pre.8
Excludes `marvin_toolkit/` and `thirdparty/` from crate releases
This release migrates from `subtle` to the new `ctutils` library, which
should improve constant-time properties.

It also brings a new `rand_core` release and the first new `getrandom`
series prerelease: v0.4.0-rc.0, which makes it possible to remove the
direct dependency on `rand`.

I've pulled `getrandom` in through an optional dependency on
`crypto-common`, as I'd like to impl the `Generate` trait in a followup.

Finally, as noted earlier `crypto-common` has migrated to `ctutils`, so
this also removes the direct dependency on `subtle`, replacing it with
the same-named types from `ctutils` which act as a mostly drop-in
replacement.
This release bumps `ctutils` to v0.3, which eliminated the `Choice::new`
constructor in favor of the more explicit `Choice::from_u8_lsb`.

This updates `crypto-bigint` and gets rid of the remaining usages of
`Crypto::new`.
Updates the following dependencies:

    $ cargo update
    Updating git repository `https://github.com/rust-random/rand`
    Updating crates.io index
     Locking 50 packages to latest compatible versions
    Updating aead v0.6.0-rc.3 -> v0.6.0-rc.5
    Updating aho-corasick v1.1.3 -> v1.1.4
    Updating base16ct v0.3.0 -> v1.0.0
    Updating bitflags v2.9.4 -> v2.10.0
    Updating block-buffer v0.11.0-rc.5 -> v0.11.0
    Updating block-padding v0.4.1 -> v0.4.2
    Updating cfg-if v1.0.3 -> v1.0.4
    Updating cipher v0.5.0-rc.2 -> v0.5.0-rc.3
    Updating ctutils v0.3.0 -> v0.3.1
    Updating der v0.8.0-rc.9 -> v0.8.0-rc.10
    Updating digest v0.11.0-rc.4 -> v0.11.0-rc.5
    Updating getrandom v0.3.3 -> v0.3.4
    Updating hashbrown v0.16.0 -> v0.16.1
    Updating hybrid-array v0.4.4 -> v0.4.5
    Updating indexmap v2.11.4 -> v2.12.1
    Updating inout v0.2.1 -> v0.2.2
    Updating itoa v1.0.15 -> v1.0.17
    Updating libc v0.2.176 -> v0.2.179
    Updating pbkdf2 v0.13.0-rc.2 -> v0.13.0-rc.5
    Updating pem-rfc7468 v1.0.0-rc.3 -> v1.0.0
    Updating proc-macro2 v1.0.101 -> v1.0.104
    Updating quote v1.0.40 -> v1.0.42
Updating rand v0.10.0-rc.5
(https://github.com/rust-random/rand#ff07ec20) -> #75fe38ff
    Updating regex v1.11.2 -> v1.12.2
    Updating regex-automata v0.4.10 -> v0.4.13
    Updating regex-syntax v0.8.6 -> v0.8.8
    Updating rustix v1.1.2 -> v1.1.3
    Updating rusty-fork v0.3.0 -> v0.3.1
    Removing ryu v1.0.20
    Updating salsa20 v0.11.0-rc.1 -> v0.11.0-rc.2
    Updating scrypt v0.12.0-rc.2 -> v0.12.0-rc.7
    Updating serde v1.0.227 -> v1.0.228
    Updating serde_core v1.0.227 -> v1.0.228
    Updating serde_derive v1.0.227 -> v1.0.228
    Updating serde_json v1.0.145 -> v1.0.148
    Updating serdect v0.4.1 -> v0.4.2
    Updating signature v3.0.0-rc.5 -> v3.0.0-rc.6
    Updating syn v2.0.106 -> v2.0.112
    Updating tempfile v3.23.0 -> v3.24.0
    Updating toml_datetime v0.7.2 -> v0.7.5+spec-1.1.0
    Updating toml_edit v0.23.6 -> v0.23.10+spec-1.0.0
    Updating toml_parser v1.0.3 -> v1.0.6+spec-1.1.0
    Updating typenum v1.18.0 -> v1.19.0
    Updating unicode-ident v1.0.19 -> v1.0.22
    Updating universal-hash v0.6.0-rc.3 -> v0.6.0-rc.4
    Removing wasi v0.14.7+wasi-0.2.4
    Updating windows-link v0.2.0 -> v0.2.1
    Updating windows-sys v0.61.1 -> v0.61.2
    Updating winnow v0.7.13 -> v0.7.14
    Updating zerocopy v0.8.27 -> v0.8.31
    Updating zerocopy-derive v0.8.27 -> v0.8.31
      Adding zmij v1.0.9
I also made a change in the github workflow since `nightly` toolchain
was used because of `doc_auto_cfg` and it is no longer needed.

See RustCrypto/traits#2028
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.