The rust-crypto
crate has not seen a release or GitHub commit since 2016,
and its author is unresponsive.
NOTE: The (old) rust-crypto
crate (with hyphen) should not be confused with
similarly named (new) RustCrypto GitHub Org (without hyphen). The GitHub Org
is actively maintained.
We recommend you switch to one of the following crates instead, depending on which algorithms you need:
- dalek-cryptography GitHub Org:
- Key agreement:
x25519-dalek
- Signature algorithms:
ed25519-dalek
- Key agreement:
ring
:- AEAD algorithms: AES-GCM, ChaCha20Poly1305
- Digest algorithms: SHA-256, SHA-384, SHA-512, SHA-512/256 (legacy: SHA-1)
- HMAC
- Key agreement: ECDH (P-256, P-384), X25519
- Key derivation: HKDF
- Password hashing: PBKDF2
- Signature algorithms: ECDSA (P-256, P-384), Ed25519, RSA (PKCS#1v1.5, PSS)
- RustCrypto GitHub Org:
- AEAD algorithms:
aes-gcm
,aes-gcm-siv
,aes-siv
,chacha20poly1305
,xsalsa20poly1305
- Block ciphers:
aes
,cast5
,des
- Digest algorithms:
sha2
,sha3
,blake2
,ripemd160
(legacy:sha-1
, [md-5
]) - Key derivation:
hkdf
- MACs:
cmac
,hmac
,pmac
,poly1305
- Password hashing:
pbkdf2
- Stream ciphers:
aes-ctr
,chacha20
,hc-256
,salsa20
- AEAD algorithms:
secp256k1
:- Key agreement: ECDH (secp256k1 only)
- Signature algorithms: ECDSA (secp256k1 only)
orion
:- AEAD algorithms: ChaCha20Poly1305 (IETF version), XChaCha20Poly1305
- Digest algorithms: SHA-512, BLAKE2b
- Key derivation: HKDF
- MACs: HMAC, Poly1305
- Password hashing: PBKDF2
- Stream ciphers: ChaCha20 (IETF version), XChaCha20
These reviews are from Crev, a distributed system for code reviews. To add your review, set up cargo-crev
.
0.2.36 (current) Thoroughness: None Understanding: None
by kornelski on 2021-02-09
It's dead. Use something else.
0.2.36 (current) Thoroughness: None Understanding: None
by dpc on 2019-11-04
Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories. There is absolutely no guarantee that the repository URL declared by the crate belongs to the crate, or that the code in the repository is the code inside the published tarball.
To review the actual code of the crate, it's best to use cargo crev open rust-crypto
. Alternatively, you can download the tarball of rust-crypto v0.2.36 or view the source online.
The following Rust program demonstrates some strangeness in AES encryption - if you have an immutable key slice and then operate on that slice, you get different encryption output than if you operate on a copy of that key.
For these functions, we expect that extending a 16 byte key to a 32 byte key by repeating it gives the same encrypted data, because the underlying rust-crypto functions repeat key data up to the necessary key size for the cipher.
The output from this program:
Notably, the X1 key in the
broken()
test changes every time after rerunning the program.GHSA-jp3w-3q88-34cf