summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-04-08 01:45:35 -0700
committerOri Bernstein <ori@eigenstate.org>2018-04-08 01:45:35 -0700
commit85e3adbca63041d3628e9f8d55d83aa34d084008 (patch)
tree5243618c27651410d890109f27333fdb9a169dac
parent32fd9ebd1835ebb788ddf8555dab777e32ee3f97 (diff)
downloadmc-85e3adbca63041d3628e9f8d55d83aa34d084008.tar.gz
Add a nontrivial modpow test.
-rw-r--r--lib/crypto/test/ctbig.myr10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/crypto/test/ctbig.myr b/lib/crypto/test/ctbig.myr
index 89b9616..dcaa1d0 100644
--- a/lib/crypto/test/ctbig.myr
+++ b/lib/crypto/test/ctbig.myr
@@ -114,14 +114,20 @@ const main = {
// "392318858376010676506814412592879878824393346033951606800",
// "5192296858534810493479828944327220")
//}],
- [.name="modpow", .fn={ctx
+ [.name="modpow-nop", .fn={ctx
do3(ctx, crypto.ctmodpow, Nbit,
"1231231254019581241243091223098123",
"1231231254019581241243091223098123",
"1",
"238513807008428752753137056878245001837")
}],
-
+ [.name="modpow", .fn={ctx
+ do3(ctx, crypto.ctmodpow, Nbit,
+ "134487661739548107356399382114451163287",
+ "1231231254019581241243091223098123",
+ "312312091230",
+ "238513807008428752753137056878245001837")
+ }],
][:])
}