Skip to main content
Logo image

Chapter 8 Codes

In this chapter, we use functions to encode and encrypt text. First, we introduce a function that represents characters by numbers in Section 8.1. Next, we give a short introduction to symmetric key cryptography in Section 8.2 and describe simple symmetric key crypto systems, namely Caesar ciphers in Section 8.3 and other substitution ciphers in Section 8.4. We end with an attack on substitution ciphers called frequency analysis in Section 8.5.