#crypto #stream-cipher #trait #arc4 #arcfour

no-std rc4

Pure Rust implementation of the RC4 stream cipher

2 unstable releases

0.1.0 Mar 29, 2022
0.0.0 Oct 6, 2016

#2548 in Cryptography

Download history 7329/week @ 2023-08-04 7743/week @ 2023-08-11 8009/week @ 2023-08-18 7448/week @ 2023-08-25 5739/week @ 2023-09-01 7656/week @ 2023-09-08 8632/week @ 2023-09-15 8051/week @ 2023-09-22 6496/week @ 2023-09-29 7493/week @ 2023-10-06 7616/week @ 2023-10-13 4821/week @ 2023-10-20 4609/week @ 2023-10-27 4971/week @ 2023-11-03 6241/week @ 2023-11-10 4933/week @ 2023-11-17

21,405 downloads per month
Used in 4 crates (3 directly)


120 lines

RustCrypto: RC4

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

Pure Rust implementation of the RC4 stream cipher.


⚠️ Security Warning

This crate is provided for the purposes of legacy interoperability with protocols and systems which mandate the use of RC4.

However, RC4 is cryptographically broken and unsuitable for further use!!!

RFC7465 and RFC8758 prohibit the use of RC4 in TLS and SSH protocols respectively, noting that cryptographic weaknesses in the cipher's design make it practical to recover repeatedly encrypted plaintexts.


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.