Skip to content

Original examples

The original project paired mbed TLS with PyCA cryptography and paired libsodium with PyNaCl. The annotated tag original-examples marks commit 736c515 on master (November 9, 2019), the last revision before the modernization. It includes the original source, build instructions, and slides. The current C examples link against an installed OpenSSL. Updates to that C library come from your platform's package manager.

Earlier lesson Current walkthrough
AES-GCM file encryption and NaCl SecretBox AES-256-GCM and ChaCha20-Poly1305
ECDH and key derivation X25519, HKDF and ML-KEM
Password-based key derivation Argon2id
RSA and NaCl signing Ed25519 and ML-DSA

The AES-GCM file layout is retained. To read an older AES-256-GCM file, supply its original 32 key bytes in a binary key file and the original UTF-8 associated data. The earlier hex: prefix and hexadecimal characters were command-line notation. A SecretBox ciphertext or RSA signature uses a different algorithm and needs the appropriate original reader or verifier.

To read the original build instructions from an existing clone:

git fetch origin tag original-examples
git show original-examples:README.md

Browse the tagged source or read the original presentation.