Target generation, ideally, to those files we'll need for doing crypto.

This commit is contained in:
2020-04-12 19:51:29 -07:00
parent f93aa7ffc3
commit 2baa5f070d
20 changed files with 57 additions and 38 deletions

View File

@@ -27,8 +27,8 @@ modexpLR bitsize b e m = go (bitsize - 1) 1
where
go bit r0
| bit < 0 = r0
| testBit e bit = trace ("1: r = " ++ showHex r2 "") $ go (bit - 1) r2
| otherwise = trace ("0: r = " ++ showHex r1 "") $ go (bit - 1) r1
| testBit e bit = go (bit - 1) r2
| otherwise = go (bit - 1) r1
where
r1 = (r0 * r0) `mod` m
r2 = (r1 * b) `mod` m