IntelligenceAlgorithmsxsalsa20-poly1305
XSalsa20-Poly1305
Authenticated encryption combining XSalsa20, a Salsa20 variant with a 192-bit nonce, with the Poly1305 authenticator. It is the crypto_secretbox construction of NaCl and libsodium, and TweetNaCl exposes it as secretbox. Grover's search would roughly halve its effective key strength, so its 256-bit keys stay adequate.
In short
What a quantum computer changes.
- Quantum effect
- Weakened by Grover's search
- Family
- SymmetricRests on stream cipher security.
- What it means
- Grover's algorithm searches an unstructured space in roughly the square root of the usual number of steps. Against a symmetric key or a hash preimage, that roughly halves the effective security in bits: a 128-bit key gives about 64 bits of security against it. In practice the answer is size, not replacement. Keys and outputs of 256 bits stay adequate. Grover's search also needs a long, sequential run on a fault-tolerant machine and does not split well across many machines, so the effect is a smaller margin, not a break.
This describes the family, not any project that uses it.
16 in the catalogue
Packages that provide it
| Package | Provides |
|---|---|
| @noble/ciphersnpm | Pure TypeScript symmetric cipher library: ChaCha20-Poly1305 and XChaCha20-Poly1305, XSalsa20-Poly1305, AES in GCM, GCM-SIV, SIV, CTR, CBC, CFB, ECB and key-wrap modes, and FF1 format-preserving encryption. |
| tweetnaclnpm | Pure JavaScript port of TweetNaCl: X25519 with XSalsa20-Poly1305 public-key boxes, XSalsa20-Poly1305 secret boxes, Ed25519 signatures and SHA-512. |
| libsodium-wrappersnpm | libsodium compiled to WebAssembly and JavaScript with generated wrappers: X25519, Ed25519, XSalsa20-Poly1305 and ChaCha20-Poly1305 encryption, BLAKE2b, SHA-2, SHA-3, HMAC, Argon2 password hashing, ML-KEM-768 and the X-Wing hybrid KEM. |
| libsodium-wrappers-sumonpm | The sumo build of libsodium.js: everything in libsodium-wrappers plus scrypt password hashing and lower-level functions. |
| sodium-nativenpm | Low-level native Node.js bindings to libsodium: X25519, Ed25519, XSalsa20-Poly1305 and ChaCha20-Poly1305 encryption, BLAKE2b, SHA-2, HMAC, Argon2 and scrypt, plus a PBKDF2-SHA512 extension. |
| @metamask/eth-sig-utilnpm | MetaMask signing functions for personal_sign, EIP-712 typed data and EIP-7702 authorizations over secp256k1, plus x25519-xsalsa20-poly1305 message encryption. |
| @polkadot/util-cryptonpm | Polkadot crypto utilities: sr25519, Ed25519 and secp256k1 keys and signatures, BLAKE2, Keccak, SHA-2, HMAC, PBKDF2, scrypt, NaCl secretbox and encrypted JSON. |
| @polkadot/keyringnpm | Polkadot key management for sr25519, Ed25519 and secp256k1 key pairs, with encrypted JSON export using scrypt and NaCl secretbox. |
| @taquito/signernpm | Tezos in-memory signer for Ed25519, secp256k1, P-256, BLS and ML-DSA-44 keys, with BIP-39 mnemonics and PBKDF2 and NaCl secretbox encrypted secret keys. |
| @ton/cryptonpm | TON crypto primitives: SHA-256, SHA-512, HMAC-SHA-512, PBKDF2-SHA-512, TON mnemonics, Ed25519 signing, NaCl secret boxes and SLIP-10 Ed25519 HD keys. |
| dryoccrates.io | Pure Rust libsodium-compatible library with crypto_box, secretbox, Ed25519 signatures, BLAKE2b, SHA-2, SHA-3, HMAC, HKDF, Argon2 password hashing, ML-KEM-768, X-Wing and HPKE sealed boxes. |
| sodiumoxidecrates.io | Rust bindings to libsodium: X25519 crypto_box, XSalsa20-Poly1305 secretbox, Ed25519 signatures, ChaCha20-Poly1305 and AES-256-GCM AEADs, SHA-2, BLAKE2b, HMAC, Argon2 and scrypt password hashing. |
| libsodium-syscrates.io | Raw FFI bindings to the libsodium C library, used by sodiumoxide. |
| xsalsa20poly1305crates.io | Pure Rust XSalsa20-Poly1305 (NaCl secretbox) authenticated encryption. |
| crypto_secretboxcrates.io | Pure Rust NaCl crypto_secretbox: XSalsa20-Poly1305 authenticated encryption and the libsodium XChaCha20-Poly1305 variant. |
| crypto_boxcrates.io | Pure Rust NaCl crypto_box public-key authenticated encryption combining X25519 with XSalsa20-Poly1305, or with XChaCha20-Poly1305 as ChaChaBox. |
2 listed
Sources
- Bernstein: Extending the Salsa20 noncecr.yp.toRetrieved 3 December 2026
- NaCl: Secret-key authenticated encryption: crypto_secretboxnacl.cr.yp.toRetrieved 3 December 2026
Full record
- Identifier
- xsalsa20-poly1305
- Kind
- aead
- Family
- Symmetric
- Rests on
- stream cipher security
- Quantum effect
- Weakened by Grover's search
Standards
No standard is listed for this algorithm.