cryptopals

Matasano's cryptopals challenges (cryptopals.com).
git clone git://git.jtobin.io/cryptopals.git
Log | Files | Refs | README | LICENSE

commit 60a9b93452810acee10df849f4da2f73210d915d
parent e05cd6e0f14a480fe3795bff9327526c678f88c6
Author: Jared Tobin <jared@jtobin.io>
Date:   Thu, 28 Sep 2023 15:45:23 +0400

Fix typo, axe fromJust.

Diffstat:
Mdocs/s5.md | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/s5.md b/docs/s5.md @@ -355,7 +355,7 @@ the result pretty quickly: A note on primegen for RSA: I didn't bother with it, as recommended, but looked at how it should be done. It seems straightforward; one generates a sufficiently large random number, then tests that it isn't divisible -by the first serveral hundred primes, then performs a probabilistic +by the first several hundred primes, then performs a probabilistic primality test sufficiently many times that the error probability is very small. A reference suggested that the error probability should be less than 1 / 2^128. @@ -457,9 +457,9 @@ So, following the CRT construction: > let ms2 = n0 * n1 > > :{ - > let res = (roll c0 * ms0 * M.fromJust (modinv ms0 n0) - > + roll c1 * ms1 * M.fromJust (modinv ms1 n1) - > + roll c2 * ms2 * M.fromJust (modinv ms2 n2)) + > let res = (roll c0 * ms0 * modinv' ms0 n0 + > + roll c1 * ms1 * modinv' ms1 n1 + > + roll c2 * ms2 * modinv' ms2 n2) > `mod` > (n0 * n1 * n2) > :}