10 releases (6 breaking)

Uses new Rust 2024

0.6.0 Apr 10, 2026
0.6.0-rc.3 Feb 1, 2026
0.6.0-rc.2 Nov 5, 2025
0.5.1 Feb 17, 2022
0.0.0 Oct 14, 2019

#2969 in Cryptography

Download history 841/week @ 2026-01-16 1341/week @ 2026-01-23 2151/week @ 2026-01-30 1581/week @ 2026-02-06 1474/week @ 2026-02-13 1011/week @ 2026-02-20 1784/week @ 2026-02-27 2448/week @ 2026-03-06 8064/week @ 2026-03-13 4813/week @ 2026-03-20 3203/week @ 2026-03-27 2206/week @ 2026-04-03 3328/week @ 2026-04-10 4978/week @ 2026-04-17 7323/week @ 2026-04-24 4272/week @ 2026-05-01

20,152 downloads per month
Used in 17 crates (11 directly)

MIT/Apache

13KB
184 lines

RustCrypto: SM4 Cipher

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

Pure Rust implementation of the SM4 block cipher.

⚠️ 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.

USE AT YOUR OWN RISK!

License

Licensed under either of:

at your option.

Contribution

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.

Dependencies

~680KB
~17K SLoC