@@ -21,6 +21,15 @@ The `ff` crate contains `Field`, `PrimeField`, `PrimeFieldRepr` and `SqrtField`
|
||||
|
||||
If you need an implementation of a prime field, this library also provides a procedural macro that will expand into an efficient implementation of a prime field when supplied with the modulus. `PrimeFieldGenerator` must be an element of Fp of p-1 order, that is also quadratic nonresidue.
|
||||
|
||||
First, enable the `derive` crate feature:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
ff = { version = "0.3", features = ["derive"] }
|
||||
```
|
||||
|
||||
And then use the macro like so:
|
||||
|
||||
```rust
|
||||
extern crate rand;
|
||||
#[macro_use]
|
||||
|
||||
Reference in New Issue
Block a user