Skip to content

Commit

Permalink
Fix GENERATOR
Browse files Browse the repository at this point in the history
Resolves: #100
  • Loading branch information
moCello committed May 19, 2023
1 parent ce28729 commit fcbc05d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fix scalar field generator [#100]

## [0.11.3] - 2023-05-17

### Changed
Expand Down Expand Up @@ -181,6 +185,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Rename `S` to `TWO_ADACITY` and export it

<!-- Issues -->
[#100]: (https://github.com/dusk-network/bls12_381/issues/100)
[#93]: (https://github.com/dusk-network/bls12_381/issues/93)
[#75]: (https://github.com/dusk-network/bls12_381/issues/75)
[#84]: (https://github.com/dusk-network/bls12_381/issues/84)
Expand Down
9 changes: 7 additions & 2 deletions src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,13 @@ pub const ROOT_OF_UNITY: Scalar = Scalar([
0x5bf3adda19e9b27b,
]);

/// Generator of the Scalar field
pub const GENERATOR: Scalar = Scalar([7, 0, 0, 0]);
/// GENERATOR = 7 (multiplicative generator of r-1 order, that is also quadratic nonresidue)
pub const GENERATOR: Scalar = Scalar([
0x0000_000e_ffff_fff1,
0x17e3_63d3_0018_9c0f,
0xff9c_5787_6f84_57b0,
0x3513_3220_8fc5_a8c4,
]);

impl<T> Product<T> for Scalar
where
Expand Down

0 comments on commit fcbc05d

Please sign in to comment.