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/elliptic-curve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
- run: cargo build --target ${{ matrix.target }} --release --no-default-features
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features arithmetic
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features bits
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features critical-section
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features dev
- run: cargo build --target ${{ matrix.target }} --release --no-default-features --features digest
Expand Down Expand Up @@ -104,6 +103,6 @@ jobs:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2026-02-11 # pinned due to rust-lang/miri#4855
toolchain: nightly-2026-05-01 # pinned due to ensure determinism
- run: rustup component add miri && cargo miri setup
- run: cargo miri test --all-features
107 changes: 4 additions & 103 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions elliptic-curve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ pem-rfc7468 = { version = "1", optional = true, features = ["alloc"] }
pkcs8 = { version = "0.11", optional = true, default-features = false }
sec1 = { version = "0.8", optional = true, features = ["ctutils", "subtle", "zeroize"] }
serdect = { version = "0.4", optional = true, default-features = false, features = ["alloc"] }
tap = { version = "1.0.1", optional = true, default-features = false } # make `bitvec`'s `wyz` work with `minimal-versions`

[dev-dependencies]
hex-literal = "1"
Expand All @@ -62,7 +61,6 @@ std = [
arithmetic = ["group"]
basepoint-table = ["arithmetic"]
critical-section = ["basepoint-table", "once_cell/critical-section"]
bits = ["dep:tap", "arithmetic", "ff/bits"]
dev = ["arithmetic", "dep:hex-literal", "pem", "pkcs8"]
ecdh = ["arithmetic", "digest", "dep:hkdf"]
getrandom = ["arithmetic", "bigint/getrandom", "common/getrandom"]
Expand Down
23 changes: 0 additions & 23 deletions elliptic-curve/src/dev/mock_curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ use pkcs8::AssociatedOid;

#[cfg(feature = "alloc")]
use alloc::vec::Vec;
#[cfg(feature = "bits")]
use ff::PrimeFieldBits;

/// Pseudo-coordinate for fixed-based scalar mult output
pub const PSEUDO_COORDINATE_FIXED_BASE_MUL: [u8; 32] =
Expand All @@ -56,10 +54,6 @@ pub type SecretKey = crate::SecretKey<MockCurve>;
/// Scalar value type.
pub type ScalarValue = crate::ScalarValue<MockCurve>;

/// Scalar bits.
#[cfg(feature = "bits")]
pub type ScalarBits = crate::scalar::ScalarBits<MockCurve>;

/// Mock elliptic curve type useful for writing tests which require a concrete
/// curve type.
///
Expand Down Expand Up @@ -161,23 +155,6 @@ impl PrimeField for Scalar {
}
}

#[cfg(feature = "bits")]
impl PrimeFieldBits for Scalar {
#[cfg(target_pointer_width = "32")]
type ReprBits = [u32; 8];

#[cfg(target_pointer_width = "64")]
type ReprBits = [u64; 4];

fn to_le_bits(&self) -> ScalarBits {
self.0.as_uint().to_words().into()
}

fn char_le_bits() -> ScalarBits {
MockCurve::ORDER.to_words().into()
}
}

impl Generate for Scalar {
fn try_generate_from_rng<R: TryCryptoRng + ?Sized>(
rng: &mut R,
Expand Down
4 changes: 0 additions & 4 deletions elliptic-curve/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ use crate::CurveArithmetic;
#[cfg(feature = "arithmetic")]
pub type Scalar<C> = <C as CurveArithmetic>::Scalar;

/// Bit representation of a scalar field element of a given curve.
#[cfg(feature = "bits")]
pub type ScalarBits<C> = ff::FieldBits<<Scalar<C> as ff::PrimeFieldBits>::ReprBits>;

/// Instantiate a scalar from an unsigned integer without checking for overflow.
pub trait FromUintUnchecked {
/// Unsigned integer type (i.e. `Curve::Uint`)
Expand Down
Loading