Security and Cryptography

PrettyMeng, code

Entropy

Hash Functions

Key Derivation Functions (KDFs)

Symmetric Cryptography

Asymmetric Cryptography

keygen() -> (public key, private key) (a randomized function)
encrypt(plaintext: array<byte>, public key) -> array<byte> (the ciphertext)
decrypt(plaintext: array<byte>, private key) -> array<byte> (the plaintext)
sign(message: array<byte>, private key) -> array<byte> (the signature)
verify(message: array<byte>, signature: array<byte>, publickey) -> bool (whether or not the signature is valid)

Case Studies

Passward Manager

Two-factor Authentification (2FA)

Full-disk Encryption

Private Messaging

SSH

Example of Combining Symmetric and Asymmetric Cryptography

Hybrid Encryption

CC BY-NC 4.0 © PrettyMeng.RSS