Yet Another Introductory Number Theory Textbook (Cryptology Emphasis Version) - Poritz, Jonathan A. (Open textbook library., 2014)
This version of YAINTT has a particular emphasis on connections to cryptology. The cryptologic material appears in Chapter 4 and §§5.5 and 5.6, arising naturally (I hope) out of the ambient number theory. The main cryptologic applications – being the RSA cryptosystem, Diffie-Hellman key exchange, and the ElGamal cryptosystem – come out so naturally from considerations of Euler’s Theorem, primitive roots, and indices that it renders quite ironic G.H. Hardy’s assertion [Har05] of the purity and eternal inapplicability of number theory. Note, however, that once we broach the subject of these cryptologic algorithms, we take the time to make careful definitions for many cryptological concepts and to develop some related ideas of cryptology which have much more tenuous connections to the topic of number theory. This material therefore has something of a different flavor from the rest of the text – as is true of all scholarly work in cryptology (indeed, perhaps in all of computer science), which is clearly a discipline with a different culture from that of “pure”mathematics. Obviously, these sections could be skipped by an uninterested reader, or remixed away by an instructor for her own particular class approach.