ABSTRACT

Many arithmetical techniques involve operating with modular number systems, which are of importance in both theory and applications. Modular arithmetic deals with remainders of integer division. This chapter considers an informal introduction to modular arithmetic with Maple. The Maple number theory library numtheory features — among other things — a rich set of functions for modular arithmetic. Exponentiation in modular arithmetic is a well-known trapdoor function, easy to do but very difficult to undo. In other words, the discrete logarithm is a lot more time-consuming than its inverse, the exponentiation. Since Fp is a field, defining polynomials with coefficient in Fp presents no conceptual difficulty: one represents the coefficients as integers. Addition, subtraction, and multiplication derive naturally from the corresponding integer operations.