#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

#760 in Cryptography

Download history 5543/week @ 2024-07-19 6158/week @ 2024-07-26 6661/week @ 2024-08-02 7182/week @ 2024-08-09 7103/week @ 2024-08-16 6850/week @ 2024-08-23 6636/week @ 2024-08-30 5832/week @ 2024-09-06 5311/week @ 2024-09-13 5905/week @ 2024-09-20 5626/week @ 2024-09-27 5984/week @ 2024-10-04 5700/week @ 2024-10-11 5970/week @ 2024-10-18 6213/week @ 2024-10-25 6587/week @ 2024-11-01

25,592 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