Skip to content

Commit fea0e18

Browse files
authored
Bernstein-Yang cleanups; MSRV 1.73 (#437)
Refactors the `CInt` type into `Uint62L` which always uses a 62-bit unsaturated representation. This is mostly to reduce the overall number of const generic parameters involved, since Bernstein-Yang always uses a 62-bit unsaturated representation (at least as currently implemented). Moves the `S` parameter from `invert` into the `BernsteinYangInverter` struct itself. This allows the type to always "know" its associated inverter, rather than leaving it up to the end user to calculate. Also changes the `invert` method to accept a `Uint` as input. Bumps MSRV to 1.73 since it uses the `int_roundings` feature to compute the number of unsaturated limbs from the number of saturated limbs.
1 parent b01e8bb commit fea0e18

File tree

6 files changed

+133
-90
lines changed

6 files changed

+133
-90
lines changed

.github/workflows/crypto-bigint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
rust:
23-
- 1.70.0 # MSRV
23+
- 1.73.0 # MSRV
2424
- stable
2525
target:
2626
- thumbv7em-none-eabi
@@ -48,15 +48,15 @@ jobs:
4848
include:
4949
# 32-bit Linux
5050
- target: i686-unknown-linux-gnu
51-
rust: 1.70.0 # MSRV
51+
rust: 1.73.0 # MSRV
5252
deps: sudo apt update && sudo apt install gcc-multilib
5353
- target: i686-unknown-linux-gnu
5454
rust: stable
5555
deps: sudo apt update && sudo apt install gcc-multilib
5656

5757
# 64-bit Linux
5858
- target: x86_64-unknown-linux-gnu
59-
rust: 1.70.0 # MSRV
59+
rust: 1.73.0 # MSRV
6060
- target: x86_64-unknown-linux-gnu
6161
rust: stable
6262
steps:
@@ -126,7 +126,7 @@ jobs:
126126
- uses: actions/checkout@v4
127127
- uses: dtolnay/rust-toolchain@master
128128
with:
129-
toolchain: 1.72.0
129+
toolchain: 1.73.0
130130
components: clippy
131131
- run: cargo clippy --all --all-features -- -D warnings
132132

@@ -146,7 +146,7 @@ jobs:
146146
- uses: actions/checkout@v4
147147
- uses: dtolnay/rust-toolchain@master
148148
with:
149-
toolchain: 1.70.0
149+
toolchain: 1.73.0
150150
- run: cargo build --benches
151151
- run: cargo build --all-features --benches
152152

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ keywords = ["arbitrary", "crypto", "bignum", "integer", "precision"]
1414
readme = "README.md"
1515
resolver = "2"
1616
edition = "2021"
17-
rust-version = "1.70"
17+
rust-version = "1.73"
1818

1919
[dependencies]
2020
subtle = { version = "2.5", default-features = false }

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ microcontrollers).
3939

4040
## Minimum Supported Rust Version
4141

42-
This crate requires **Rust 1.70** at a minimum.
42+
This crate requires **Rust 1.73** at a minimum.
4343

4444
We may change the MSRV in the future, but it will be accompanied by a minor
4545
version bump.
@@ -68,7 +68,7 @@ dual licensed as above, without any additional terms or conditions.
6868
[build-image]: https://github.com/RustCrypto/crypto-bigint/actions/workflows/crypto-bigint.yml/badge.svg
6969
[build-link]: https://github.com/RustCrypto/crypto-bigint/actions/workflows/crypto-bigint.yml
7070
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
71-
[rustc-image]: https://img.shields.io/badge/rustc-1.70+-blue.svg
71+
[rustc-image]: https://img.shields.io/badge/rustc-1.73+-blue.svg
7272
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
7373
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/300602-crypto-bigint
7474

0 commit comments

Comments
 (0)