#crypto #stream-cipher #trait #xsalsa20

no-std salsa20

Salsa20 Stream Cipher

20 releases (10 breaking)

0.10.2 Feb 17, 2022
0.9.0 Aug 29, 2021
0.8.1 Jul 20, 2021
0.7.2 Nov 12, 2020
0.0.0 Oct 6, 2016

#2287 in Cryptography

Download history 65395/week @ 2023-06-08 70241/week @ 2023-06-15 73637/week @ 2023-06-22 70206/week @ 2023-06-29 81243/week @ 2023-07-06 79837/week @ 2023-07-13 82143/week @ 2023-07-20 71934/week @ 2023-07-27 84377/week @ 2023-08-03 76425/week @ 2023-08-10 81712/week @ 2023-08-17 84875/week @ 2023-08-24 74542/week @ 2023-08-31 82336/week @ 2023-09-07 87471/week @ 2023-09-14 77345/week @ 2023-09-21

339,090 downloads per month
Used in 479 crates (25 directly)


249 lines

RustCrypto: Salsa20 Stream Cipher

Crate Docs Apache2/MIT licensed Rust Version Project Chat Build Status HAZMAT

Pure Rust implementation of the Salsa20 Stream Cipher.



Salsa20 is a stream cipher which is designed to support high-performance software implementations.

This crate also contains an implementation of XSalsa20: a variant of Salsa20 with an extended 192-bit (24-byte) nonce, gated under the xsalsa20 Cargo feature (on-by-default).

⚠️ Security Warning: Hazmat!

This crate does not ensure ciphertexts are authentic (i.e. by using a MAC to verify ciphertext integrity), which can lead to serious vulnerabilities if used incorrectly!

No security audits of this crate have ever been performed, and it has not been thoroughly assessed to ensure its operation is constant-time on common CPU architectures.


Minimum Supported Rust Version

Rust 1.56 or higher.

Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump.

SemVer Policy

  • All on-by-default features of this library are covered by SemVer
  • MSRV is considered exempt from SemVer as noted above


Licensed under either of:

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.