Cryptography is the practice of secure communication in the presence of attackers. It allows people like Andy to send private messages to friends like Sam over public channels like WhatsApp. Encryption uses algorithms and keys to encode messages during transmission and decrypt them upon arrival. Symmetric key cryptography uses a shared private key while asymmetric key cryptography uses separate public and private keys. Popular algorithms include RSA, which uses a variable key size, and AES for block encryption. Tokenization substitutes sensitive data with non-sensitive tokens to enhance security, and JSON web tokens (JWTs) are commonly used to securely transmit information between parties in a JSON object and authenticate users via bearer authorization in headers.