diff --git a/.github/workflows/aarch64-dit.yml b/.github/workflows/aarch64-dit.yml index c01a02fd..4eeaafb5 100644 --- a/.github/workflows/aarch64-dit.yml +++ b/.github/workflows/aarch64-dit.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: toolchain: - - 1.61.0 # MSRV + - 1.85.0 # MSRV - stable runs-on: macos-latest steps: diff --git a/.github/workflows/blobby.yml b/.github/workflows/blobby.yml index a1763c61..5d262a88 100644 --- a/.github/workflows/blobby.yml +++ b/.github/workflows/blobby.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: rust: - - 1.39.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/block-buffer.yml b/.github/workflows/block-buffer.yml index 9b2b308e..5ee8e0d5 100644 --- a/.github/workflows/block-buffer.yml +++ b/.github/workflows/block-buffer.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -40,16 +40,16 @@ jobs: - run: cargo build --target ${{ matrix.target }} minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master - with: - working-directory: ${{ github.workflow }} + uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master + with: + working-directory: ${{ github.workflow }} test: runs-on: ubuntu-latest strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/block-padding.yml b/.github/workflows/block-padding.yml index 8b7f026d..447f98da 100644 --- a/.github/workflows/block-padding.yml +++ b/.github/workflows/block-padding.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -49,7 +49,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/cmov.yml b/.github/workflows/cmov.yml index fb6dd437..453eda95 100644 --- a/.github/workflows/cmov.yml +++ b/.github/workflows/cmov.yml @@ -31,7 +31,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -53,23 +53,23 @@ jobs: # 32-bit Linux - target: i686-unknown-linux-gnu platform: ubuntu-latest - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV deps: sudo apt update && sudo apt install gcc-multilib # 64-bit Linux - target: x86_64-unknown-linux-gnu platform: ubuntu-latest - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV # 64-bit Windows - target: x86_64-pc-windows-msvc platform: windows-latest - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV # 64-bit macOS - target: x86_64-apple-darwin platform: macos-latest - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV runs-on: ${{ matrix.platform }} steps: @@ -89,12 +89,12 @@ jobs: include: # ARM64 - target: aarch64-unknown-linux-gnu - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV - target: aarch64-unknown-linux-gnu rust: stable # PPC32 - target: powerpc-unknown-linux-gnu - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV - target: powerpc-unknown-linux-gnu rust: stable runs-on: ubuntu-latest diff --git a/.github/workflows/cpufeatures.yml b/.github/workflows/cpufeatures.yml index 68986f21..89c4e5f4 100644 --- a/.github/workflows/cpufeatures.yml +++ b/.github/workflows/cpufeatures.yml @@ -32,7 +32,7 @@ jobs: include: # 32-bit Linux/x86 - target: i686-unknown-linux-gnu - rust: 1.40.0 # MSRV + rust: 1.85.0 # MSRV deps: sudo apt update && sudo apt install gcc-multilib - target: i686-unknown-linux-gnu rust: stable @@ -40,7 +40,7 @@ jobs: # 64-bit Linux/x86_64 - target: x86_64-unknown-linux-gnu - rust: 1.40.0 # MSRV + rust: 1.85.0 # MSRV - target: x86_64-unknown-linux-gnu rust: stable runs-on: ubuntu-latest @@ -61,8 +61,7 @@ jobs: strategy: matrix: toolchain: - # TODO(tarcieri): try re-enabling this when we bump MSRV - # - 1.40.0 # MSRV + - 1.85.0 # MSRV - stable runs-on: macos-latest steps: @@ -82,9 +81,8 @@ jobs: matrix: include: # 64-bit Windows (GNU) - # TODO(tarcieri): try re-enabling this when we bump MSRV - #- target: x86_64-pc-windows-gnu - # toolchain: 1.40.0 # MSRV + - target: x86_64-pc-windows-gnu + toolchain: 1.85.0 # MSRV - target: x86_64-pc-windows-gnu toolchain: stable runs-on: windows-latest @@ -105,9 +103,8 @@ jobs: matrix: include: # ARM64 - # TODO(tarcieri): try re-enabling this when we bump MSRV - #- target: aarch64-unknown-linux-gnu - # rust: 1.40.0 # MSRV + - target: aarch64-unknown-linux-gnu + rust: 1.85.0 # MSRV - target: aarch64-unknown-linux-gnu rust: stable runs-on: ubuntu-latest diff --git a/.github/workflows/dbl.yml b/.github/workflows/dbl.yml index 3a715806..61342ff2 100644 --- a/.github/workflows/dbl.yml +++ b/.github/workflows/dbl.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -40,7 +40,6 @@ jobs: - run: cargo build --target ${{ matrix.target }} minimal-versions: - uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master with: working-directory: ${{ github.workflow }} @@ -49,7 +48,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/hex-literal.yml b/.github/workflows/hex-literal.yml index 57644ab3..a3c3ece2 100644 --- a/.github/workflows/hex-literal.yml +++ b/.github/workflows/hex-literal.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: rust: - - 1.57.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -51,7 +51,7 @@ jobs: strategy: matrix: rust: - - 1.57.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/inout.yml b/.github/workflows/inout.yml index a62ec00a..dd0d1536 100644 --- a/.github/workflows/inout.yml +++ b/.github/workflows/inout.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -50,7 +50,7 @@ jobs: strategy: matrix: rust: - - 1.81.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/opaque-debug.yml b/.github/workflows/opaque-debug.yml index 94bf8448..ba95b500 100644 --- a/.github/workflows/opaque-debug.yml +++ b/.github/workflows/opaque-debug.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: rust: - - 1.41.0 # MSRV + - 1.85.0 # MSRV - stable target: - thumbv7em-none-eabi @@ -51,7 +51,7 @@ jobs: strategy: matrix: rust: - - 1.41.0 # MSRV + - 1.85.0 # MSRV - stable steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 03a71bbe..15ca57a7 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -20,7 +20,7 @@ jobs: - uses: RustCrypto/actions/cargo-cache@master - uses: dtolnay/rust-toolchain@master with: - toolchain: 1.81.0 # Pinned to prevent breakages + toolchain: 1.85.0 # Pinned to prevent breakages components: clippy - run: cargo clippy --all --all-features --exclude aarch64-dit -- -D warnings diff --git a/.github/workflows/zeroize.yml b/.github/workflows/zeroize.yml index b7f64f48..6726aaf2 100644 --- a/.github/workflows/zeroize.yml +++ b/.github/workflows/zeroize.yml @@ -26,7 +26,7 @@ jobs: strategy: matrix: rust: - - 1.60.0 # MSRV + - 1.85.0 # MSRV - stable target: - armv7a-none-eabi @@ -53,7 +53,7 @@ jobs: # 32-bit Linux - target: i686-unknown-linux-gnu platform: ubuntu-latest - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV deps: sudo apt update && sudo apt install gcc-multilib - target: i686-unknown-linux-gnu platform: ubuntu-latest @@ -63,7 +63,7 @@ jobs: # 64-bit Linux - target: x86_64-unknown-linux-gnu platform: ubuntu-latest - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV - target: x86_64-unknown-linux-gnu platform: ubuntu-latest rust: stable @@ -71,7 +71,7 @@ jobs: # 64-bit macOS x86_64 - target: x86_64-apple-darwin platform: macos-latest - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV - target: x86_64-apple-darwin platform: macos-latest rust: stable @@ -79,7 +79,7 @@ jobs: # 64-bit Windows - target: x86_64-pc-windows-msvc platform: windows-latest - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV - target: x86_64-pc-windows-msvc platform: windows-latest rust: stable @@ -101,13 +101,13 @@ jobs: include: # AArch64 - target: aarch64-unknown-linux-gnu - rust: 1.60.0 + rust: 1.85.0 - target: aarch64-unknown-linux-gnu rust: stable # PPC32 - target: powerpc-unknown-linux-gnu - rust: 1.60.0 # MSRV + rust: 1.85.0 # MSRV - target: powerpc-unknown-linux-gnu rust: stable runs-on: ubuntu-latest @@ -122,13 +122,13 @@ jobs: - run: cross test --target ${{ matrix.target }} - run: cross test --target ${{ matrix.target }} --all-features - # Tests for x86-64 `simd` support (AVX-512 registers; MSRV 1.72) + # Tests for x86-64 `simd` support x86: strategy: matrix: include: - target: x86_64-unknown-linux-gnu - rust: 1.72.0 + rust: 1.85.0 - target: x86_64-unknown-linux-gnu rust: stable runs-on: ubuntu-latest diff --git a/Cargo.lock b/Cargo.lock index 79ad98dc..bda478e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,10 +1,10 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "blobby" -version = "0.3.1" +version = "0.4.0-pre" dependencies = [ "hex", ] @@ -13,9 +13,9 @@ dependencies = [ name = "block-buffer" version = "0.11.0-rc.3" dependencies = [ - "hex-literal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hex-literal 0.4.1", "hybrid-array", - "zeroize 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "zeroize 1.8.1", ] [[package]] @@ -27,15 +27,15 @@ dependencies = [ [[package]] name = "cmov" -version = "0.3.1" +version = "0.4.0-pre" [[package]] name = "collectable" -version = "0.0.2" +version = "0.1.0" [[package]] name = "cpufeatures" -version = "0.2.17" +version = "0.3.0-pre" dependencies = [ "libc", ] @@ -66,18 +66,18 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +version = "0.5.0-pre" [[package]] name = "hybrid-array" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a9a965bb102c1c891fb017c09a05c965186b1265a207640f323ddd009f9deb" +checksum = "4dab50e193aebe510fe0e40230145820e02f48dae0cf339ea4204e6e708ff7bd" dependencies = [ "typenum", ] @@ -92,15 +92,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "memchr" @@ -110,13 +110,13 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "opaque-debug" -version = "0.3.1" +version = "0.4.0-pre" [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", "syn", @@ -124,42 +124,42 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.218" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" dependencies = [ "proc-macro2", "quote", @@ -168,9 +168,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" dependencies = [ "itoa", "memchr", @@ -180,9 +180,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.67" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8655ed1d86f3af4ee3fd3263786bc14245ad17c4c7e85ba7187fb3ae028c90" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -191,19 +191,19 @@ dependencies = [ [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" [[package]] name = "wycheproof2blb" -version = "0.1.0" +version = "0.2.0-pre" dependencies = [ "blobby", "hex", @@ -214,20 +214,20 @@ dependencies = [ [[package]] name = "zeroize" version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zeroize" +version = "1.9.0" dependencies = [ "serde", "zeroize_derive", ] -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" - [[package]] name = "zeroize_derive" -version = "1.4.2" +version = "1.5.0" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index c77e007f..626ef913 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -resolver = "2" +resolver = "3" members = [ "blobby", "block-buffer", @@ -18,5 +18,8 @@ members = [ ] exclude = ["aarch64-dit"] +[resolver] +incompatible-rust-versions = "allow" + [profile.dev] opt-level = 2 diff --git a/README.md b/README.md index b9704be4..3adf6e1c 100644 --- a/README.md +++ b/README.md @@ -8,20 +8,20 @@ This repository contains various utility crates used in the RustCrypto project. ## Crates -| Name | crates.io | Docs | MSRV | Description | -|------|:---------:|:----:|:----:|-------------| -| [`blobby`] | [![crates.io](https://img.shields.io/crates/v/blobby.svg)](https://crates.io/crates/blobby) | [![Documentation](https://docs.rs/blobby/badge.svg)](https://docs.rs/blobby) | ![MSRV 1.39][msrv-1.39] | Decoder of the simple de-duplicated binary blob storage format | -| [`block-buffer`] | [![crates.io](https://img.shields.io/crates/v/block-buffer.svg)](https://crates.io/crates/block-buffer) | [![Documentation](https://docs.rs/block-buffer/badge.svg)](https://docs.rs/block-buffer) | ![MSRV 1.41][msrv-1.41] | Fixed size buffer for block processing of data | -| [`block‑padding`] | [![crates.io](https://img.shields.io/crates/v/block-padding.svg)](https://crates.io/crates/block-padding) | [![Documentation](https://docs.rs/block-padding/badge.svg)](https://docs.rs/block-padding) | ![MSRV 1.56][msrv-1.56] | Padding and unpadding of messages divided into blocks | -| [`cmov`] | [![crates.io](https://img.shields.io/crates/v/cmov.svg)](https://crates.io/crates/cmov) | [![Documentation](https://docs.rs/cmov/badge.svg)](https://docs.rs/cmov) | ![MSRV 1.60][msrv-1.60] | Conditional move intrinsics | -| [`collectable`] | [![crates.io](https://img.shields.io/crates/v/collectable.svg)](https://crates.io/crates/collectable) | [![Documentation](https://docs.rs/collectable/badge.svg)](https://docs.rs/collectable) | ![MSRV 1.41][msrv-1.41] | Fallible, `no_std`-friendly collection traits | -| [`cpufeatures`] | [![crates.io](https://img.shields.io/crates/v/cpufeatures.svg)](https://crates.io/crates/cpufeatures) | [![Documentation](https://docs.rs/cpufeatures/badge.svg)](https://docs.rs/cpufeatures) | ![MSRV 1.40][msrv-1.40] | Lightweight and efficient alternative to the `is_x86_feature_detected!` macro | -| [`dbl`] | [![crates.io](https://img.shields.io/crates/v/dbl.svg)](https://crates.io/crates/dbl) | [![Documentation](https://docs.rs/dbl/badge.svg)](https://docs.rs/dbl) | ![MSRV 1.41][msrv-1.41] | Double operation in Galois Field (GF) | -| [`hex-literal`] | [![crates.io](https://img.shields.io/crates/v/hex-literal.svg)](https://crates.io/crates/hex-literal) | [![Documentation](https://docs.rs/hex-literal/badge.svg)](https://docs.rs/hex-literal) | ![MSRV 1.57][msrv-1.57] | Procedural macro for converting hexadecimal string to byte array at compile time | -| [`inout`] | [![crates.io](https://img.shields.io/crates/v/inout.svg)](https://crates.io/crates/inout) | [![Documentation](https://docs.rs/inout/badge.svg)](https://docs.rs/inout) | ![MSRV 1.56][msrv-1.56] | Custom reference types for code generic over in-place and buffer-to-buffer modes of operation. | -| [`opaque-debug`] | [![crates.io](https://img.shields.io/crates/v/opaque-debug.svg)](https://crates.io/crates/opaque-debug) | [![Documentation](https://docs.rs/opaque-debug/badge.svg)](https://docs.rs/opaque-debug) | ![MSRV 1.41][msrv-1.41] | Macro for opaque `Debug` trait implementation | +| Name | crates.io | Docs | Description | +|------|:---------:|:----:|-------------| +| [`blobby`] | [![crates.io](https://img.shields.io/crates/v/blobby.svg)](https://crates.io/crates/blobby) | [![Documentation](https://docs.rs/blobby/badge.svg)](https://docs.rs/blobby) | Decoder of the simple de-duplicated binary blob storage format | +| [`block-buffer`] | [![crates.io](https://img.shields.io/crates/v/block-buffer.svg)](https://crates.io/crates/block-buffer) | [![Documentation](https://docs.rs/block-buffer/badge.svg)](https://docs.rs/block-buffer) | Fixed size buffer for block processing of data | +| [`block‑padding`] | [![crates.io](https://img.shields.io/crates/v/block-padding.svg)](https://crates.io/crates/block-padding) | [![Documentation](https://docs.rs/block-padding/badge.svg)](https://docs.rs/block-padding) | Padding and unpadding of messages divided into blocks | +| [`cmov`] | [![crates.io](https://img.shields.io/crates/v/cmov.svg)](https://crates.io/crates/cmov) | [![Documentation](https://docs.rs/cmov/badge.svg)](https://docs.rs/cmov) | Conditional move intrinsics | +| [`collectable`] | [![crates.io](https://img.shields.io/crates/v/collectable.svg)](https://crates.io/crates/collectable) | [![Documentation](https://docs.rs/collectable/badge.svg)](https://docs.rs/collectable) | Fallible, `no_std`-friendly collection traits | +| [`cpufeatures`] | [![crates.io](https://img.shields.io/crates/v/cpufeatures.svg)](https://crates.io/crates/cpufeatures) | [![Documentation](https://docs.rs/cpufeatures/badge.svg)](https://docs.rs/cpufeatures) | Lightweight and efficient alternative to the `is_x86_feature_detected!` macro | +| [`dbl`] | [![crates.io](https://img.shields.io/crates/v/dbl.svg)](https://crates.io/crates/dbl) | [![Documentation](https://docs.rs/dbl/badge.svg)](https://docs.rs/dbl) | Double operation in Galois Field (GF) | +| [`hex-literal`] | [![crates.io](https://img.shields.io/crates/v/hex-literal.svg)](https://crates.io/crates/hex-literal) | [![Documentation](https://docs.rs/hex-literal/badge.svg)](https://docs.rs/hex-literal) | Procedural macro for converting hexadecimal string to byte array at compile time | +| [`inout`] | [![crates.io](https://img.shields.io/crates/v/inout.svg)](https://crates.io/crates/inout) | [![Documentation](https://docs.rs/inout/badge.svg)](https://docs.rs/inout) | Custom reference types for code generic over in-place and buffer-to-buffer modes of operation. | +| [`opaque-debug`] | [![crates.io](https://img.shields.io/crates/v/opaque-debug.svg)](https://crates.io/crates/opaque-debug) | [![Documentation](https://docs.rs/opaque-debug/badge.svg)](https://docs.rs/opaque-debug) | Macro for opaque `Debug` trait implementation | | [`wycheproof2blb`] | | | | Utility for converting [Wycheproof] test vectors to the blobby format | -| [`zeroize`] | [![crates.io](https://img.shields.io/crates/v/zeroize.svg)](https://crates.io/crates/zeroize) | [![Documentation](https://docs.rs/zeroize/badge.svg)](https://docs.rs/zeroize) | ![MSRV 1.60][msrv-1.60] | Securely zero memory while avoiding compiler optimizations | +| [`zeroize`] | [![crates.io](https://img.shields.io/crates/v/zeroize.svg)](https://crates.io/crates/zeroize) | [![Documentation](https://docs.rs/zeroize/badge.svg)](https://docs.rs/zeroize) | Securely zero memory while avoiding compiler optimizations | ## License @@ -44,16 +44,6 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [deps-image]: https://deps.rs/repo/github/RustCrypto/utils/status.svg [deps-link]: https://deps.rs/repo/github/RustCrypto/utils -[msrv-1.39]: https://img.shields.io/badge/rustc-1.39.0+-blue.svg -[msrv-1.40]: https://img.shields.io/badge/rustc-1.40.0+-blue.svg -[msrv-1.41]: https://img.shields.io/badge/rustc-1.41.0+-blue.svg -[msrv-1.45]: https://img.shields.io/badge/rustc-1.45.0+-blue.svg -[msrv-1.51]: https://img.shields.io/badge/rustc-1.51.0+-blue.svg -[msrv-1.56]: https://img.shields.io/badge/rustc-1.56.0+-blue.svg -[msrv-1.57]: https://img.shields.io/badge/rustc-1.57.0+-blue.svg -[msrv-1.59]: https://img.shields.io/badge/rustc-1.59.0+-blue.svg -[msrv-1.60]: https://img.shields.io/badge/rustc-1.60.0+-blue.svg - [//]: # (crates) [`blobby`]: ./blobby diff --git a/aarch64-dit/CHANGELOG.md b/aarch64-dit/CHANGELOG.md index 398ddd4c..94ed9c0e 100644 --- a/aarch64-dit/CHANGELOG.md +++ b/aarch64-dit/CHANGELOG.md @@ -4,5 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.2.0 (unreleased) +### Changed +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) + +[#1149]: https://github.com/RustCrypto/utils/pull/1149 + ## 0.1.0 (2024-09-06) - Initial release diff --git a/aarch64-dit/Cargo.lock b/aarch64-dit/Cargo.lock index dc5f0e0d..bfe4e3fb 100644 --- a/aarch64-dit/Cargo.lock +++ b/aarch64-dit/Cargo.lock @@ -1,23 +1,23 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "aarch64-dit" -version = "0.1.0" +version = "0.2.0-pre" dependencies = [ "cpufeatures", ] [[package]] name = "cpufeatures" -version = "0.2.15" +version = "0.3.0-pre" dependencies = [ "libc", ] [[package]] name = "libc" -version = "0.2.163" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fdaeca4cf44ed4ac623e86ef41f056e848dbeab7ec043ecb7326ba300b36fd0" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" diff --git a/aarch64-dit/Cargo.toml b/aarch64-dit/Cargo.toml index 6bf3737c..bf16b551 100644 --- a/aarch64-dit/Cargo.toml +++ b/aarch64-dit/Cargo.toml @@ -3,7 +3,7 @@ name = "aarch64-dit" description = """ Wrappers for enabling/disabling the Data Independent Timing (DIT) feature on AArch64 CPUs """ -version = "0.1.0" +version = "0.2.0-pre" authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" homepage = "https://github.com/RustCrypto/utils/tree/master/aarch64-dit" @@ -11,11 +11,11 @@ repository = "https://github.com/RustCrypto/utils" categories = ["cryptography", "hardware-support", "no-std"] keywords = ["crypto", "intrinsics"] readme = "README.md" -edition = "2021" -rust-version = "1.61" +edition = "2024" +rust-version = "1.85" [dependencies] -cpufeatures = { version = "0.2.14", path = "../cpufeatures" } +cpufeatures = { version = "0.3.0-pre", path = "../cpufeatures" } [package.metadata.docs.rs] default-target = "aarch64-unknown-linux-gnu" diff --git a/aarch64-dit/README.md b/aarch64-dit/README.md index e882be62..7b6da656 100644 --- a/aarch64-dit/README.md +++ b/aarch64-dit/README.md @@ -14,7 +14,7 @@ data, thus preventing potential information leaks via timing sidechannels. ## Minimum Supported Rust Version -Rust **1.61** or newer. +Rust **1.85** or newer. In the future, we reserve the right to change MSRV (i.e. MSRV is out-of-scope for this crate's SemVer guarantees), however when we do it will be accompanied by a minor version bump. @@ -41,7 +41,7 @@ additional terms or conditions. [docs-image]: https://docs.rs/aarch64-dit/badge.svg [docs-link]: https://docs.rs/aarch64-dit/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[msrv-image]: https://img.shields.io/badge/rustc-1.61+-blue.svg +[msrv-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [build-image]: https://github.com/RustCrypto/utils/actions/workflows/aarch64-dit.yml/badge.svg [build-link]: https://github.com/RustCrypto/utils/actions/workflows/aarch64-dit.yml diff --git a/aarch64-dit/src/lib.rs b/aarch64-dit/src/lib.rs index 0eef23ba..1a4354ad 100644 --- a/aarch64-dit/src/lib.rs +++ b/aarch64-dit/src/lib.rs @@ -91,11 +91,13 @@ impl Drop for Guard<'_> { #[target_feature(enable = "dit")] unsafe fn get_dit_enabled() -> bool { let mut dit: u64; - asm!( - "mrs {dit}, DIT", - dit = out(reg) dit, - options(nomem, nostack, preserves_flags) - ); + unsafe { + asm!( + "mrs {dit}, DIT", + dit = out(reg) dit, + options(nomem, nostack, preserves_flags) + ); + } (dit >> 24) & 1 != 0 } @@ -104,9 +106,11 @@ unsafe fn get_dit_enabled() -> bool { /// Returns the previous DIT state prior to enabling DIT. #[target_feature(enable = "dit")] unsafe fn set_dit_enabled() -> bool { - let was_enabled = get_dit_enabled(); - asm!("msr DIT, #1", options(nomem, nostack, preserves_flags)); - was_enabled + unsafe { + let was_enabled = get_dit_enabled(); + asm!("msr DIT, #1", options(nomem, nostack, preserves_flags)); + was_enabled + } } /// Restore DIT state depending on the enabled bit. @@ -114,7 +118,7 @@ unsafe fn set_dit_enabled() -> bool { unsafe fn restore_dit(enabled: bool) { if !enabled { // Disable DIT - asm!("msr DIT, #0", options(nomem, nostack, preserves_flags)); + unsafe { asm!("msr DIT, #0", options(nomem, nostack, preserves_flags)) }; } } diff --git a/blobby/CHANGELOG.md b/blobby/CHANGELOG.md index 254d0a8d..b81c2b10 100644 --- a/blobby/CHANGELOG.md +++ b/blobby/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.4.0 (unreleased) +### Changed +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) + +[#1149]: https://github.com/RustCrypto/utils/pull/1149 + ## 0.3.1 (2021-12-07) ### Added - `encode_blobs` function ([#280]) diff --git a/blobby/Cargo.toml b/blobby/Cargo.toml index 88416986..b7771e9f 100644 --- a/blobby/Cargo.toml +++ b/blobby/Cargo.toml @@ -1,13 +1,14 @@ [package] name = "blobby" -version = "0.3.1" +version = "0.4.0-pre" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" description = "Iterator over simple binary blob storage" documentation = "https://docs.rs/blobby" repository = "https://github.com/RustCrypto/utils" categories = ["no-std"] -edition = "2018" +edition = "2024" +rust-version = "1.85" [dev-dependencies] hex = "0.4" diff --git a/blobby/examples/convert.rs b/blobby/examples/convert.rs index 3e91264e..a65bf281 100644 --- a/blobby/examples/convert.rs +++ b/blobby/examples/convert.rs @@ -1,5 +1,5 @@ //! Convert utility -use blobby::{encode_blobs, BlobIterator}; +use blobby::{BlobIterator, encode_blobs}; use std::io::{self, BufRead, BufReader, BufWriter, Write}; use std::{env, error::Error, fs::File}; diff --git a/blobby/src/lib.rs b/blobby/src/lib.rs index 1157580f..f0538dcb 100644 --- a/blobby/src/lib.rs +++ b/blobby/src/lib.rs @@ -168,7 +168,7 @@ where let mut idx: Vec<&[u8]> = idx_map .iter() - .filter(|(_, &v)| v > 1) + .filter(|&(_, &v)| v > 1) .map(|(&k, _)| k) .collect(); idx.sort_by_key(|e| { @@ -308,7 +308,7 @@ new_iter!(Blob6Iterator, 6); #[cfg(test)] mod tests { - use super::{read_vlq, Error, NEXT_MASK, VAL_MASK}; + use super::{Error, NEXT_MASK, VAL_MASK, read_vlq}; fn encode_vlq(mut val: usize, buf: &mut [u8; 4]) -> &[u8] { macro_rules! step { diff --git a/block-buffer/CHANGELOG.md b/block-buffer/CHANGELOG.md index 3d87f2bc..0fab6783 100644 --- a/block-buffer/CHANGELOG.md +++ b/block-buffer/CHANGELOG.md @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 This is enforced using compile-time monomorphization errors. ([#1115]) - Size of `EagerBuffer` is equal to buffer size, while previously it was equal to buffer size plus one byte ([#823]) -- Edition changed to 2021 and MSRV bumped to 1.81 ([#823], [#1116]) +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) ### Removed - `EagerBuffer::set_data` method. Use the `ReadBuffer` type instead. ([#823]) @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#963]: https://github.com/RustCrypto/utils/pull/963 [#1115]: https://github.com/RustCrypto/utils/pull/1115 [#1115]: https://github.com/RustCrypto/utils/pull/1116 +[#1149]: https://github.com/RustCrypto/utils/pull/1149 ## 0.10.3 (2022-09-04) ### Added diff --git a/block-buffer/Cargo.toml b/block-buffer/Cargo.toml index d42ba465..db2edd4c 100644 --- a/block-buffer/Cargo.toml +++ b/block-buffer/Cargo.toml @@ -8,12 +8,12 @@ documentation = "https://docs.rs/block-buffer" repository = "https://github.com/RustCrypto/utils" keywords = ["block", "buffer"] categories = ["cryptography", "no-std"] -edition = "2021" readme = "README.md" -rust-version = "1.81" +edition = "2024" +rust-version = "1.85" [dependencies] -hybrid-array = "0.2" +hybrid-array = "0.3" zeroize = { version = "1.4", optional = true, default-features = false } [dev-dependencies] diff --git a/block-buffer/README.md b/block-buffer/README.md index a9d9f310..3731ecce 100644 --- a/block-buffer/README.md +++ b/block-buffer/README.md @@ -29,7 +29,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [docs-image]: https://docs.rs/block-buffer/badge.svg [docs-link]: https://docs.rs/block-buffer/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.65+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260052-utils [build-image]: https://github.com/RustCrypto/utils/workflows/block-buffer/badge.svg?branch=master&event=push diff --git a/block-buffer/src/lib.rs b/block-buffer/src/lib.rs index a5b8b5a8..d131f53b 100644 --- a/block-buffer/src/lib.rs +++ b/block-buffer/src/lib.rs @@ -43,8 +43,8 @@ pub use hybrid_array as array; use array::{ - typenum::{Add1, B1}, Array, ArraySize, + typenum::{Add1, B1}, }; use core::{fmt, mem::MaybeUninit, ops::Add, ptr, slice}; @@ -306,9 +306,11 @@ impl BlockBuffer { /// to block size. #[inline(always)] unsafe fn set_data_unchecked(&mut self, buf: &[u8]) { - self.set_pos_unchecked(buf.len()); - let dst_ptr: *mut u8 = self.buffer.as_mut_ptr().cast(); - ptr::copy_nonoverlapping(buf.as_ptr(), dst_ptr, buf.len()); + unsafe { + self.set_pos_unchecked(buf.len()); + let dst_ptr: *mut u8 = self.buffer.as_mut_ptr().cast(); + ptr::copy_nonoverlapping(buf.as_ptr(), dst_ptr, buf.len()); + } } } diff --git a/block-buffer/tests/mod.rs b/block-buffer/tests/mod.rs index f782009b..205f457f 100644 --- a/block-buffer/tests/mod.rs +++ b/block-buffer/tests/mod.rs @@ -1,9 +1,9 @@ use block_buffer::{ + EagerBuffer, LazyBuffer, ReadBuffer, array::{ - typenum::{U10, U16, U24, U4, U8}, Array, + typenum::{U4, U8, U10, U16, U24}, }, - EagerBuffer, LazyBuffer, ReadBuffer, }; use hex_literal::hex; @@ -82,25 +82,25 @@ fn test_read() { let mut buf = Buf::default(); let mut n = 0u8; - let mut gen = |block: &mut Array| { + let mut g = |block: &mut Array| { block.iter_mut().for_each(|b| *b = n); n += 1; }; let mut out = [0u8; 6]; - buf.read(&mut out, &mut gen); + buf.read(&mut out, &mut g); assert_eq!(out, [0, 0, 0, 0, 1, 1]); assert_eq!(buf.get_pos(), 2); assert_eq!(buf.remaining(), 2); let mut out = [0u8; 3]; - buf.read(&mut out, &mut gen); + buf.read(&mut out, &mut g); assert_eq!(out, [1, 1, 2]); assert_eq!(buf.get_pos(), 1); assert_eq!(buf.remaining(), 3); let mut out = [0u8; 3]; - buf.read(&mut out, &mut gen); + buf.read(&mut out, &mut g); assert_eq!(out, [2, 2, 2]); assert_eq!(buf.get_pos(), 4); assert_eq!(buf.remaining(), 0); @@ -288,7 +288,7 @@ fn test_read_serialize() { type Buf = ReadBuffer; let mut n = 42u8; - let mut gen = |block: &mut Array| { + let mut g = |block: &mut Array| { block.iter_mut().for_each(|b| { *b = n; n += 1; @@ -300,7 +300,7 @@ fn test_read_serialize() { assert_eq!(&ser0[..], &[4, 0, 0, 0]); assert_eq!(Buf::deserialize(&ser0).unwrap().serialize(), ser0); - buf1.read(&mut [0; 2], &mut gen); + buf1.read(&mut [0; 2], &mut g); let ser1 = buf1.serialize(); assert_eq!(&ser1[..], &[2, 0, 44, 45]); @@ -308,8 +308,8 @@ fn test_read_serialize() { let mut buf2 = Buf::deserialize(&ser1).unwrap(); assert_eq!(buf1.serialize(), ser1); - buf1.read(&mut [0; 1], &mut gen); - buf2.read(&mut [0; 1], &mut gen); + buf1.read(&mut [0; 1], &mut g); + buf2.read(&mut [0; 1], &mut g); let ser2 = buf1.serialize(); assert_eq!(&ser2[..], &[3, 0, 0, 45]); @@ -318,18 +318,18 @@ fn test_read_serialize() { let mut buf3 = Buf::deserialize(&ser2).unwrap(); assert_eq!(buf3.serialize(), ser2); - buf1.read(&mut [0; 1], &mut gen); - buf2.read(&mut [0; 1], &mut gen); - buf3.read(&mut [0; 1], &mut gen); + buf1.read(&mut [0; 1], &mut g); + buf2.read(&mut [0; 1], &mut g); + buf3.read(&mut [0; 1], &mut g); let ser3 = buf1.serialize(); assert_eq!(&ser3[..], &[4, 0, 0, 0]); assert_eq!(buf2.serialize(), ser3); assert_eq!(buf3.serialize(), ser3); - buf1.read(&mut [0; 1], &mut gen); - buf2.read(&mut [0; 1], &mut gen); - buf3.read(&mut [0; 1], &mut gen); + buf1.read(&mut [0; 1], &mut g); + buf2.read(&mut [0; 1], &mut g); + buf3.read(&mut [0; 1], &mut g); // note that each buffer calls `gen`, so they get filled // with different data diff --git a/block-padding/CHANGELOG.md b/block-padding/CHANGELOG.md index 889857a7..91bbd955 100644 --- a/block-padding/CHANGELOG.md +++ b/block-padding/CHANGELOG.md @@ -4,13 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## UNRELEASED +## 0.4.0 (unreleased) ### Changed - Migrated from `generic-array` to `hybrid-array` ([#944]) -- MSRV is bumped to 1.81 ([#1116]) +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) [#944]: https://github.com/RustCrypto/utils/pull/944 -[#1116]: https://github.com/RustCrypto/utils/pull/1116 +[#1149]: https://github.com/RustCrypto/utils/pull/1149 ## 0.3.3 (2023-04-02) ### Added diff --git a/block-padding/Cargo.toml b/block-padding/Cargo.toml index 33ff629b..0fb9108f 100644 --- a/block-padding/Cargo.toml +++ b/block-padding/Cargo.toml @@ -4,8 +4,8 @@ version = "0.4.0-rc.2" description = "Padding and unpadding of messages divided into blocks." authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.81" +edition = "2024" +rust-version = "1.85" documentation = "https://docs.rs/block-padding" repository = "https://github.com/RustCrypto/utils" keywords = ["padding", "pkcs7", "ansix923", "iso7816"] @@ -13,4 +13,4 @@ categories = ["cryptography", "no-std"] readme = "README.md" [dependencies] -hybrid-array = "0.2" +hybrid-array = "0.3" diff --git a/block-padding/README.md b/block-padding/README.md index 3f332588..1cd25f09 100644 --- a/block-padding/README.md +++ b/block-padding/README.md @@ -29,7 +29,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [docs-image]: https://docs.rs/block-padding/badge.svg [docs-link]: https://docs.rs/block-padding/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.65+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260052-utils [build-image]: https://github.com/RustCrypto/utils/workflows/block-padding/badge.svg?branch=master&event=push diff --git a/cmov/CHANGELOG.md b/cmov/CHANGELOG.md index 70f7778e..4f2e0fb5 100644 --- a/cmov/CHANGELOG.md +++ b/cmov/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.4.0 (unreleased) +### Changed +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) + +[#1149]: https://github.com/RustCrypto/utils/pull/1149 + ## 0.3.1 (2023-10-14) ### Added - `CmovEq` impl for slices ([#954]) diff --git a/cmov/Cargo.toml b/cmov/Cargo.toml index 67fe6d81..c0baf79c 100644 --- a/cmov/Cargo.toml +++ b/cmov/Cargo.toml @@ -6,7 +6,7 @@ constant-time and not be rewritten as branches by the compiler. Provides wrappers for the CMOV family of instructions on x86/x86_64 and CSEL on AArch64. """ -version = "0.3.1" +version = "0.4.0-pre" authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" homepage = "https://github.com/RustCrypto/utils/tree/master/cmov" @@ -14,5 +14,5 @@ repository = "https://github.com/RustCrypto/utils" categories = ["cryptography", "hardware-support", "no-std"] keywords = ["crypto", "intrinsics"] readme = "README.md" -edition = "2021" -rust-version = "1.60" +edition = "2024" +rust-version = "1.85" diff --git a/cmov/README.md b/cmov/README.md index cdd55319..49e4448a 100644 --- a/cmov/README.md +++ b/cmov/README.md @@ -51,7 +51,7 @@ Please open an issue with your desired CPU architecture if this interests you. ## Minimum Supported Rust Version -Rust **1.60** or newer. +Rust **1.85** or newer. In the future, we reserve the right to change MSRV (i.e. MSRV is out-of-scope for this crate's SemVer guarantees), however when we do it will be accompanied by @@ -79,7 +79,7 @@ dual licensed as above, without any additional terms or conditions. [docs-image]: https://docs.rs/cmov/badge.svg [docs-link]: https://docs.rs/cmov/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[msrv-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg +[msrv-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [build-image]: https://github.com/RustCrypto/utils/actions/workflows/cmov.yml/badge.svg [build-link]: https://github.com/RustCrypto/utils/actions/workflows/cmov.yml diff --git a/cmov/src/lib.rs b/cmov/src/lib.rs index 7c5e2f40..e608f9a3 100644 --- a/cmov/src/lib.rs +++ b/cmov/src/lib.rs @@ -96,7 +96,7 @@ impl Cmov for u128 { lo.cmovnz(&((*value & u64::MAX as u128) as u64), condition); hi.cmovnz(&((*value >> 64) as u64), condition); - *self = (lo as u128) | (hi as u128) << 64; + *self = (lo as u128) | ((hi as u128) << 64); } #[inline] @@ -107,7 +107,7 @@ impl Cmov for u128 { lo.cmovz(&((*value & u64::MAX as u128) as u64), condition); hi.cmovz(&((*value >> 64) as u64), condition); - *self = (lo as u128) | (hi as u128) << 64; + *self = (lo as u128) | ((hi as u128) << 64); } } diff --git a/collectable/CHANGELOG.md b/collectable/CHANGELOG.md index f683b97f..afa83832 100644 --- a/collectable/CHANGELOG.md +++ b/collectable/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.1.0 (unreleased) +### Changed +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) + +[#1149]: https://github.com/RustCrypto/utils/pull/1149 + ## 0.0.2 (2020-05-24) ### Added - `TryPush` trait ([#45]) diff --git a/collectable/Cargo.toml b/collectable/Cargo.toml index 9c2e081f..f6380d2f 100644 --- a/collectable/Cargo.toml +++ b/collectable/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "collectable" -version = "0.0.2" +version = "0.1.0" authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" -edition = "2018" description = "Fallible, no_std-friendly collection traits" documentation = "https://docs.rs/collectable" repository = "https://github.com/RustCrypto/utils" categories = ["data-structures", "no-std"] keywords = ["arrayvec", "heapless"] +edition = "2024" +rust-version = "1.85" [features] alloc = [] diff --git a/cpufeatures/CHANGELOG.md b/cpufeatures/CHANGELOG.md index 991cb072..cf8741e6 100644 --- a/cpufeatures/CHANGELOG.md +++ b/cpufeatures/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.3.0 (unreleased) +### Changed +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) + +[#1149]: https://github.com/RustCrypto/utils/pull/1149 + ## 0.2.17 (2025-01-24) ### Fixed - Don't link `std` when linking `libc` ([#1142]) diff --git a/cpufeatures/Cargo.toml b/cpufeatures/Cargo.toml index 307faea4..dd23c641 100644 --- a/cpufeatures/Cargo.toml +++ b/cpufeatures/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cpufeatures" -version = "0.2.17" +version = "0.3.0-pre" description = """ Lightweight runtime CPU feature detection for aarch64, loongarch64, and x86/x86_64 targets, with no_std support and support for mobile targets including Android and iOS @@ -11,8 +11,9 @@ documentation = "https://docs.rs/cpufeatures" repository = "https://github.com/RustCrypto/utils" keywords = ["cpuid", "target-feature"] categories = ["hardware-support", "no-std"] -edition = "2018" readme = "README.md" +edition = "2024" +rust-version = "1.85" [target.'cfg(all(target_arch = "aarch64", target_vendor = "apple"))'.dependencies] libc = { version = "0.2.155", default-features = false } diff --git a/cpufeatures/README.md b/cpufeatures/README.md index c99ff8d7..0e203170 100644 --- a/cpufeatures/README.md +++ b/cpufeatures/README.md @@ -113,7 +113,7 @@ dual licensed as above, without any additional terms or conditions. [docs-image]: https://docs.rs/cpufeatures/badge.svg [docs-link]: https://docs.rs/cpufeatures/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.40+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260052-utils [build-image]: https://github.com/RustCrypto/utils/actions/workflows/cpufeatures.yml/badge.svg diff --git a/cpufeatures/src/aarch64.rs b/cpufeatures/src/aarch64.rs index 36c253bd..690fe221 100644 --- a/cpufeatures/src/aarch64.rs +++ b/cpufeatures/src/aarch64.rs @@ -143,13 +143,15 @@ pub unsafe fn sysctlbyname(name: &[u8]) -> bool { let mut value: u32 = 0; let mut size = core::mem::size_of::(); - let rc = libc::sysctlbyname( - name.as_ptr() as *const i8, - &mut value as *mut _ as *mut libc::c_void, - &mut size, - core::ptr::null_mut(), - 0, - ); + let rc = unsafe { + libc::sysctlbyname( + name.as_ptr() as *const i8, + &mut value as *mut _ as *mut libc::c_void, + &mut size, + core::ptr::null_mut(), + 0, + ) + }; assert_eq!(size, 4, "unexpected sysctlbyname(3) result size"); assert_eq!(rc, 0, "sysctlbyname returned error code: {}", rc); diff --git a/dbl/CHANGELOG.md b/dbl/CHANGELOG.md index 377d6d8f..f300bd23 100644 --- a/dbl/CHANGELOG.md +++ b/dbl/CHANGELOG.md @@ -4,10 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## UNRELEASED +## 0.4.0 (unreleased) ### Changed - Migrated from `generic-array` to `hybrid-array` ([#944]) -- MSRV is bumped to 1.81 ([#1116]) +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) [#944]: https://github.com/RustCrypto/utils/pull/944 -[#1116]: https://github.com/RustCrypto/utils/pull/1116 +[#1149]: https://github.com/RustCrypto/utils/pull/1149 diff --git a/dbl/Cargo.toml b/dbl/Cargo.toml index f775a1c4..565f242f 100644 --- a/dbl/Cargo.toml +++ b/dbl/Cargo.toml @@ -7,9 +7,9 @@ description = "Double operation in Galois Field GF(2^128) as used by e.g. CMAC/P documentation = "https://docs.rs/dbl" repository = "https://github.com/RustCrypto/utils" keywords = ["crypto", "dbl", "gf", "galois"] -edition = "2021" -rust-version = "1.81" +edition = "2024" +rust-version = "1.85" readme = "README.md" [dependencies] -hybrid-array = "0.2" +hybrid-array = "0.3" diff --git a/dbl/README.md b/dbl/README.md index bd1b1bfe..d0fd6a1f 100644 --- a/dbl/README.md +++ b/dbl/README.md @@ -32,7 +32,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [docs-image]: https://docs.rs/dbl/badge.svg [docs-link]: https://docs.rs/dbl/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.65+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260052-utils [build-image]: https://github.com/RustCrypto/utils/workflows/dbl/badge.svg?branch=master&event=push diff --git a/dbl/src/lib.rs b/dbl/src/lib.rs index 00b49e19..54a9feac 100644 --- a/dbl/src/lib.rs +++ b/dbl/src/lib.rs @@ -6,8 +6,8 @@ )] #![forbid(unsafe_code)] -use hybrid_array::typenum::{U16, U32, U8}; use hybrid_array::Array; +use hybrid_array::typenum::{U8, U16, U32}; const C64: u64 = 0b1_1011; const C128: u64 = 0b1000_0111; diff --git a/fiat-constify/Cargo.toml b/fiat-constify/Cargo.toml index b86fe12c..223745b8 100644 --- a/fiat-constify/Cargo.toml +++ b/fiat-constify/Cargo.toml @@ -13,7 +13,8 @@ repository = "https://github.com/RustCrypto/utils" categories = ["cryptography"] keywords = ["fiat-crypto", "field"] readme = "README.md" -edition = "2021" +edition = "2024" +rust-version = "1.85" [dependencies] prettyplease = "0.2.19" diff --git a/fiat-constify/src/main.rs b/fiat-constify/src/main.rs index 8f9c36d3..c354a434 100644 --- a/fiat-constify/src/main.rs +++ b/fiat-constify/src/main.rs @@ -10,14 +10,13 @@ mod type_registry; use outputs::Outputs; use proc_macro2::{Punct, Spacing, Span}; -use quote::{quote, TokenStreamExt}; +use quote::{TokenStreamExt, quote}; use std::{collections::BTreeMap as Map, env, fs, ops::Deref}; use syn::{ - parse_quote, + Expr, ExprCall, ExprPath, ExprReference, Fields, FnArg, Ident, Item, ItemFn, Local, LocalInit, + Meta, Pat, PatIdent, PatTuple, Path, Stmt, TypeReference, parse_quote, punctuated::Punctuated, token::{Const, Eq, Let, Paren, Semi}, - Expr, ExprCall, ExprPath, ExprReference, Fields, FnArg, Ident, Item, ItemFn, Local, LocalInit, - Meta, Pat, PatIdent, PatTuple, Path, Stmt, TypeReference, }; use type_registry::TypeRegistry; @@ -95,7 +94,9 @@ fn main() -> Result<(), Box> { } ast.items.extend_from_slice(&const_deref); - println!("//! fiat-crypto output postprocessed by fiat-constify: "); + println!( + "//! fiat-crypto output postprocessed by fiat-constify: " + ); println!("{}", prettyplease::unparse(&ast)); Ok(()) } diff --git a/fiat-constify/src/outputs.rs b/fiat-constify/src/outputs.rs index c86e935f..1ba8cc87 100644 --- a/fiat-constify/src/outputs.rs +++ b/fiat-constify/src/outputs.rs @@ -1,8 +1,8 @@ use crate::type_registry::TypeRegistry; use syn::{ + Ident, ReturnType, Type, TypeTuple, punctuated::Punctuated, token::{Paren, RArrow}, - Ident, ReturnType, Type, TypeTuple, }; /// Output values, which in regular `fiat-crypto` are passed as mutable references, e.g.: diff --git a/hex-literal/CHANGELOG.md b/hex-literal/CHANGELOG.md index 260838e6..b1412c19 100644 --- a/hex-literal/CHANGELOG.md +++ b/hex-literal/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.5.0 (unreleased) +### Changed +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) + +[#1149]: https://github.com/RustCrypto/utils/pull/1149 + ## 0.4.1 (2023-04-05) ### Changed - Enforce const evaluation ([#889]) diff --git a/hex-literal/Cargo.toml b/hex-literal/Cargo.toml index ad07ffb1..c5f13a4b 100644 --- a/hex-literal/Cargo.toml +++ b/hex-literal/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "hex-literal" -version = "0.4.1" +version = "0.5.0-pre" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" description = "Macro for converting hexadecimal string to a byte array at compile time" documentation = "https://docs.rs/hex-literal" repository = "https://github.com/RustCrypto/utils" keywords = ["hex", "literals"] -edition = "2021" -rust-version = "1.57" +edition = "2024" +rust-version = "1.85" diff --git a/hex-literal/README.md b/hex-literal/README.md index eb06be5e..3a9c2a1f 100644 --- a/hex-literal/README.md +++ b/hex-literal/README.md @@ -64,12 +64,6 @@ hex_literal::hex!( ); ``` -## Minimum Supported Rust Version - -Rust **1.57** or newer. - -In the future, we reserve the right to change MSRV (i.e. MSRV is out-of-scope for this crate's SemVer guarantees), however when we do it will be accompanied by a minor version bump. - ## License Licensed under either of: @@ -90,7 +84,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [docs-image]: https://docs.rs/hex-literal/badge.svg [docs-link]: https://docs.rs/hex-literal/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.57+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [build-image]: https://github.com/RustCrypto/utils/actions/workflows/hex-literal.yml/badge.svg [build-link]: https://github.com/RustCrypto/utils/actions/workflows/hex-literal.yml diff --git a/inout/CHANGELOG.md b/inout/CHANGELOG.md index 81ad63f9..702cd390 100644 --- a/inout/CHANGELOG.md +++ b/inout/CHANGELOG.md @@ -4,19 +4,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## UNRELEASED +## 0.2.0 (unreleased) ### Changed - Migrated from `generic-array` to `hybrid-array` ([#944]) -- MSRV is bumped to 1.81 ([#1116]) +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) ### Added - `InOut::into_out` and `InOutBufReserved::into_out` methods ([#1132]) - `InOutBufReserved::split_reserved` method ([#1133]) [#944]: https://github.com/RustCrypto/utils/pull/944 -[#1116]: https://github.com/RustCrypto/utils/pull/1116 [#1132]: https://github.com/RustCrypto/utils/pull/1132 [#1132]: https://github.com/RustCrypto/utils/pull/1132 +[#1149]: https://github.com/RustCrypto/utils/pull/1149 ## 0.1.3 (2022-03-31) ### Fixed diff --git a/inout/Cargo.toml b/inout/Cargo.toml index af8da9e3..51558472 100644 --- a/inout/Cargo.toml +++ b/inout/Cargo.toml @@ -4,8 +4,8 @@ version = "0.2.0-rc.3" description = "Custom reference types for code generic over in-place and buffer-to-buffer modes of operation." authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" -edition = "2021" -rust-version = "1.81" +edition = "2024" +rust-version = "1.85" documentation = "https://docs.rs/inout" repository = "https://github.com/RustCrypto/utils" keywords = ["custom-reference"] @@ -13,7 +13,7 @@ readme = "README.md" [dependencies] block-padding = { version = "0.4.0-rc.2", path = "../block-padding", optional = true } -hybrid-array = "0.2" +hybrid-array = "0.3" [package.metadata.docs.rs] all-features = true diff --git a/inout/README.md b/inout/README.md index d12ba59f..ba3e16d1 100644 --- a/inout/README.md +++ b/inout/README.md @@ -29,7 +29,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [docs-image]: https://docs.rs/inout/badge.svg [docs-link]: https://docs.rs/inout/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.65+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260052-utils [build-image]: https://github.com/RustCrypto/utils/workflows/inout/badge.svg?branch=master&event=push diff --git a/inout/src/inout_buf.rs b/inout/src/inout_buf.rs index 442c59c6..c3e6a35b 100644 --- a/inout/src/inout_buf.rs +++ b/inout/src/inout_buf.rs @@ -1,6 +1,6 @@ use crate::{ - errors::{IntoArrayError, NotEqualError}, InOut, + errors::{IntoArrayError, NotEqualError}, }; use core::{marker::PhantomData, slice}; use hybrid_array::{Array, ArraySize}; diff --git a/inout/src/reserved.rs b/inout/src/reserved.rs index ee1be933..1a053ebd 100644 --- a/inout/src/reserved.rs +++ b/inout/src/reserved.rs @@ -1,9 +1,9 @@ -use crate::{errors::OutIsTooSmallError, InOutBuf}; +use crate::{InOutBuf, errors::OutIsTooSmallError}; use core::{marker::PhantomData, slice}; #[cfg(feature = "block-padding")] use { - crate::{errors::PadError, InOut}, + crate::{InOut, errors::PadError}, block_padding::{PadType, Padding}, hybrid_array::{Array, ArraySize}, }; diff --git a/opaque-debug/CHANGELOG.md b/opaque-debug/CHANGELOG.md index 99224fdb..905a4a66 100644 --- a/opaque-debug/CHANGELOG.md +++ b/opaque-debug/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.4.0 (unreleased) +### Changed +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) + +[#1149]: https://github.com/RustCrypto/utils/pull/1149 + ## 0.3.1 (2024-03-01) ### Added - Support for generic parameters ([#1053]) diff --git a/opaque-debug/Cargo.toml b/opaque-debug/Cargo.toml index 6faca837..059b5646 100644 --- a/opaque-debug/Cargo.toml +++ b/opaque-debug/Cargo.toml @@ -1,10 +1,11 @@ [package] name = "opaque-debug" -version = "0.3.1" +version = "0.4.0-pre" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" description = "Macro for opaque Debug trait implementation" documentation = "https://docs.rs/opaque-debug" repository = "https://github.com/RustCrypto/utils" -edition = "2018" readme = "README.md" +edition = "2024" +rust-version = "1.85" diff --git a/opaque-debug/README.md b/opaque-debug/README.md index 4ec6a1ef..99b4d3ac 100644 --- a/opaque-debug/README.md +++ b/opaque-debug/README.md @@ -29,7 +29,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [docs-image]: https://docs.rs/opaque-debug/badge.svg [docs-link]: https://docs.rs/opaque-debug/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.41+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260052-utils [build-image]: https://github.com/RustCrypto/utils/workflows/opaque-debug/badge.svg?branch=master&event=push diff --git a/wycheproof2blb/CHANGELOG.md b/wycheproof2blb/CHANGELOG.md index 2f7898a8..6e1a3a5e 100644 --- a/wycheproof2blb/CHANGELOG.md +++ b/wycheproof2blb/CHANGELOG.md @@ -4,5 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.2.0 (unreleased) +### Changed +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) + +[#1149]: https://github.com/RustCrypto/utils/pull/1149 + ## 0.1.0 (2021-12-07) - Initial release diff --git a/wycheproof2blb/Cargo.toml b/wycheproof2blb/Cargo.toml index f0ce2984..52f88552 100644 --- a/wycheproof2blb/Cargo.toml +++ b/wycheproof2blb/Cargo.toml @@ -1,16 +1,17 @@ [package] name = "wycheproof2blb" -version = "0.1.0" +version = "0.2.0-pre" authors = ["RustCrypto Developers"] license = "MIT OR Apache-2.0" description = "A utility for converting Wycheproof test vectors to the blobby format" repository = "https://github.com/RustCrypto/utils" keywords = ["test", "Wycheproof"] categories = ["cryptography", "no-std"] -edition = "2018" +edition = "2024" +rust-version = "1.85" [dependencies] -blobby = { version = "0.3.1", path = "../blobby" } +blobby = { version = "0.4.0-pre", path = "../blobby" } hex = "0.4" serde = { version = "1.0.184", features = ["derive"] } serde_json = "1" diff --git a/wycheproof2blb/src/aead.rs b/wycheproof2blb/src/aead.rs index d8de26b8..b06fee43 100644 --- a/wycheproof2blb/src/aead.rs +++ b/wycheproof2blb/src/aead.rs @@ -1,6 +1,6 @@ +use crate::TestInfo; use crate::wycheproof; use crate::wycheproof::{case_result, description, hex_string}; -use crate::TestInfo; use serde::Deserialize; #[derive(Debug, Deserialize)] diff --git a/wycheproof2blb/src/aes_siv.rs b/wycheproof2blb/src/aes_siv.rs index 46b7232b..c86724f7 100644 --- a/wycheproof2blb/src/aes_siv.rs +++ b/wycheproof2blb/src/aes_siv.rs @@ -1,6 +1,6 @@ +use crate::TestInfo; use crate::wycheproof; use crate::wycheproof::{case_result, description, hex_string}; -use crate::TestInfo; use serde::Deserialize; #[derive(Debug, Deserialize)] diff --git a/wycheproof2blb/src/ecdsa.rs b/wycheproof2blb/src/ecdsa.rs index 08d82e26..5e3973a6 100644 --- a/wycheproof2blb/src/ecdsa.rs +++ b/wycheproof2blb/src/ecdsa.rs @@ -1,6 +1,6 @@ +use crate::TestInfo; use crate::wycheproof; use crate::wycheproof::{case_result, description, hex_string}; -use crate::TestInfo; use serde::Deserialize; #[derive(Debug, Deserialize)] diff --git a/wycheproof2blb/src/ed25519.rs b/wycheproof2blb/src/ed25519.rs index 89054f33..1638e31a 100644 --- a/wycheproof2blb/src/ed25519.rs +++ b/wycheproof2blb/src/ed25519.rs @@ -1,6 +1,6 @@ +use crate::TestInfo; use crate::wycheproof; use crate::wycheproof::{case_result, description, hex_string}; -use crate::TestInfo; use serde::Deserialize; #[derive(Debug, Deserialize)] diff --git a/wycheproof2blb/src/hkdf.rs b/wycheproof2blb/src/hkdf.rs index e449b99f..f8ab7580 100644 --- a/wycheproof2blb/src/hkdf.rs +++ b/wycheproof2blb/src/hkdf.rs @@ -1,6 +1,6 @@ +use crate::TestInfo; use crate::wycheproof; use crate::wycheproof::{description, hex_string}; -use crate::TestInfo; use serde::Deserialize; #[derive(Debug, Deserialize)] diff --git a/wycheproof2blb/src/mac.rs b/wycheproof2blb/src/mac.rs index 4def17f2..f52e6db6 100644 --- a/wycheproof2blb/src/mac.rs +++ b/wycheproof2blb/src/mac.rs @@ -1,6 +1,6 @@ -use crate::wycheproof; -use crate::wycheproof::{description, hex_string, CaseResult}; use crate::TestInfo; +use crate::wycheproof; +use crate::wycheproof::{CaseResult, description, hex_string}; use serde::Deserialize; #[derive(Debug, Deserialize)] diff --git a/zeroize/CHANGELOG.md b/zeroize/CHANGELOG.md index 048f4b70..0b599102 100644 --- a/zeroize/CHANGELOG.md +++ b/zeroize/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.9.0 (unreleased) +### Changed +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) + +[#1149]: https://github.com/RustCrypto/utils/pull/1149 + ## 1.8.1 (2024-05-25) ### Changed - Feature-gate AVX-512 support under `simd`; restores MSRV 1.60 ([#1073]) diff --git a/zeroize/Cargo.toml b/zeroize/Cargo.toml index 0bd7b4d2..38e51603 100644 --- a/zeroize/Cargo.toml +++ b/zeroize/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zeroize" -version = "1.8.1" +version = "1.9.0" description = """ Securely clear secrets from memory with a simple trait built on stable Rust primitives which guarantee memory is zeroed using an @@ -15,8 +15,8 @@ repository = "https://github.com/RustCrypto/utils" readme = "README.md" categories = ["cryptography", "memory-management", "no-std", "os"] keywords = ["memory", "memset", "secure", "volatile", "zero"] -edition = "2021" -rust-version = "1.60" +edition = "2024" +rust-version = "1.85" [dependencies] serde = { version = "1.0", default-features = false, optional = true } diff --git a/zeroize/README.md b/zeroize/README.md index 03b93abb..b2ee7d1d 100644 --- a/zeroize/README.md +++ b/zeroize/README.md @@ -34,14 +34,6 @@ thereof, implemented in pure Rust with no usage of FFI or assembly. - No functionality besides securely zeroing memory! - (Optional) Custom derive support for zeroing complex structures -## Minimum Supported Rust Version - -Rust **1.60** or newer. - -In the future, we reserve the right to change MSRV (i.e. MSRV is out-of-scope -for this crate's SemVer guarantees), however when we do it will be accompanied by -a minor version bump. - ## License Licensed under either of: @@ -64,7 +56,7 @@ dual licensed as above, without any additional terms or conditions. [docs-image]: https://docs.rs/zeroize/badge.svg [docs-link]: https://docs.rs/zeroize/ [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.60+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [build-image]: https://github.com/RustCrypto/utils/actions/workflows/zeroize.yml/badge.svg [build-link]: https://github.com/RustCrypto/utils/actions/workflows/zeroize.yml diff --git a/zeroize/src/aarch64.rs b/zeroize/src/aarch64.rs index e9e15654..317db34c 100644 --- a/zeroize/src/aarch64.rs +++ b/zeroize/src/aarch64.rs @@ -1,6 +1,6 @@ //! [`Zeroize`] impls for ARM64 SIMD registers. -use crate::{atomic_fence, volatile_write, Zeroize}; +use crate::{Zeroize, atomic_fence, volatile_write}; use core::arch::aarch64::*; diff --git a/zeroize/src/lib.rs b/zeroize/src/lib.rs index 9fa575e5..65e0104e 100644 --- a/zeroize/src/lib.rs +++ b/zeroize/src/lib.rs @@ -252,10 +252,10 @@ mod x86; use core::{ marker::{PhantomData, PhantomPinned}, - mem::{size_of, MaybeUninit}, + mem::{MaybeUninit, size_of}, num::{ - self, NonZeroI128, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, NonZeroIsize, - NonZeroU128, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8, NonZeroUsize, + self, NonZeroI8, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI128, NonZeroIsize, NonZeroU8, + NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, NonZeroUsize, }, ops, ptr, slice::IterMut, @@ -780,13 +780,13 @@ unsafe fn volatile_set(dst: *mut T, src: T, count: usize) { // This is safe because there is room for at least `count` objects of type `T` in the // allocation pointed to by `dst`, because `count <= isize::MAX` and because // `dst.add(count)` must not wrap around the address space. - let ptr = dst.add(i); + let ptr = unsafe { dst.add(i) }; // Safety: // // This is safe, because the pointer is valid and because `dst` is well aligned for `T` and // `ptr` is an offset of `dst` by a multiple of `size_of::()` bytes. - ptr::write_volatile(ptr, src); + unsafe { ptr::write_volatile(ptr, src) }; } } @@ -844,7 +844,9 @@ pub unsafe fn zeroize_flat_type(data: *mut F) { // // This is safe because `size_of()` returns the exact size of the object in memory, and // `data_ptr` points directly to the first byte of the data. - volatile_set(data as *mut u8, 0, size); + unsafe { + volatile_set(data as *mut u8, 0, size); + } atomic_fence() } diff --git a/zeroize/src/x86.rs b/zeroize/src/x86.rs index ea671ea3..599fc494 100644 --- a/zeroize/src/x86.rs +++ b/zeroize/src/x86.rs @@ -1,6 +1,6 @@ //! [`Zeroize`] impls for x86 SIMD registers -use crate::{atomic_fence, volatile_write, Zeroize}; +use crate::{Zeroize, atomic_fence, volatile_write}; #[cfg(target_arch = "x86")] use core::arch::x86::*; diff --git a/zeroize/tests/zeroize.rs b/zeroize/tests/zeroize.rs index 32281c1c..afc824e0 100644 --- a/zeroize/tests/zeroize.rs +++ b/zeroize/tests/zeroize.rs @@ -2,7 +2,7 @@ use std::{ marker::{PhantomData, PhantomPinned}, - mem::{size_of, MaybeUninit}, + mem::{MaybeUninit, size_of}, num::*, }; use zeroize::*; diff --git a/zeroize/tests/zeroize_derive.rs b/zeroize/tests/zeroize_derive.rs index 1ab83e2e..8cc9e295 100644 --- a/zeroize/tests/zeroize_derive.rs +++ b/zeroize/tests/zeroize_derive.rs @@ -256,7 +256,7 @@ fn derive_inherit_zeroize_on_drop() { unsafe { std::ptr::drop_in_place(&mut value); } - assert_eq!(&value.0 .0, &[0, 0, 0]) + assert_eq!(&value.0.0, &[0, 0, 0]) } #[test] @@ -271,7 +271,7 @@ fn derive_inherit_from_both() { unsafe { std::ptr::drop_in_place(&mut value); } - assert_eq!(&value.0 .0, &[0, 0, 0]) + assert_eq!(&value.0.0, &[0, 0, 0]) } #[test] @@ -286,7 +286,7 @@ fn derive_inherit_both() { unsafe { std::ptr::drop_in_place(&mut value); } - assert_eq!(&value.0 .0, &[0, 0, 0]) + assert_eq!(&value.0.0, &[0, 0, 0]) } #[test] @@ -314,7 +314,7 @@ fn derive_deref() { unsafe { std::ptr::drop_in_place(&mut value); } - assert_eq!(&value.0 .0, &[0, 0, 0]) + assert_eq!(&value.0.0, &[0, 0, 0]) } #[test] diff --git a/zeroize_derive/CHANGELOG.md b/zeroize_derive/CHANGELOG.md index 8b950c05..5b662376 100644 --- a/zeroize_derive/CHANGELOG.md +++ b/zeroize_derive/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.5.0 (unreleased) +### Changed +- Edition changed to 2024 and MSRV bumped to 1.85 ([#1149]) + +[#1149]: https://github.com/RustCrypto/utils/pull/1149 + ## 1.4.2 (2023-03-30) ### Changed - Inject where clauses; skip unused ([#882]) diff --git a/zeroize_derive/Cargo.toml b/zeroize_derive/Cargo.toml index 85139258..68b2f636 100644 --- a/zeroize_derive/Cargo.toml +++ b/zeroize_derive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zeroize_derive" description = "Custom derive support for zeroize" -version = "1.4.2" +version = "1.5.0" authors = ["The RustCrypto Project Developers"] license = "Apache-2.0 OR MIT" homepage = "https://github.com/RustCrypto/utils/tree/master/zeroize_derive" @@ -9,8 +9,8 @@ repository = "https://github.com/RustCrypto/utils" readme = "README.md" categories = ["cryptography", "memory-management", "no-std", "os"] keywords = ["memory", "memset", "secure", "volatile", "zero"] -edition = "2021" -rust-version = "1.56" +edition = "2024" +rust-version = "1.85" [lib] proc-macro = true diff --git a/zeroize_derive/README.md b/zeroize_derive/README.md index 9eb4bfb1..c63b4c11 100644 --- a/zeroize_derive/README.md +++ b/zeroize_derive/README.md @@ -11,14 +11,6 @@ while avoiding compiler optimizations. This crate isn't intended to be used directly. See [zeroize] crate for documentation. -## Minimum Supported Rust Version - -Rust **1.56** or newer. - -In the future, we reserve the right to change MSRV (i.e. MSRV is out-of-scope -for this crate's SemVer guarantees), however when we do it will be accompanied by -a minor version bump. - ## License Licensed under either of: @@ -39,7 +31,7 @@ dual licensed as above, without any additional terms or conditions. [crate-image]: https://img.shields.io/crates/v/zeroize_derive.svg [crate-link]: https://crates.io/crates/zeroize_derive [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg -[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg [build-image]: https://github.com/RustCrypto/utils/actions/workflows/zeroize.yml/badge.svg [build-link]: https://github.com/RustCrypto/utils/actions/workflows/zeroize.yml diff --git a/zeroize_derive/src/lib.rs b/zeroize_derive/src/lib.rs index 9bbc1ca8..37d94a18 100644 --- a/zeroize_derive/src/lib.rs +++ b/zeroize_derive/src/lib.rs @@ -7,13 +7,13 @@ use proc_macro2::{Ident, TokenStream}; use quote::{format_ident, quote}; use syn::{ + Attribute, Data, DeriveInput, Expr, ExprLit, Field, Fields, Lit, Meta, Result, Variant, + WherePredicate, parse::{Parse, ParseStream}, parse_quote, punctuated::Punctuated, token::Comma, visit::Visit, - Attribute, Data, DeriveInput, Expr, ExprLit, Field, Fields, Lit, Meta, Result, Variant, - WherePredicate, }; /// Name of zeroize-related attributes