Lesson 1.1: Encoding, encryption and hashing
What cryptography is for (confidentiality, integrity, authenticity) and the three transformations that beginners and even vendors mix up. Encoding changes the format so anyone can reverse it, encryption hides data from everyone without the key, and hashing makes a one-way fingerprint. In the lab you find a database password a vendor tool claims to have 'encrypted', decode it in one command, then encrypt and hash the same password and compare the three results.
16 min
You will learn to
- Name the goals of cryptography
- Tell encoding, encryption and hashing apart
- Decode Base64 and read bytes with xxd
- Explain why encoding is not protection
- Explain what a key is
Key terms
- Cryptography
- The science of protecting information with mathematics: keeping it secret, detecting changes and proving who sent it.
- Encoding
- Changing data into another format by public rules, so anyone can change it back. No secret involved.
- Encryption
- Transforming data with an algorithm and a key so that only someone with the right key can read it.
- Hashing
- Turning any input into a fixed-size fingerprint (a hash or digest) that can't be turned back.
- Key
- The secret value that controls encryption. The algorithm is public; the key is what must stay secret.
- Byte and hexadecimal
- A byte is 8 bits (0-255). Hexadecimal writes each byte as two characters 00-ff.
All lessons · What is cybersecurity? Confidentiality, integrity, availability →