« Previous
Next »
Crypto HOME
Welcome to the iwantcoding.com Cryptography Tutorial. Practical cryptography for app developers. Pick safe primitives, use vetted libraries, never hand-roll an algorithm. Almost every CVE in this space is misuse, not breakage.
What this tutorial covers
| Chapter | You will learn |
|---|---|
| Cryptography | CIA model, CSPRNGs, encoding vs encryption, symmetric ciphers, AES-GCM, ChaCha20-Poly1305, asymmetric / public key, RSA, ECC / Ed25519. |
| Hashing & Auth | SHA-2 / SHA-3 / BLAKE3, password hashing (argon2 / bcrypt), KDFs (HKDF / PBKDF2 / scrypt), HMAC, JWT, signatures. |
| In Practice | TLS / HTTPS, PKI, key management, KMS / Vault, MFA + TOTP, WebAuthn / passkeys, post-quantum. |
| Pitfalls | Never roll your own, constant-time compares, common misuses, safe libraries. |
| Examples | Cheatsheet, runnable snippets, quiz, exercises, bootcamp, certificate. |
Who this is for
- Backend devs handling secrets.
- AppSec engineers auditing crypto APIs.
- Anyone shipping passkeys, JWTs, or webhooks.
How to use this tutorial: read the chapter, run the example with Try it Yourself », do the exercise, then take the quiz at the bottom. Hit Mark complete when you're done — the sidebar will track your progress.
Example
Example
import { createHash, randomBytes } from 'crypto';
const digest = createHash('sha256').update('hello').digest('hex');
const token = randomBytes(32).toString('hex');
console.log(digest, token);
Try it Yourself »
« Previous
Next »
Discussion
Loading…