#chacha20-poly1305 #derivation #xchacha20-poly1305 #byte #file #prompt #argon2id

bin+lib noxs

A library for authenticated encryption (ChaCha20-Poly1305) with password-based key derivation (Argon2id)

4 stable releases

1.2.4 Mar 31, 2025
1.2.3 Mar 30, 2025
1.2.2 Mar 28, 2025
1.2.0 Aug 9, 2024

#528 in Cryptography

Download history 87/week @ 2025-03-23 273/week @ 2025-03-30 27/week @ 2025-04-06

387 downloads per month

MIT license

115KB
301 lines

NoXS

  • Command line tool & library for authenticated encryption with password-based key derivation

Key derivation: Argon2id

  • Parameters: iterations = 2, memory = 1024*256, parallelism = 2
  • Input: password, secure random salt/nonce (24 bytes)
  • Output: key (32 bytes)

Authenticated encryption: XChaCha20-Poly1305

  • Input: key (32 bytes), secure random salt/nonce (24 bytes), plaintext (n bytes)
  • Output: version 0x78 (1 byte) || secure random salt/nonce (24 bytes) || ciphertext (n bytes) || authentication tag (16 bytes)

NoXS

Usage

With interaction (password prompt)

  • noxs <command> <in_file> <out_file>

Without interaction (password from file)

  • noxs <command> <in_file> <out_file> <password_file>

Commands

  • e = encrypt
  • ea = encrypt & base64-encode
  • d = decrypt
  • da = base64-decode & decrypt

Build with Rust and install to /usr/local/bin

  • build_install

Dependencies

~4–17MB
~158K SLoC