Learning path

Full curriculum

Full curriculum

Unit content

Symmetric encryption and secret keys

Symmetric encryption uses the same secret key, or closely related secret material, for encryption and decryption.

An encryption algorithm transforms plaintext $m$ into ciphertext $c$ using key $k$:

$$c=E_k(m).$$

Decryption recovers the plaintext:

$$m=D_k(c).$$

The intended security goal is confidentiality: without the key, the ciphertext should not reveal useful information about the plaintext under the scheme's security assumptions.

Modern encryption must also handle repeated messages safely. Secure schemes incorporate a nonce, initialization value or randomized mechanism so identical plaintexts do not simply reveal identical ciphertext patterns.

Encryption alone does not necessarily detect tampering. A ciphertext can be confidential while still being malleable, which is why practical protocols usually require integrity and authenticity in addition to secrecy.

The cryptographic algorithm can be public; security should depend on protecting the key, not on hiding how the algorithm works.