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,332
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
dingelish
force-pushed
the
master
branch
2 times, most recently
from
October 5, 2019 19:19
bdfc1ca
to
6447161
Compare
The `Salt` and `SaltString` types are wrappers for B64-encoded salt strings as used by the PHC string format. These API changes make it clearer that the input string needs to be B64-encoded. The old API is preserved but with deprecations to ease upgrades. The following methods were renamed: - `Salt::new` => `Salt::from_b64` - `Salt::b64_decode` => `Salt::decode_b64` (for consistency) - `SaltString::new` => `SaltString::from_b64` - `SaltString::b64_decode` => `SaltString::decode_b64` - `SaltString::b64_encode` => `SaltString::encode_b64` The `Salt::as_bytes` and `SaltString::as_bytes` methods were removed, as they return the B64-encoded string as bytes, rather than decoding B64 to bytes, which is what a user might be expecting.
Automatically generate feature-specific documentation
Adds the following conversion impls to `PublicKey` - `TryFrom`: `sec1::{CompressedPoint`, `EncodedPoint}` - `Into` (via `From`): `sec1::{CompressedPoint`, `EncodedPoint}`
Remove explicit bounds which are already ensured via supertrait bounds.
Basically all of the `actions-rs/*` actions are unmaintained. See <actions-rs/toolchain#216> for more information. Due to their age they generate several warnings in CI runs. To get rid of some of those warnings the occurrences of `actions-rs/toolchain` are replaced by `dtolnay/rust-toolchain`, and the occurrences of `actions-rs/cargo` are replaced by direct invocations of `cargo`.
Bumps [zeroize](https://github.com/RustCrypto/utils) from 1.5.7 to 1.6.0. - [Release notes](https://github.com/RustCrypto/utils/releases) - [Commits](RustCrypto/utils@zeroize-v1.5.7...zeroize-v1.6.0) --- updated-dependencies: - dependency-name: zeroize dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adds a new provided method to the `SignatureEncoding` trait for computing the length of the signature when it's serialized.
Adds impls for `SecretKey` and `PublicKey`
Adds the following clippy lints and fixes violations thereof: - clippy::cast_lossless - clippy::cast_possible_truncation - clippy::cast_possible_wrap - clippy::cast_precision_loss - clippy::cast_sign_loss - clippy::checked_conversions - clippy::implicit_saturating_sub - clippy::integer_arithmetic - clippy::panic - clippy::panic_in_result_fn
Bumps [spin](https://github.com/mvdnes/spin-rs) from 0.9.7 to 0.9.8. - [Release notes](https://github.com/mvdnes/spin-rs/releases) - [Changelog](https://github.com/mvdnes/spin-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/mvdnes/spin-rs/commits) --- updated-dependencies: - dependency-name: spin dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.6.1 to 1.7.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/bytes/releases">bytes's releases</a>.</em></p> <blockquote> <h2>Bytes 1.7.0</h2> <h1>1.7.0 (July 31, 2024)</h1> <h3>Added</h3> <ul> <li>Add conversion from <code>Bytes</code> to <code>BytesMut</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/695">#695</a>, <a href="https://redirect.github.com/tokio-rs/bytes/issues/710">#710</a>)</li> <li>Add reclaim method without additional allocation (<a href="https://redirect.github.com/tokio-rs/bytes/issues/686">#686</a>)</li> </ul> <h3>Documented</h3> <ul> <li>Clarify how <code>BytesMut::zeroed</code> works (<a href="https://redirect.github.com/tokio-rs/bytes/issues/714">#714</a>)</li> <li>Clarify the behavior of <code>Buf::chunk</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/717">#717</a>)</li> </ul> <h3>Changed</h3> <ul> <li>Change length condition of <code>BytesMut::truncate</code></li> <li>Reuse capacity when possible in <code><BytesMut as Buf>::advance</code> impl (<a href="https://redirect.github.com/tokio-rs/bytes/issues/698">#698</a>)</li> <li>Improve <code>must_use</code> suggestion of <code>BytesMut::split</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/699">#699</a>)</li> </ul> <h3>Internal changes</h3> <ul> <li>Use <code>ManuallyDrop</code> instead of <code>mem::forget</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/678">#678</a>)</li> <li>Don't set <code>len</code> in <code>BytesMut::reserve</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/682">#682</a>)</li> <li>Optimize <code>Bytes::copy_to_bytes</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/688">#688</a>)</li> <li>Refactor <code>BytesMut::truncate</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/694">#694</a>)</li> <li>Refactor <code>BytesMut::resize</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/696">#696</a>)</li> <li>Reorder assertion in <code>Bytes::split_to</code>, <code>Bytes::split_off</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/689">#689</a>, <a href="https://redirect.github.com/tokio-rs/bytes/issues/693">#693</a>)</li> <li>Use <code>offset_from</code> in more places (<a href="https://redirect.github.com/tokio-rs/bytes/issues/705">#705</a>)</li> <li>Correct the wrong usage of <code>IntoIter</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/707">#707</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md">bytes's changelog</a>.</em></p> <blockquote> <h1>1.7.0 (July 31, 2024)</h1> <h3>Added</h3> <ul> <li>Add conversion from <code>Bytes</code> to <code>BytesMut</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/695">#695</a>, <a href="https://redirect.github.com/tokio-rs/bytes/issues/710">#710</a>)</li> <li>Add reclaim method without additional allocation (<a href="https://redirect.github.com/tokio-rs/bytes/issues/686">#686</a>)</li> </ul> <h3>Documented</h3> <ul> <li>Clarify how <code>BytesMut::zeroed</code> works (<a href="https://redirect.github.com/tokio-rs/bytes/issues/714">#714</a>)</li> <li>Clarify the behavior of <code>Buf::chunk</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/717">#717</a>)</li> </ul> <h3>Changed</h3> <ul> <li>Change length condition of <code>BytesMut::truncate</code></li> <li>Reuse capacity when possible in <code><BytesMut as Buf>::advance</code> impl (<a href="https://redirect.github.com/tokio-rs/bytes/issues/698">#698</a>)</li> <li>Improve <code>must_use</code> suggestion of <code>BytesMut::split</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/699">#699</a>)</li> </ul> <h3>Internal changes</h3> <ul> <li>Use <code>ManuallyDrop</code> instead of <code>mem::forget</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/678">#678</a>)</li> <li>Don't set <code>len</code> in <code>BytesMut::reserve</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/682">#682</a>)</li> <li>Optimize <code>Bytes::copy_to_bytes</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/688">#688</a>)</li> <li>Refactor <code>BytesMut::truncate</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/694">#694</a>)</li> <li>Refactor <code>BytesMut::resize</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/696">#696</a>)</li> <li>Reorder assertion in <code>Bytes::split_to</code>, <code>Bytes::split_off</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/689">#689</a>, <a href="https://redirect.github.com/tokio-rs/bytes/issues/693">#693</a>)</li> <li>Use <code>offset_from</code> in more places (<a href="https://redirect.github.com/tokio-rs/bytes/issues/705">#705</a>)</li> <li>Correct the wrong usage of <code>IntoIter</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/707">#707</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tokio-rs/bytes/commit/03fdde9dcfe69caf681ecaa1d97f8105a9c9a6c1"><code>03fdde9</code></a> chore: prepare v1.7.0 (<a href="https://redirect.github.com/tokio-rs/bytes/issues/724">#724</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/f8c7b574c0ef0c3cb097d29a08e53b15b4e4a522"><code>f8c7b57</code></a> Merge 'v1.6.1' into 'master' (<a href="https://redirect.github.com/tokio-rs/bytes/issues/721">#721</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/9965a04b5684079bb614addd750340ffc165a9f5"><code>9965a04</code></a> Remove unnecessary file (<a href="https://redirect.github.com/tokio-rs/bytes/issues/719">#719</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/3443ca5a0be21cdb2424bd20d49746bd622ed195"><code>3443ca5</code></a> docs: clarify the behavior of <code>Buf::chunk</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/717">#717</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/8cc940779fd6a489a2d7ca53fbbc44f84210083e"><code>8cc9407</code></a> Allow reclaiming the current allocation (<a href="https://redirect.github.com/tokio-rs/bytes/issues/686">#686</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/7a5154ba8b54970b7bb07c4902bc8a7981f4e57c"><code>7a5154b</code></a> Clarify how <code>BytesMut::zeroed</code> works and advantages to manual impl (<a href="https://redirect.github.com/tokio-rs/bytes/issues/714">#714</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/fa1daac3ae1dcb07dffe3a41a041dffd6edf177b"><code>fa1daac</code></a> Change Bytes::make_mut to impl From<Bytes> for BytesMut (closes <a href="https://redirect.github.com/tokio-rs/bytes/issues/709">#709</a>) (<a href="https://redirect.github.com/tokio-rs/bytes/issues/710">#710</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/caf520ac7f2c466d26bd88eca33ddc53c408e17e"><code>caf520a</code></a> Fix iter tests to use the actual bytes IntoIter instead of std (<a href="https://redirect.github.com/tokio-rs/bytes/issues/707">#707</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/4950c503768fcebce6f9ab9dbaac2a7da30b35ba"><code>4950c50</code></a> Offset from (<a href="https://redirect.github.com/tokio-rs/bytes/issues/705">#705</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/86694b05649c0c1666044b2ba5c386c2328aac18"><code>86694b0</code></a> Add zero-copy make_mut (<a href="https://redirect.github.com/tokio-rs/bytes/issues/695">#695</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tokio-rs/bytes/compare/v1.6.1...v1.7.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bytes&package-manager=cargo&previous-version=1.6.1&new-version=1.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This PR splits `BlockBackend` traits into 4 specific traits: `BlockCipherEncBackend`, `BlockCipherDecBackend`, `BlockModeEncBackend`, and `BlockModeDecBackend`. Same for `BlockClosure`. This allows for cipher backends to remove awkard `&mut &backend` juggling (see RustCrypto/block-ciphers#442), makes code a bit easier to read (i.e. `encrypt_blocks` instead of `proc_blocks`), and allows for one backend type to be used for both encryption and decryption. The `impl_simple_block_encdec` macro is removed since we now can implement the backend traits directly on cipher types, which should make implementation crates slightly easier to understand. Additionally, it moves traits to the `block` and `cipher` modules to reduce clutter in the crate root. Later we can add docs to each module to describe the traits in detail.
Allows `Display`/`Debug` printing `Output` with a specific `Encoding` without needing to go through `encode`/`b64_encode`, if e.g. it was created using `init_with`. Maybe a version of `init_with` that allows specifying an encoding (similar to `new_with_encoding`) would be better, I'm not sure. This is a smaller, more general change.
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.7.1 to 1.7.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/bytes/releases">bytes's releases</a>.</em></p> <blockquote> <h2>Bytes 1.7.2</h2> <h1>1.7.2 (September 17, 2024)</h1> <h3>Fixed</h3> <ul> <li>Fix default impl of <code>Buf::{get_int, get_int_le}</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/732">#732</a>)</li> </ul> <h3>Documented</h3> <ul> <li>Fix double spaces in comments and doc comments (<a href="https://redirect.github.com/tokio-rs/bytes/issues/731">#731</a>)</li> </ul> <h3>Internal changes</h3> <ul> <li>Ensure BytesMut::advance reduces capacity (<a href="https://redirect.github.com/tokio-rs/bytes/issues/728">#728</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md">bytes's changelog</a>.</em></p> <blockquote> <h1>1.7.2 (September 17, 2024)</h1> <h3>Fixed</h3> <ul> <li>Fix default impl of <code>Buf::{get_int, get_int_le}</code> (<a href="https://redirect.github.com/tokio-rs/bytes/issues/732">#732</a>)</li> </ul> <h3>Documented</h3> <ul> <li>Fix double spaces in comments and doc comments (<a href="https://redirect.github.com/tokio-rs/bytes/issues/731">#731</a>)</li> </ul> <h3>Internal changes</h3> <ul> <li>Ensure BytesMut::advance reduces capacity (<a href="https://redirect.github.com/tokio-rs/bytes/issues/728">#728</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tokio-rs/bytes/commit/d7c1d658d90c922eeee1dbc29bc6f6fd9a1a1a66"><code>d7c1d65</code></a> chore: prepare bytes v1.7.2 (<a href="https://redirect.github.com/tokio-rs/bytes/issues/736">#736</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/ac46ebdd464144cecd7463a96ca9eb347458ae94"><code>ac46ebd</code></a> ci: update nightly to nightly-2024-09-15 (<a href="https://redirect.github.com/tokio-rs/bytes/issues/734">#734</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/79fb85323cf4cf14d9b85f487b65fc147030cf4b"><code>79fb853</code></a> fix: apply sign extension when decoding int (<a href="https://redirect.github.com/tokio-rs/bytes/issues/732">#732</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/291df5acc94b82a48765e67eeb1c1a2074539e68"><code>291df5a</code></a> Fix double spaces in comments and doc comments (<a href="https://redirect.github.com/tokio-rs/bytes/issues/731">#731</a>)</li> <li><a href="https://github.com/tokio-rs/bytes/commit/ed7d5ff39e39c2802c0fa9e2fc308f6a3e0beda7"><code>ed7d5ff</code></a> test: ensure BytesMut::advance reduces capacity (<a href="https://redirect.github.com/tokio-rs/bytes/issues/728">#728</a>)</li> <li>See full diff in <a href="https://github.com/tokio-rs/bytes/compare/v1.7.1...v1.7.2">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bytes&package-manager=cargo&previous-version=1.7.1&new-version=1.7.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sibling PR: RustCrypto/AEADs#627 Closes #1665
The `core::error::Error` trait is now stable, meaning we no longer need to gate impls for it on a `std` feature.
The MSRVs for dependent crates did not get bumped before #1660 was merged. This bumps them accordingly.
Notably this version drops the `crypto-common` dependency
Notably this version removes the `std` feature, a breaking change from the previous `rc.0`
The `crypto` crate is linking old versions of the trait crates, and that's causing collisions when building the workspace rustdoc: warning: output filename collision. The lib target `aead` in package `aead v0.6.0-rc.0 (/Users/tony/src/RustCrypto/traits/aead)` has the same output filename as the lib target `aead` in package `aead v0.5.2`. Colliding filename is: /Users/tony/src/RustCrypto/traits/target/doc/aead/index.html The targets should have unique names. This is a known bug where multiple crates with the same name use the same path; see <rust-lang/cargo#6313>. warning: output filename collision. The lib target `cipher` in package `cipher v0.5.0-pre.7 (/Users/tony/src/RustCrypto/traits/cipher)` has the same output filename as the lib target `cipher` in package `cipher v0.4.4`. Colliding filename is: /Users/tony/src/RustCrypto/traits/target/doc/cipher/index.html The targets should have unique names. This is a known bug where multiple crates with the same name use the same path; see <rust-lang/cargo#6313>. This changes the CI config to exclude it from the rustdoc build for now, since everything else is on a prerelease series. We should probably bump `crypto` to link the latest prereleases soon, but for now this gets CI green again.
As of #1660, the `crypto-common` crate stopped linking `std` entirely by switching to `core::error::Error`. That PR didn't remove the `std` feature however, which was retained to transitively activate the `std` features of `getrandom` and `rand_core` optioinally in the event their corresponding features are enabled. This PR goes ahead and removes it entirely, which also unblocks being able to remove the `std` feature from other crates like `aead`, `cipher`, `digest`, and `universal-hash`.
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 : )