Fix modular exp tests

This commit is contained in:
Mamy André-Ratsimbazafy 2020-02-22 16:39:57 +01:00
parent 4b65d0d723
commit 24f2e1088e
No known key found for this signature in database
GPG Key ID: 7B88AD1FE79492E1

View File

@ -42,7 +42,7 @@ proc main() =
var n, expected: Fq[Fake101]
n.fromUint(2'u32)
expected = n
expected.fromUint(4'u32)
n.pow(exponent)
@ -60,7 +60,7 @@ proc main() =
var n, expected: Fq[Fake101]
n.fromUint(10'u32)
expected = n
expected.fromUint(100'u32)
n.pow(exponent)
@ -77,8 +77,8 @@ proc main() =
block: # 11^2 mod 101
var n, expected: Fq[Fake101]
n.fromUint(10'u32)
expected = n
n.fromUint(11'u32)
expected.fromUint(20'u32)
n.pow(exponent)