Cryptosystem

Why
Cryptosystems are important because they allow us to transmit messages securely, without worrying that a third party who intercepts the message will be able to understand it or steal valuable secrets.

What
A cryptosystem must formally have these qualities
 * $$M$$ - plaintext message space (original message)
 * $$C$$ - ciphertext message space (encoded message)
 * $$K$$ - encryption keys
 * $$K^'$$ - decryption keys
 * $$G$$ - efficient key generation algorithm
 * $$E$$ - efficient encryption algorithm
 * $$D$$ - efficient decryption algorithm

Secret-Key Cryptosystem
In a secret-key cryptosystem, we do not publish our encryption key $$ke$$ and so we have that $$ke = kd$$

Also Known As
The secret-key cryptosystem is also called a symmetric cryptosystem because its encryption key is the same as its decryption key

Public-Key Cryptosystem
In a public-key cryptosystem, we publich our encryption key $$ke$$ for the world to send us encrypted messages. In a public-key cryptosystem, $$ke \neq kd$$

Also Known As
The public-key cryptosystem is also known as an assymmetric cryptosystem because its encryption key and decryption key do not match.

How
A cryptosystem operates in the following way When we receive an encrypted message that we want to decrypt, we do so in the following way:
 * 1) Generate the encryption key $$ke$$ and decryption key $$kd$$ using the key generation algorithm $$G$$
 * 2) Use the encryption key to get the ciphertext message from the plaintext message in the following way. $$C = E_{ke}(M)$$
 * 3) Send the encrypted message to the intended receiver
 * 1) Retrieve the original plaintext message by applying the formula. $$M = D_{kd}(C)$$

Requirement to be a Cryptosystem
For a cryptosystem to be considered functional, it must hold that $$M = D_{kd}(E_{ke}(M))$$. In other words, we must be able to retrieve the original message by applying the encryption and then the decryption algorithms in sequence.

Shannon's Property
Shannon's Property states that a good cryptographic system should have a mix-transformative behavior. This means that it should be capable of uniformly mapping a small plaintext space into the larger message space

Kerchoff's Principle
Acquiring information about the encryption and decryption algorithms should not comprimise the security of the cryptosystem, as well as information about key sizes and the plaintext message space