Collection of block cipher algorithms written in pure Rust
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
kade c4a0c8a006
Some checks failed
aes.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
aria.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
belt-block.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
blowfish.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
camellia.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
cast5.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
cast6.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
des.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
gift-cipher.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
idea.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
kuznyechik.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
magma.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
rc2.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
rc5.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
rc6.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
serpent.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
sm4.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
speck-cipher.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
threefish.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
twofish.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
Workspace / clippy (push) Waiting to run
Workspace / rustfmt (push) Waiting to run
Workspace / typos (push) Waiting to run
xtea.yml / fix: point cipher at the den instead of crates.io (push) Failing after 0s
fix: point cipher at the den instead of crates.io
kade/block-ciphers declared cipher as a plain crates.io version requirement,
so aes and friends resolved cipher 0.5.2 from crates.io while kade/macs
resolved the same 0.5.2 from kade/traits. Two instances of one crate at one
version, which is the split-brain condition the Pact exists to prevent.

kade/traits serves cipher 0.5.2 and provides the dev, zeroize and alloc
features these manifests request, so every declaration converts directly.
2026-10-04 12:08:43 +02:00
.github aes: remove references to old aes_backend cfgs (#597) 2026-09-19 15:42:56 +03:00
aes fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
aria fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
belt-block fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
blowfish fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
camellia fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
cast5 fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
cast6 fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
des fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
gift-cipher fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
idea fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
kuznyechik fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
magma fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
rc2 fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
rc5 fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
rc6 fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
serpent fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
sm4 fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
speck-cipher fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
threefish fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
twofish fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
xtea fix: point cipher at the den instead of crates.io 2026-10-04 12:08:43 +02:00
.gitignore Update crates to cipher v0.4 (#284) 2022-02-10 08:54:32 +00:00
.typos.toml Bump cipher dependency to v0.5.0-rc.8 (#533) 2026-02-02 10:19:55 -07:00
Cargo.lock Release aes v0.9.3 (#587) 2026-08-28 17:45:17 +03:00
Cargo.toml Move gift to gift-cipher and speck to speck-cipher (#554) 2026-04-10 17:02:02 +03:00
README.md Fix build badges (#583) 2026-08-21 17:59:52 +03:00

RustCrypto: block ciphers

Project Chat dependency status Apache2/MIT licensed HAZMAT

Collection of block ciphers written in pure Rust.

Higher level constructions

Crates in this repository implement ONLY raw block cipher functionality defined by traits in the cipher crate. In practice block ciphers are rarely used in isolation. Instead, they usually play role of a building block for higher level constructions. In RustCrypto such constructions are implemented generically over block ciphers in separate repositories:

Most users should use constructions defined in these repositories without directly relying on raw block cipher functionality.

Warnings

Currently only the aes crate provides constant-time implementation and has received a third-party security audit.

Other crates in this repository are not implemented in a constant-time manner and have not yet received any formal cryptographic and security reviews.

It's generally recommended not to use other cipher implementations in this repository besides the aes crate.

USE AT YOUR OWN RISK.

Supported algorithms

Name Crate name crates.io Docs MSRV
AES (Rijndael) aes crates.io Documentation MSRV 1.89
ARIA aria crates.io Documentation MSRV 1.85
BelT block cipher belt-block crates.io Documentation MSRV 1.85
Blowfish blowfish crates.io Documentation MSRV 1.85
Camellia camellia crates.io Documentation MSRV 1.85
CAST5 (CAST-128) cast5 crates.io Documentation MSRV 1.85
CAST6 (CAST-256) cast6 crates.io Documentation MSRV 1.85
DES + 3DES (DEA, 3DEA) des crates.io Documentation MSRV 1.85
Gift gift-cipher crates.io Documentation MSRV 1.85
IDEA idea crates.io Documentation MSRV 1.85
Kuznyechik (GOST R 34.12-2015) kuznyechik crates.io Documentation MSRV 1.85
Magma (GOST R 34.12-2015) magma crates.io Documentation MSRV 1.85
RC2 (ARC2) rc2 crates.io Documentation MSRV 1.85
RC5 rc5 crates.io Documentation MSRV 1.85
RC6 rc6 crates.io Documentation MSRV 1.85
Serpent serpent crates.io Documentation MSRV 1.85
SM4 sm4 crates.io Documentation MSRV 1.85
Speck speck-cipher crates.io Documentation MSRV 1.85
Threefish threefish crates.io Documentation MSRV 1.85
Twofish twofish crates.io Documentation MSRV 1.85
XTEA xtea crates.io Documentation MSRV 1.85

License

All crates 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.