|
1 | 1 | This is a pure-Rust platform-agnostic [AES](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197-upd1.pdf) library, that |
2 | 2 | is focused on reusability and optimal performance. |
3 | 3 |
|
4 | | -This library guarantees the best performance on the `target-cpu` (if correctly specified). This currently has 6 |
5 | | -implementations, among which it automatically decides the best (most performant) using Cargo's `target-feature` flags. |
| 4 | +This library guarantees the best performance on the `target_cpu` (if correctly specified). This currently has 5 |
| 5 | +implementations, among which it automatically decides the best (most performant) using Cargo's `target_feature` flags. |
6 | 6 |
|
7 | 7 | # The implementations and their requirements are: |
8 | 8 |
|
9 | 9 | - AES-NI (with Vector AES for 2- and 4- blocks) => requires a Nightly Compiler, the `nightly` feature to be enabled, and |
10 | | - compiling for x86(64) with the `avx512f` and `vaes` target-feature flags set. |
| 10 | + compiling for x86(64) with the `avx512f` and `vaes` target_feature flags set. |
11 | 11 | - AES-NI (with Vector AES for 2-blocks) => requires a Nightly Compiler, the `nightly` feature to be enabled, and |
12 | | - compiling for x86(64) with the `vaes` target-feature flag set. (although `vaes` is a AVX-512 feature, some AlderLake |
| 12 | + compiling for x86(64) with the `vaes` target_feature flag set. (although `vaes` is a AVX-512 feature, some AlderLake |
13 | 13 | CPUs have `vaes` without AVX-512 support) |
14 | | -- AES-NI => requires compiling for x86(64) with the `sse4.1` and `aes` target-feature flags set. |
15 | | -- AES-Neon => requires compiling for AArch64 or ARM64EC or ARM-v8 with the `aes` target-feature flag set (ARM-v8 |
| 14 | +- AES-NI => requires compiling for x86(64) with the `sse4.1` and `aes` target_feature flags set. |
| 15 | +- AES-Neon => requires compiling for AArch64 or ARM64EC or ARM-v8 with the `aes` target_feature flag set (ARM-v8 |
16 | 16 | requires a Nightly compiler and the `nightly` feature to be enabled) . |
17 | | -- AES-RV64 => requires a Nightly compiler, the `nightly` feature to be enabled, and compiling for RISC-V RV64 with |
18 | | - the `zkne` and `zknd` target-feature flags set. |
19 | 17 | - Software AES => fallback implementation based on Rijmen and Daemen's `optimized` implementation (available |
20 | 18 | on [their website](https://web.archive.org/web/20050828204927/http://www.iaik.tu-graz.ac.at/research/krypto/AES/old/%7Erijmen/rijndael/)) |
21 | 19 |
|
22 | | -If you are unsure about the target-feature flags to set, use `target-cpu=native` (if not cross-compiling) in |
| 20 | +If you are unsure about the target_feature flags to set, use `target_cpu=native` (if not cross-compiling) in |
23 | 21 | the `RUSTFLAGS` environment variable, and use the `nightly` feature only if you are using a nightly compiler. |
24 | 22 |
|
25 | 23 | # Warning |
26 | 24 |
|
27 | | -Using the wrong `target-feature` flags may lead to the binary crashing due to an "Unknown Instruction" error. This |
28 | | -library uses these flags to use the CPU intrinsics to maximize performance. If you are unsure what `target-feature`s are |
| 25 | +Using the wrong `target_feature` flags may lead to the binary crashing due to an "Unknown Instruction" error. This |
| 26 | +library uses these flags to use the CPU intrinsics to maximize performance. If you are unsure what `target_feature`s are |
29 | 27 | supported on your CPU, use the command |
30 | 28 |
|
31 | 29 | ````bash |
|
0 commit comments