MA158

In MA158 Cryptography, Jeff Hoffstein said that it’s okay for us to share code.

So, who can resist? I’ve been doing all of my homework with the help of a Scheme library with support for modular arithmetic (mod, ^-mod, and inverse-mod), congruence solving (x-congruent-to), a Pohlig-Hellman solver (pohlig-hellman-dlp), a Miller-Rabin prime checker (miller-rabin-probable-prime), the Jacobi operator (jacobi), and a suite of continued fraction functions (continued-fraction->latex, evaluate-each-continued-fraction, continued-fraction). To run it you’ll need a copy of PLT Scheme; use the “(module …)” language.

You might notice that some functions produce long \LaTeX derivations; to turn this off, run (currently-deriving #f).

Questions should go to .

*

a weasel in a hat

No comments yet. Be the first.

Leave a reply

Please submit only once. Comments are moderated and will not appear immediately.