Chonk
Chonk splits large files into encrypted chunks and reassembles them in order. Written in C++, it streams data through fixed-size buffers using PBKDF2-HMAC-SHA256 for key derivation and AES-256-CBC through OpenSSL EVP.
- The passphrase runs through OpenSSL’s PKCS5_PBKDF2_HMAC with SHA-256 to derive a 256-bit encryption key and a 128-bit initialization vector.
- Input streams through fixed-size buffers into indexed .chonk segments, keeping memory usage bounded rather than scaling with the size of the file.
- Reassembly orders the chunk indices and pipes cipher blocks through EVP_DecryptUpdate and EVP_DecryptFinal_ex, verifying PKCS#7 padding at the end.