#crypto #aes #block-cipher

libaes

AES cipher in safe Rust with no dependencies

11 releases

0.6.4 Sep 5, 2022
0.6.2 Mar 28, 2022
0.6.1 Jan 19, 2021
0.4.0 Oct 5, 2020

#293 in Cryptography

Download history 340/week @ 2022-06-12 436/week @ 2022-06-19 713/week @ 2022-06-26 662/week @ 2022-07-03 554/week @ 2022-07-10 573/week @ 2022-07-17 535/week @ 2022-07-24 311/week @ 2022-07-31 400/week @ 2022-08-07 571/week @ 2022-08-14 751/week @ 2022-08-21 611/week @ 2022-08-28 464/week @ 2022-09-04 215/week @ 2022-09-11 292/week @ 2022-09-18 319/week @ 2022-09-25

1,353 downloads per month
Used in 5 crates (3 directly)

Apache-2.0 OR MIT

55KB
779 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