An introduction to arithmetic topics that have been at the centre of interest in applications of number theory, particularly in cryptography. It begins with a discussion of the basic number theory that is needed. It takes an algorithmic approach, emphasising estimates of the efficiency of the techniques that arise from the theory.