| 1 | # RustCrypto: Advanced Encryption Standard (AES) |
| 2 | |
| 3 | [![crate][crate-image]][crate-link] |
| 4 | [![Docs][docs-image]][docs-link] |
| 5 | ![Apache2/MIT licensed][license-image] |
| 6 | ![Rust Version][rustc-image] |
| 7 | [![Project Chat][chat-image]][chat-link] |
| 8 | [![Build Status][build-image]][build-link] |
| 9 | [![Downloads][downloads-image]][crate-link] |
| 10 | [![HAZMAT][hazmat-image]][hazmat-link] |
| 11 | |
| 12 | Pure Rust implementation of the [Advanced Encryption Standard (AES)][1]. |
| 13 | |
| 14 | This crate implements the low-level AES block function, and is intended |
| 15 | for use for implementing higher-level constructions *only*. It is NOT |
| 16 | intended for direct use in applications. |
| 17 | |
| 18 | [Documentation][docs-link] |
| 19 | |
| 20 | <img src="https://raw.githubusercontent.com/RustCrypto/media/85f62bb/img/block-ciphers/aes-round.svg" width="480px"> |
| 21 | |
| 22 | ## Security |
| 23 | |
| 24 | ### ⚠️ Warning: [Hazmat!][hazmat-link] |
| 25 | |
| 26 | This crate does not ensure ciphertexts are authentic (i.e. by using a MAC to |
| 27 | verify ciphertext integrity), which can lead to serious vulnerabilities |
| 28 | if used incorrectly! |
| 29 | |
| 30 | To avoid this, use an [AEAD][2] mode based on AES, such as [AES-GCM][3] or [AES-GCM-SIV][4]. |
| 31 | See the [RustCrypto/AEADs][5] repository for more information. |
| 32 | |
| 33 | USE AT YOUR OWN RISK! |
| 34 | |
| 35 | ### Notes |
| 36 | |
| 37 | This crate has received one [security audit by NCC Group][6], with no significant |
| 38 | findings. We would like to thank [MobileCoin][7] for funding the audit. |
| 39 | |
| 40 | All implementations contained in the crate are designed to execute in constant |
| 41 | time, either by relying on hardware intrinsics (i.e. AES-NI on x86/x86_64), or |
| 42 | using a portable implementation based on bitslicing. |
| 43 | |
| 44 | ## Minimum Supported Rust Version |
| 45 | |
| 46 | Rust **1.56** or higher. |
| 47 | |
| 48 | Minimum supported Rust version can be changed in future releases, but it will |
| 49 | be done with a minor version bump. |
| 50 | |
| 51 | ## SemVer Policy |
| 52 | |
| 53 | - All on-by-default features of this library are covered by SemVer |
| 54 | - MSRV is considered exempt from SemVer as noted above |
| 55 | |
| 56 | ## License |
| 57 | |
| 58 | Licensed under either of: |
| 59 | |
| 60 | * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| 61 | * [MIT license](http://opensource.org/licenses/MIT) |
| 62 | |
| 63 | at your option. |
| 64 | |
| 65 | ### Contribution |
| 66 | |
| 67 | Unless you explicitly state otherwise, any contribution intentionally submitted |
| 68 | for inclusion in the work by you, as defined in the Apache-2.0 license, shall be |
| 69 | dual licensed as above, without any additional terms or conditions. |
| 70 | |
| 71 | [//]: # (badges) |
| 72 | |
| 73 | [crate-image]: https://img.shields.io/crates/v/aes.svg |
| 74 | [crate-link]: https://crates.io/crates/aes |
| 75 | [docs-image]: https://docs.rs/aes/badge.svg |
| 76 | [docs-link]: https://docs.rs/aes/ |
| 77 | [license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg |
| 78 | [rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg |
| 79 | [chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg |
| 80 | [chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260039-block-ciphers |
| 81 | [build-image]: https://github.com/RustCrypto/block-ciphers/workflows/aes/badge.svg?branch=master&event=push |
| 82 | [build-link]: https://github.com/RustCrypto/block-ciphers/actions?query=workflow%3Aaes |
| 83 | [downloads-image]: https://img.shields.io/crates/d/aes.svg |
| 84 | [hazmat-image]: https://img.shields.io/badge/crypto-hazmat%E2%9A%A0-red.svg |
| 85 | [hazmat-link]: https://github.com/RustCrypto/meta/blob/master/HAZMAT.md |
| 86 | |
| 87 | [//]: # (general links) |
| 88 | |
| 89 | [1]: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard |
| 90 | [2]: https://en.wikipedia.org/wiki/Authenticated_encryption |
| 91 | [3]: https://github.com/RustCrypto/AEADs/tree/master/aes-gcm |
| 92 | [4]: https://github.com/RustCrypto/AEADs/tree/master/aes-gcm-siv |
| 93 | [5]: https://github.com/RustCrypto/AEADs |
| 94 | [6]: https://research.nccgroup.com/2020/02/26/public-report-rustcrypto-aes-gcm-and-chacha20poly1305-implementation-review/ |
| 95 | [7]: https://www.mobilecoin.com/ |