What is cryptography? What can it do? How to use it?
First, let’s consider an example in sending text message over the network. Alice wants to have a secret date with Bob, so she sends him a message telling where she will be this evening. Unfortunately, Oscar – a friend of them – somehow manage to join in the conversation and read everything. Alice and Bob know about this, thus this time they change their location and want to hide it so Oscar cannot figure out. Therefore, they think of ways to hide the message so that only they can read it.
Figure 1. Scenario
The ways used to secure all the information are called cryptography. Cryptography is the science of using mathematics to encrypt and decrypt data. It enables people to store sensitive information/data or transmit it across insecure networks so that no one can read it except the intended recipient.
The original message is called plaintext, the encrypted message is call ciphertext. Using an encryption rule combined with a predetermined key, the plaintext will be encrypted into the ciphertext. The ciphertext will be then sent over the channel. With the same method, we can decrypt the ciphertext back to the plaintext and get the data.
Firgure 2. A Cryptosystem
The whole process is packed into a system called cryptosystem. A cryptosystem is a five-tuple (P, C, K, E, D), where
- P is a finite set of possible plaintexts;
- C is a finite set of possible ciphertexts;
- K, the keyspace, is a finite set of possible keys;
- For each k ∈ K, there is an encryption rule ek ∈ E and a corresponding decryption rule dk ∈ D. Each ek : P → C and dk : C → P are functions such that dk (ek (x)) = x for every plaintext element x ∈ P
*Note: Each encryption rule ek must be one-to-one function.
End of chapter 1.