These functions were written to be used in my Cryptography II course. Various modular arithmetic, field arithmetic, and other cryptographic algorithms are implemented here. Many of the functions may be tuned for a specific group or field, so they may not work for general groups or fields.
Feel free to fork/use them as you please or contact me if you have any questions.