Skip to content
HV Hugo Vicente
About Experience Projects Blog Contact
CV
← All tags
Tag

Cryptography

  • Nov 22, 2026 GoVPNSecurityCryptography

    The WireGuard handshake, message by message

    Building the two messages of the WireGuard handshake, so two peers can agree on fresh transport keys from their key pairs alone, and testing it against an independent implementation.

    Read →
  • Nov 18, 2026 GoVPNSecurityCryptography

    The building blocks of the WireGuard handshake

    Implementing and testing the hash functions, key derivation, and handshake state that the WireGuard handshake is built from, before writing the handshake itself.

    Read →
  • Nov 10, 2026 GoVPNSecurityCryptography

    X25519 key pairs

    Giving each peer its own X25519 key pair, with genkey and pubkey commands that match WireGuard's, as the first step towards a key exchange.

    Read →
  • Nov 6, 2026 GoVPNSecurityCryptography

    Rejecting replayed messages

    Making sure each tunnel message is accepted at most once, with a sliding window of recent counters that still allows packets to arrive out of order.

    Read →
  • Nov 5, 2026 GoVPNSecurityCryptography

    One key per direction

    Fixing the nonce reuse from the previous post by deriving a separate key for each direction of the tunnel with HKDF-SHA256.

    Read →
  • Nov 3, 2026 GoVPNSecurityCryptography

    Encrypting tunnel traffic with ChaCha20-Poly1305

    Encrypting every tunneled packet with ChaCha20-Poly1305 in WireGuard's message format, and the known weakness I left in on purpose.

    Read →
© 2026 Hugo Oliveira Vicente Built & deployed on Cloudflare Pages Back to blog ↑
Esc

    No matches.

    ↑↓ navigate ↵ select esc close