A few number theory routines



On 9/9/07, Alasdair McAndrew <amca01 at gmail.com> wrote:

> 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).

> 1) Are there any other routines I should include?

Nothing comes to mind. Maybe others have some ideas.

Do any of the functions mentioned already exist in some form
in Maxima? I don't remember for sure but I don't know much
about number theoretic stuff either. It's OK with me if you want
to write new versions of some functions which already exist.

> 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)?

Well, what would be very helpful is documentation (including refs
to the literature as appropriate) for each intended-to-be-external
function, and a set of test cases, comprising an input and the
expected output. The documentation could just as well be in the
form of comments in the program file; we can massage it into
Texinfo later. The test cases would have to be a separate file.

If you are willing to release the program + any documentation +
any test cases under the terms of Maxima proper (i.e. GPL v2)
then I would be happy to copy those items into maxima/share/contrib/.

best

Robert Dodier