Skip to content

Commit e4e1295

Browse files
committed
Remove bits features
Upstream support was removed in RustCrypto/traits#2417. See also: zkcrypto/ff#157
1 parent 22bc992 commit e4e1295

30 files changed

Lines changed: 13 additions & 292 deletions

File tree

.github/workflows/ed448-goldilocks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ jobs:
9090
- uses: RustCrypto/actions/cargo-hack-install@master
9191
- run: ${{ matrix.deps }}
9292
- run: cargo test --target ${{ matrix.target }} --no-default-features
93-
- run: cargo hack test --feature-powerset --target ${{ matrix.target }} --exclude-features bits,std
94-
- run: cargo test --target ${{ matrix.target }} --features bits
93+
- run: cargo hack test --feature-powerset --target ${{ matrix.target }} --exclude-features std
9594
- run: cargo test --target ${{ matrix.target }} --features std
9695
- run: cargo test --target ${{ matrix.target }} --all-features
9796
- run: cargo test --release --target ${{ matrix.target }} --all-features

.github/workflows/k256.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features
4242
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc
4343
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features arithmetic
44-
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features bits
4544
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features critical-section
4645
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdh
4746
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdsa-core
@@ -55,7 +54,7 @@ jobs:
5554
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features sha256
5655
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdsa
5756
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdsa,sha256
58-
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features bits,critical-section,ecdh,ecdsa,group-digest,pem,pkcs8,schnorr,serde,sha256
57+
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features critical-section,ecdh,ecdsa,group-digest,pem,pkcs8,schnorr,serde,sha256
5958

6059
benches:
6160
runs-on: ubuntu-latest

.github/workflows/p256.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features
4242
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc
4343
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features arithmetic
44-
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features bits
4544
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdh
4645
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdsa-core
4746
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdsa
@@ -52,7 +51,7 @@ jobs:
5251
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features pkcs8
5352
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features serde
5453
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features sha256
55-
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc,bits,ecdh,ecdsa,group-digest,oprf,pem,pkcs8,serde,sha256
54+
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc,ecdh,ecdsa,group-digest,oprf,pem,pkcs8,serde,sha256
5655

5756
benches:
5857
runs-on: ubuntu-latest

Cargo.lock

Lines changed: 9 additions & 98 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bignp256/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ alloc = ["elliptic-curve/alloc", "primeorder?/alloc"]
4949
std = ["alloc", "elliptic-curve/std", "getrandom"]
5050

5151
arithmetic = ["dep:primefield", "dep:primeorder", "elliptic-curve/arithmetic"]
52-
bits = ["arithmetic", "elliptic-curve/bits"]
5352
ecdsa = ["arithmetic", "dep:signature", "dep:belt-hash", "dep:bign-genk", "dep:belt-block", "belt-block/cipher", "belt-hash/oid"]
5453
getrandom = ["elliptic-curve/getrandom"]
5554
pem = ["pkcs8/pem", "sec1/pem"]

bignp256/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,3 @@ pub type NonZeroScalar = elliptic_curve::NonZeroScalar<BignP256>;
143143
/// Generic scalar type with primitive functionality.#
144144
#[cfg(feature = "arithmetic")]
145145
pub type ScalarValue = elliptic_curve::ScalarValue<BignP256>;
146-
147-
/// Bit representation of a BIGN P-256 scalar field element.
148-
#[cfg(feature = "bits")]
149-
pub type ScalarBits = elliptic_curve::scalar::ScalarBits<BignP256>;

bp256/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ alloc = ["ecdsa?/alloc", "elliptic-curve/alloc", "primeorder?/alloc"]
3232
std = ["alloc", "ecdsa?/std", "elliptic-curve/std", "getrandom"]
3333

3434
arithmetic = ["dep:primefield", "dep:primeorder"]
35-
bits = ["arithmetic", "elliptic-curve/bits"]
3635
getrandom = ["ecdsa?/getrandom", "elliptic-curve/getrandom"]
3736
pem = ["elliptic-curve/pem", "pkcs8"]
3837
pkcs8 = ["ecdsa/pkcs8", "elliptic-curve/pkcs8"]

bp384/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ alloc = ["ecdsa?/alloc", "elliptic-curve/alloc", "primeorder?/alloc"]
3232
std = ["alloc", "ecdsa?/std", "elliptic-curve/std", "getrandom"]
3333

3434
arithmetic = ["dep:primefield", "dep:primeorder"]
35-
bits = ["arithmetic", "elliptic-curve/bits"]
3635
getrandom = ["ecdsa?/getrandom", "elliptic-curve/getrandom"]
3736
pem = ["elliptic-curve/pem", "pkcs8"]
3837
pkcs8 = ["ecdsa/pkcs8", "elliptic-curve/pkcs8"]

ed448-goldilocks/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ default = ["std", "signing", "pkcs8"]
4242
alloc = ["ed448?/alloc", "elliptic-curve/alloc", "serdect?/alloc", "signature?/alloc"]
4343
std = ["alloc", "getrandom"]
4444

45-
bits = ["elliptic-curve/bits"]
4645
getrandom = ["elliptic-curve/getrandom"]
4746
pkcs8 = ["ed448/pkcs8", "elliptic-curve/pkcs8"]
4847
signing = ["dep:ed448", "dep:signature"]

ed448-goldilocks/src/decaf/scalar.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@ pub type DecafScalarBytes = ScalarBytes<Decaf448>;
5454
/// The number of bytes needed to represent the safely create a scalar from a random bytes
5555
pub type WideDecafScalarBytes = WideScalarBytes<Decaf448>;
5656

57-
#[cfg(feature = "bits")]
58-
impl From<&DecafScalar> for elliptic_curve::scalar::ScalarBits<Decaf448> {
59-
fn from(scalar: &DecafScalar) -> Self {
60-
scalar.scalar.to_words().into()
61-
}
62-
}
63-
6457
impl Reduce<Array<u8, U64>> for DecafScalar {
6558
fn reduce(value: &Array<u8, U64>) -> Self {
6659
const SEMI_WIDE_MODULUS: NonZero<U512> = NonZero::<U512>::new_unwrap(U512::from_be_hex(

0 commit comments

Comments
 (0)