-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'arkworks-compatibility' of github.com:penumbra-zone/dec…
…af377 into arkworks-compatibility
- Loading branch information
Showing
2 changed files
with
68 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
use super::Fp; | ||
|
||
pub const NUM_LIMBS: usize = 12; | ||
|
||
pub const MODULUS_LIMBS: [u32; 12] = [ | ||
1, 2231943168, 805306368, 386620740, 3121170432, 519266863, 16061327, 438491635, 1822509371, | ||
3325756864, 398790890, 28195398, | ||
]; | ||
|
||
pub const MODULUS_MINUS_ONE_DIV_TWO_LIMBS: [u32; 12] = [ | ||
0, 1115971584, 402653184, 193310370, 3708068864, 2407117079, 2155514311, 2366729465, 911254685, | ||
1662878432, 199395445, 14097699, | ||
]; | ||
|
||
pub const MODULUS_BIT_SIZE: u32 = 0x179; | ||
|
||
pub const TRACE_LIMBS: [u32; 12] = [ | ||
136227, 1964032000, 536894509, 2294212645, 1312586701, 1741423572, 619473035, 385987205, | ||
1135286508, 3910688532, 1720, 0, | ||
]; | ||
|
||
pub const TRACE_MINUS_ONE_DIV_TWO_LIMBS: [u32; 12] = [ | ||
68113, 3129499648, 2415930902, 3294589970, 656293350, 3018195434, 2457220165, 192993602, | ||
567643254, 1955344266, 860, 0, | ||
]; | ||
|
||
pub const TWO_ADICITY: u32 = 0x2e; | ||
|
||
pub const QUADRATIC_NON_RESIDUE_TO_TRACE: Fp = Fp::from_montgomery_limbs([ | ||
2343670258, 1761113770, 2792500817, 625887104, 529141423, 2820205081, 495800407, 739929555, | ||
2699006747, 3437600971, 3369043093, 12220676, | ||
]); | ||
|
||
pub const MULTIPLICATIVE_GENERATOR: Fp = Fp::from_montgomery_limbs([ | ||
4294965012, 367984639, 3221224285, 1721492387, 892444466, 3700424240, 1970634519, 3507452915, | ||
3506873522, 1768468278, 3989639519, 26220195, | ||
]); | ||
|
||
pub const TWO_ADIC_ROOT_OF_UNITY: Fp = Fp::from_montgomery_limbs([ | ||
2031790878, 3754616354, 3204826524, 1913374628, 226001622, 631062918, 2984565398, 3626713688, | ||
1739907172, 3086590412, 1450066569, 16622719, | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters