## Encryption: Security Through Mathematics

### Overview

Encryption is the transformation of data into a form unreadable by anyone without a secret decryption key. Its purpose is to ensure privacy by keeping the information hidden from anyone for whom it is not intended, even those who can see the encrypted data. For example, one may wish to encrypt files on a hard disk to prevent an intruder from reading them.

This five week module is designed to teach you the basics of ciphers , encryption and decryption, and using the RSA algorithm.

Week 1: Ciphers
A cipher is any method of encrypting text. It is also sometimes used to refer to the encrypted text message itself although here the term ciphertext is preferred.

Some ciphers work by realigning the alphabet (for example, A is represented by B, C is represented by D, and so forth) or otherwise manipulating the text in a consistent pattern. However, almost all serious ciphers use both a key (a variable that is combined in some way with the unencrypted text) and an algorithm (a formula for combining the key with the text).

Week 2: Cryptography Theory and Entropy
Cryptography helps protect data from being viewed or modified and helps provide a secure means of communication over otherwise insecure channels. For example, data can be encrypted using a cryptographic algorithm, transmitted in an encrypted state, and later decrypted by the intended party. If a third party intercepts the encrypted data, it will be difficult to decipher.

In a typical situation where cryptography is used, two parties (Alice and Bob) communicate over an insecure channel. Alice and Bob want to ensure that their communication remains incomprehensible by anyone who might be listening. Furthermore, because Alice and Bob are in remote locations, Alice must be sure that the information she receives from Bob has not been modified by anyone during transmission. In addition, she must be sure that the information really does originate from Bob and not from someone impersonating Bob.

Cryptography is used to achieve the following goals:

• Confidentiality: To help protect a user's identity or data from being read.
• Data integrity: To help protect data from being altered.
• Authentication: To assure that data originates from a particular party.

To achieve these goals, you can use a combination of algorithms and practices known as cryptographic primitives to create a cryptographic scheme.

Week 3: Public Key Cryptography
Public-key cryptography refers to a cryptographic system requiring two separate keys, one of which is secret and one of which is public. Although different, the two parts of the key pair are mathematically linked. One key locks or encrypts the plaintext, and the other unlocks or decrypts the ciphertext. Neither key can perform both functions by itself. The public key may be published without compromising security, while the private key must not be revealed to anyone not authorized to read the messages.

Week 4: The RSA Algorithm Under the Hood Part 1
The fourth week of the encryption module continues upon the discussion of one-way functions from the previous module. The course introduces the definition of greatest common divisors and presents the Euclidean Algorithm as a method to determine the greatest common divisor of two numbers. The course also introduces Fermat’s Little Theorem, a key theorem in number theory which is heavily used in the RSA Algorithm that.

Week 5: The RSA Algorithm Under the Hood Part 2
The final week of the encryption module completes the discussion of the RSA Algorithm by defining public-key cryptography and its real-world applications. The module then describes the process of generating public and private keys, and the encryption and decryption process in the RSA Algorithm. Upon completion of this lesson, the student should be adequately prepared to handle all concepts in the encryption module and answer any problems related to this course.

Module Author

### Week 1: Ciphers

• Substitution Ciphers Part 1
• Vigenere Ciphers Part 2
• Playfair Cipher 1 Part 3
• Strengthening Vigenere Ciphers Part 4

### Week 2: Cryptography Theory and Entropy

• Cryptography Theory and Entropy Part 1
• Cryptography Theory and Entropy Part 2
• Cryptography Theory and Entropy Part 3

### Week 3: Public Key Cryptography

• Public Key Cryptography Part 1, OneWay Functions and Discrete Logarithms
• Public Key Cryptography Part 2, Discrete Logarithms and DiffieHellman Key Exchange

### Week 4: The RSA Algorithm Under the Hood Part 1

• The RSA Algorithm Under the Hood Part 1, Prime Numbers, Euclidean Algorithm, & Greatest Common Divis
• The RSA Algorithm Under the Hood Part 2, Prime Numbers, Euclidean Algorithm, & Greatest Common Divis
• The RSA Algorithm Under the Hood Part 3, Greatest Common Divisor and Fermat's Little Theorem

### Week 5: The RSA Algorithm Under the Hood Part 2

• The RSA Algorithm Under the Hood Part 4
• The RSA Algorithm Under the Hood Part 5
• The RSA Algorithm Under the Hood Part 6