#aes #block-cipher #encryption-key #crypto

libaes

AES cipher in safe Rust with no dependencies

13 releases

0.7.0 Oct 1, 2023
0.6.5 May 28, 2023
0.6.4 Sep 5, 2022
0.6.2 Mar 28, 2022
0.4.0 Oct 5, 2020

#755 in Cryptography

Download history 5882/week @ 2024-07-21 6503/week @ 2024-07-28 6490/week @ 2024-08-04 7504/week @ 2024-08-11 6925/week @ 2024-08-18 6646/week @ 2024-08-25 6512/week @ 2024-09-01 5704/week @ 2024-09-08 5600/week @ 2024-09-15 5865/week @ 2024-09-22 5490/week @ 2024-09-29 6271/week @ 2024-10-06 5511/week @ 2024-10-13 6023/week @ 2024-10-20 6295/week @ 2024-10-27 6231/week @ 2024-11-03

24,543 downloads per month
Used in 20 crates (9 directly)

Apache-2.0 OR MIT

57KB
800 lines

libaes

Build Cargo

This is a small implementation of AES in safe Rust, with no dependencies. The core algorithm is ported from AES core of OpenSSL 1.1.1 stable. It is hardware-independent and fast (for example, as of January 2021, its AES-128 CBC mode is more than 3X faster than RustCrypto aes + block-modes crates, see benchmark).

Currently, this library supports:

  • CBC mode: 128-bit, 192-bit and 256-bit keys
  • CFB128 mode

See Documentation for examples and tests.

Correctness

We use the test data in NIST Special Publication 800-38A to verify the cipher, see the test code.

Minimum Rust version

Tested against Rust 1.46.0

License

Licensed under either of

at your option.

Contribution

Contributions are welcome! Please open an issue in GitHub if any questions.

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

No runtime deps