Benjamin Italiaander / Topics / Security

Protecting accounts, logins and systems.

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.
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.
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.
Fixes for common YubiKey problems on Linux: card not found, wrong SSH agent, locked PIN
Best practice for generating an Ed25519 SSH key pair with ssh-keygen, and what the options mean.
ContactNov 29, 2026
How to reach me: LinkedIn, GitHub and GitLab, and how to send me something confidential.
Keys only, no root login, a firewall and fail2ban: the settings I put on every Linux server that is reachable over SSH.
Get an email every time someone logs in over SSH or on the console, using PAM and a small script.
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.
Install GnuPG, pcscd and ykman, and make sure your YubiKey is detected
Replace every default PIN, PUK and management key before using your YubiKey
Store authenticator (TOTP) codes on your YubiKey and get them from the CLI or a rofi menu
Create an SSH key that lives on your YubiKey using FIDO2 (ed25519-sk)
Create GPG keys, move the subkeys to your YubiKey and use them for signing, encryption and SSH
Use your YubiKey for sudo, desktop (GDM) and TTY login with pam_u2f on Ubuntu and Fedora
Unlock your encrypted disk with your YubiKey at boot, and sign your Git commits with an SSH key on the YubiKey.
A chapter-by-chapter guide to setting up and using a YubiKey from the Linux CLI (Debian/Ubuntu and Fedora)
The GnuPG commands I use most with a YubiKey: the card menu, key status and editing the card.
Bash OTP GeneratorJun 5, 2016
Generate TOTP codes in the terminal with oathtool, with the secret encrypted by GPG.
The correct permissions for ~/.ssh, your keys, authorized_keys and config.

Other topics

All topics and genres β†’