All courses › Databases, Networks and Security › Encryption

Encryption

Encryption makes data unreadable to anyone without the key. Symmetric encryption uses the same key to lock and unlock, and is fast. Asymmetric encryption has a key pair: a public key anyone can use, and a private key only the owner has.

C=Ek(M), M=Dk(C)C = E_k(M),\ M = D_k(C)symmetric: the same key k
C=Epub(M), M=Dpriv(C)C = E_{pub}(M),\ M = D_{priv}(C)asymmetric: public and private key

Symbols

MMplaintext
CCciphertext
kkkey

Example

HTTPS uses asymmetric encryption to agree on a shared key, and then fast symmetric encryption for the rest of the conversation.

The private key must never be shared or put in the code.
Practise cyber security for free →

← Password strength · Hashing →

Part of Databases, Networks and Security: Cyber security.