A few number theory routines



Hi Maximites,

I'm preparing a few (useful) number theoretical routines, which I'm using
with my students in a cryptography subject.  These routines are (so far):
extended Euclidean algorithm, primitive roots, discrete logs (using the
Pohlig-Hellman algorithm), Chinese remainder theorem, multiplicative order
(modulo a prime).

I have two questions:

1) Are there any other routines I should include?

2) Currently I just have one .mac file, not terrible well commented.  How
best would you like me to make these routines available (that is, if anyone
wants them)?

cheers,
Alasdair