Comparison of stream ciphers (Salsa20 and ChaCha20) and AEAD suites (Salsa20-Poly1305 and ChaCha20-Poly1305) over 64 B and 1024 B payloads. All operations are run on zero-allocation spans.
Software-Efficient Stream Ciphers: Salsa20 and ChaCha20 perform encryption at near-hardware speeds. The state is maintained in stackalloc memory, ensuring zero allocations.
One-Pass AEAD: The combined ciphers with Poly1305 perform authentication and decryption in a single pass over the memory block, minimizing cache misses.
Zero-Allocation Keys: High-cost key computations take ~2–2.6 μs each and run completely allocation-free (0 B), isolating cryptographic handshakes from garbage collection impacts.
Keccak Optimization: Our custom Keccak256 implementation hashes small structures in ~605 ns and 1KB structures in 4.86 μs without allocating memory.
PBKDF2 Overhead & Isolation: PBKDF2 is a secure key derivation function designed to be intentionally computationally expensive (taking ~2.5 ms per operation). Due to its CPU-bound nature, PBKDF2 checks are isolated from the networking hot path to prevent starvation of the listener thread pool.
Type to search across all 203 Nalix documentation pages.