Lion Cipher Lab

Use OpenSSL as a crypto toolkit: hash, HMAC, sign, and see why authenticated encryption matters

Why it matters

Most real cryptography mistakes are not broken algorithms; they are the wrong tool for the job. A hash is not a signature, encryption is not integrity, and a mode with no authentication will happily decrypt a forged file. OpenSSL is on almost every machine, so you can try each tool in minutes and see its limit with your own eyes. That firsthand sense of what each primitive does, and does not, promise is what lets you read a design, or a security finding, and know whether it holds.

What you'll learn

Steps in this lab

  1. Set up, and meet the four questions
  2. Hash a file, change one character, and compare
  3. Add a key: HMAC
  4. Encrypt with a mode that does not authenticate, then tamper
  5. Try GCM with openssl enc, and read why it refuses
  6. Create RSA and ECDSA keys, sign a file, and watch verification fail
  7. Why RSA alone cannot encrypt a file, and the hybrid fix
  8. Tamper with the GCM file and watch decryption refuse
  9. Algorithms and key sizes to avoid
  10. Clean up

Open the full interactive lab →

Keep learning