Lion Cipher Lab
Use OpenSSL as a crypto toolkit: hash, HMAC, sign, and see why authenticated encryption matters
- Foundations
- Beginner
- ~60 min
- Free · no account required
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
- computing a SHA-256 hash and an HMAC with openssl dgst, and saying what each one proves
- encrypting a file with a mode that does not authenticate, and showing that a tampered file decrypts without any error
- encrypting a file with AES-256-GCM through openssl cms, and showing that the same kind of tampering is detected
- creating RSA and ECDSA keys, signing a file and watching verification fail after an edit
- encrypting a large file for a recipient with a hybrid flow, and explaining why RSA alone cannot do it
- naming algorithms and key sizes to avoid, with the NIST transition document as the reference
Steps in this lab
- Set up, and meet the four questions
- Hash a file, change one character, and compare
- Add a key: HMAC
- Encrypt with a mode that does not authenticate, then tamper
- Try GCM with openssl enc, and read why it refuses
- Create RSA and ECDSA keys, sign a file, and watch verification fail
- Why RSA alone cannot encrypt a file, and the hybrid fix
- Tamper with the GCM file and watch decryption refuse
- Algorithms and key sizes to avoid
- Clean up
Open the full interactive lab →