mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
Remove FieldExt::rand
This removes a dependency on the `getrandom` crate in no-std mode, which doesn't work on some no-std targets that `getrandom` doesn't support.
This commit is contained in:
parent
ab03c3d5e1
commit
f874d29238
3 changed files with 2 additions and 6 deletions
|
|
@ -21,6 +21,7 @@ and this project adheres to Rust's notion of
|
|||
- `FieldExt::from_u64` (use `From<u64> for ff::PrimeField` instead).
|
||||
- `FieldExt::{from_bytes, read, to_bytes, write}`
|
||||
(use `ff::PrimeField::{from_repr, to_repr}` instead).
|
||||
- `FieldExt::rand` (use `ff::Field::random` instead).
|
||||
|
||||
## [0.2.1] - 2021-09-17
|
||||
### Changed
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ required-features = ["std"]
|
|||
blake2b_simd = { version = "0.5", default-features = false }
|
||||
ff = { version = "0.11", default-features = false }
|
||||
group = { version = "0.11", default-features = false }
|
||||
rand = { version = "0.8", default-features = false, features = ["getrandom"] }
|
||||
rand = { version = "0.8", default-features = false }
|
||||
static_assertions = "1.1.0"
|
||||
subtle = { version = "2.3", default-features = false }
|
||||
|
||||
|
|
|
|||
|
|
@ -112,11 +112,6 @@ pub trait FieldExt: SqrtRatio + From<bool> + Ord + Group<Scalar = Self> {
|
|||
/// Element of multiplicative order $3$.
|
||||
const ZETA: Self;
|
||||
|
||||
/// This computes a random element of the field using system randomness.
|
||||
fn rand() -> Self {
|
||||
Self::random(rand::rngs::OsRng)
|
||||
}
|
||||
|
||||
/// Obtains a field element congruent to the integer `v`.
|
||||
fn from_u128(v: u128) -> Self;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue