Security from the inside out

From random numbers, hash functions, symmetric and public-key encryption to passwords, TLS, database encryption, JWT, OAuth and SSH, then all of it together on this very site. Every post has small experiments run for real, with measurements.

  1. Hash functions: SHA-256, collisions, and why you need HMAC

    The three properties of a hash function, why MD5 and SHA-1 were retired, collisions arriving early by the birthday paradox, measuring hash speeds, forging a sha256(key + data) signature with a length-extension attack, and comparisons that don't leak timing.

  2. TLS and HTTPS: what the padlock in the address bar actually does

    TLS 1.3 combines hashing, symmetric encryption, key agreement and signatures into one handshake. Reading viet.sarl's real certificate chain, Let's Encrypt and ACME, Certificate Transparency, forward secrecy, HSTS, and the two TLS legs behind Cloudflare.

  3. OAuth 2.0, OpenID Connect and PKCE: how "Sign in with Google" works

    OAuth is for authorization, OpenID Connect for authentication. Walking the authorization code flow with PKCE through viet.sarl's real code, the role of state, the kinds of token, why the implicit flow was dropped, and a small simulated authorization server showing what PKCE protects.