Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ed448-goldilocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ jobs:
- uses: RustCrypto/actions/cargo-hack-install@master
- run: ${{ matrix.deps }}
- run: cargo test --target ${{ matrix.target }} --no-default-features
- run: cargo hack test --feature-powerset --target ${{ matrix.target }} --exclude-features bits,std
- run: cargo test --target ${{ matrix.target }} --features bits
- run: cargo hack test --feature-powerset --target ${{ matrix.target }} --exclude-features std
- run: cargo test --target ${{ matrix.target }} --features std
- run: cargo test --target ${{ matrix.target }} --all-features
- run: cargo test --release --target ${{ matrix.target }} --all-features
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/k256.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features arithmetic
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features bits
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features critical-section
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdh
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdsa-core
Expand All @@ -55,7 +54,7 @@ jobs:
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features sha256
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdsa
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdsa,sha256
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features bits,critical-section,ecdh,ecdsa,group-digest,pem,pkcs8,schnorr,serde,sha256
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features critical-section,ecdh,ecdsa,group-digest,pem,pkcs8,schnorr,serde,sha256

benches:
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/p256.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features arithmetic
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features bits
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdh
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdsa-core
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features ecdsa
Expand All @@ -52,7 +51,7 @@ jobs:
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features pkcs8
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features serde
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features sha256
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc,bits,ecdh,ecdsa,group-digest,oprf,pem,pkcs8,serde,sha256
- run: cargo build --target thumbv7em-none-eabi --release --no-default-features --features alloc,ecdh,ecdsa,group-digest,oprf,pem,pkcs8,serde,sha256

benches:
runs-on: ubuntu-latest
Expand Down
107 changes: 9 additions & 98 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion bignp256/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ alloc = ["elliptic-curve/alloc", "primeorder?/alloc"]
std = ["alloc", "elliptic-curve/std", "getrandom"]

arithmetic = ["dep:primefield", "dep:primeorder", "elliptic-curve/arithmetic"]
bits = ["arithmetic", "elliptic-curve/bits"]
ecdsa = ["arithmetic", "dep:signature", "dep:belt-hash", "dep:bign-genk", "dep:belt-block", "belt-block/cipher", "belt-hash/oid"]
getrandom = ["elliptic-curve/getrandom"]
pem = ["pkcs8/pem", "sec1/pem"]
Expand Down
4 changes: 0 additions & 4 deletions bignp256/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,3 @@ pub type NonZeroScalar = elliptic_curve::NonZeroScalar<BignP256>;
/// Generic scalar type with primitive functionality.#
#[cfg(feature = "arithmetic")]
pub type ScalarValue = elliptic_curve::ScalarValue<BignP256>;

/// Bit representation of a BIGN P-256 scalar field element.
#[cfg(feature = "bits")]
pub type ScalarBits = elliptic_curve::scalar::ScalarBits<BignP256>;
1 change: 0 additions & 1 deletion bp256/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ alloc = ["ecdsa?/alloc", "elliptic-curve/alloc", "primeorder?/alloc"]
std = ["alloc", "ecdsa?/std", "elliptic-curve/std", "getrandom"]

arithmetic = ["dep:primefield", "dep:primeorder"]
bits = ["arithmetic", "elliptic-curve/bits"]
getrandom = ["ecdsa?/getrandom", "elliptic-curve/getrandom"]
pem = ["elliptic-curve/pem", "pkcs8"]
pkcs8 = ["ecdsa/pkcs8", "elliptic-curve/pkcs8"]
Expand Down
1 change: 0 additions & 1 deletion bp384/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ alloc = ["ecdsa?/alloc", "elliptic-curve/alloc", "primeorder?/alloc"]
std = ["alloc", "ecdsa?/std", "elliptic-curve/std", "getrandom"]

arithmetic = ["dep:primefield", "dep:primeorder"]
bits = ["arithmetic", "elliptic-curve/bits"]
getrandom = ["ecdsa?/getrandom", "elliptic-curve/getrandom"]
pem = ["elliptic-curve/pem", "pkcs8"]
pkcs8 = ["ecdsa/pkcs8", "elliptic-curve/pkcs8"]
Expand Down
1 change: 0 additions & 1 deletion ed448-goldilocks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ default = ["std", "signing", "pkcs8"]
alloc = ["ed448?/alloc", "elliptic-curve/alloc", "serdect?/alloc", "signature?/alloc"]
std = ["alloc", "getrandom"]

bits = ["elliptic-curve/bits"]
getrandom = ["elliptic-curve/getrandom"]
pkcs8 = ["ed448/pkcs8", "elliptic-curve/pkcs8"]
signing = ["dep:ed448", "dep:signature"]
Expand Down
7 changes: 0 additions & 7 deletions ed448-goldilocks/src/decaf/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ pub type DecafScalarBytes = ScalarBytes<Decaf448>;
/// The number of bytes needed to represent the safely create a scalar from a random bytes
pub type WideDecafScalarBytes = WideScalarBytes<Decaf448>;

#[cfg(feature = "bits")]
impl From<&DecafScalar> for elliptic_curve::scalar::ScalarBits<Decaf448> {
fn from(scalar: &DecafScalar) -> Self {
scalar.scalar.to_words().into()
}
}

impl Reduce<Array<u8, U64>> for DecafScalar {
fn reduce(value: &Array<u8, U64>) -> Self {
const SEMI_WIDE_MODULUS: NonZero<U512> = NonZero::<U512>::new_unwrap(U512::from_be_hex(
Expand Down
7 changes: 0 additions & 7 deletions ed448-goldilocks/src/edwards/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,6 @@ pub type EdwardsScalarBytes = ScalarBytes<Ed448>;
/// The number of bytes needed to represent the safely create a scalar from a random bytes
pub type WideEdwardsScalarBytes = WideScalarBytes<Ed448>;

#[cfg(feature = "bits")]
impl From<&EdwardsScalar> for elliptic_curve::scalar::ScalarBits<Ed448> {
fn from(scalar: &EdwardsScalar) -> Self {
scalar.scalar.to_words().into()
}
}

impl Reduce<Array<u8, U84>> for EdwardsScalar {
fn reduce(value: &Array<u8, U84>) -> Self {
const SEMI_WIDE_MODULUS: NonZero<U704> = NonZero::<U704>::new_unwrap(U704::from_be_hex(
Expand Down
16 changes: 0 additions & 16 deletions ed448-goldilocks/src/field/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ use elliptic_curve::{
use rand_core::{CryptoRng, Rng, TryCryptoRng, TryRng};
use subtle::{Choice, ConditionallySelectable, ConstantTimeEq, ConstantTimeGreater, CtOption};

#[cfg(feature = "bits")]
use elliptic_curve::ff::{FieldBits, PrimeFieldBits};

/// Shared scalar for [`Ed448`] and [`Decaf448`].
/// Use [`EdwardsScalar`] and [`DecafScalar`] directly.
///
Expand Down Expand Up @@ -550,19 +547,6 @@ impl<C: CurveWithScalar> Retrieve for Scalar<C> {
}
}

#[cfg(feature = "bits")]
impl<C: CurveWithScalar> PrimeFieldBits for Scalar<C> {
type ReprBits = [Word; U448::LIMBS];

fn to_le_bits(&self) -> FieldBits<Self::ReprBits> {
self.scalar.to_words().into()
}

fn char_le_bits() -> FieldBits<Self::ReprBits> {
ORDER.to_words().into()
}
}

impl<C: CurveWithScalar> From<U448> for Scalar<C> {
fn from(uint: U448) -> Self {
<Self as Reduce<U448>>::reduce(&uint)
Expand Down
Loading
Loading