#aes #block-cipher #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

#341 in Cryptography

Download history 599/week @ 2023-12-11 465/week @ 2023-12-18 267/week @ 2023-12-25 436/week @ 2024-01-01 721/week @ 2024-01-08 891/week @ 2024-01-15 1148/week @ 2024-01-22 1066/week @ 2024-01-29 865/week @ 2024-02-05 671/week @ 2024-02-12 843/week @ 2024-02-19 1437/week @ 2024-02-26 860/week @ 2024-03-04 1381/week @ 2024-03-11 1416/week @ 2024-03-18 1128/week @ 2024-03-25

4,952 downloads per month
Used in 14 crates (7 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