Benjamin Italiaander / Topics / Encryption

GnuPG, age, OpenSSL and how keys work.

Math / Public Key Cryptography
Practise modular arithmetic step by step: remainders, negative numbers, inverses, the extended Euclidean algorithm, solving equations, Fermat's little theorem, and where you already use it (weekdays, IBAN, ISBN).
Math / Public Key Cryptography
Play both sides of a Diffie–Hellman exchange, see why the group must have a large prime order, run a man-in-the-middle attack and a small-subgroup attack with real numbers, take a discrete log apart with Pohlig–Hellman, and see which groups real protocols use.
Math / Public Key Cryptography
Sign and verify with Schnorr and ECDSA on a small curve, see why Schnorr is secure (identification and Fiat–Shamir), extract a private key from a reused nonce in both schemes, and see how Ed25519 makes that impossible.
Math / Public Key Cryptography
Practise the one-way functions behind public-key cryptography: square-and-multiply by hand, discrete logarithms, generators, baby-step giant-step, and factoring (and why primes that are close together are a disaster).
Math / Public Key Cryptography
Build RSA keys by hand, encrypt, decrypt and sign, see the full proof of why it works, speed it up with the Chinese remainder theorem, break textbook RSA in five different ways, and read a real OpenSSL key.
Math / Public Key Cryptography
Derive the point-addition formulas yourself, find every point on a curve by hand, compute with double-and-add, do ECDH on two small curves, and see how Curve25519, X25519, the Montgomery ladder and Edwards curves turn this into the key exchange in every SSH and HTTPS connection.
The maths behind the six-digit codes of an authenticator app: HMAC, a time counter and dynamic truncation, with a Python version you can check yourself.
Key Derivation Function
Math / Public Key Cryptography
What prime numbers are, why there are infinitely many, how many there are, Euler's φ and Fermat's little theorem with proofs, how computers test whether a 300-digit number is prime, and the special primes used in real cryptography. With exercises.
A four-part explainer: the mathematics behind public-key cryptography with small worked examples, then how SSH, OpenPGP, TLS, WireGuard, FIDO2 and Signal use it.
Math / Public Key Cryptography
Clock arithmetic, RSA, Diffie–Hellman, elliptic curves and digital signatures, each worked out with small numbers you can check by hand.
Math / Public Key Cryptography
A real SSH connection step by step: algorithm negotiation, the (post-quantum) key exchange, the host key signature, known_hosts, session keys and how your own key proves who you are.
Math / Public Key Cryptography
Encryption without a live connection: primary keys and subkeys, the random session key, ECDH with a throwaway key, signatures, fingerprints and the web of trust, with real gpg packet output.
Math / Public Key Cryptography
Four more ways to combine the same mathematics: certificates in HTTPS, signature-free authentication in WireGuard, phishing-proof logins with FIDO2 and passkeys, and keys that change with every message in Signal.
Math / Public Key Cryptography
Where the 77 digits of Curve25519 and the 925 digits of an RSA-3072 key come from, what 128-bit security means, why RSA needs twelve times more digits than an elliptic curve, why we don't simply use bigger numbers, and what quantum computers change.
🔧 Fix 1 note
GnuPGJan 1, 2021
GnuPG is a complete and free implementation of the OpenPGP standard
🧭 Guide 8 notes
Encrypted, deduplicated backups with Borg: set up a repository, make and restore backups, clean up, a locked-down backup server, and automatic daily runs.
ContactNov 29, 2026
How to reach me: LinkedIn, GitHub and GitLab, and how to send me something confidential.
Back up your home folder with restic: encrypted, deduplicated snapshots to a USB disk or a server, every day automatically.
A guide (by Igor Soarez) to setting up your own certificate authority with OpenSSL.
Math / Public Key Cryptography
How S/MIME signs and encrypts email, the mathematics inside it, where to get a certificate (free, paid, or through your university), how to make your own key with OpenSSL, and how to set it up in Thunderbird, Outlook, Zimbra and Evolution.
Create GPG keys, move the subkeys to your YubiKey and use them for signing, encryption and SSH
Linux / Yubikey
Encrypt files with age using keys stored in the YubiKey's PIV application
Unlock your encrypted disk with your YubiKey at boot, and sign your Git commits with an SSH key on the YubiKey.
The GnuPG commands I use most with a YubiKey: the card menu, key status and editing the card.
💡 Tip 2 notes
Bash OTP GeneratorJun 5, 2016
Generate TOTP codes in the terminal with oathtool, with the secret encrypted by GPG.
Extract and inspect the RSA public key that belongs to a private key with OpenSSL.

Other topics

All topics and genres →