Skip to content

Commit 9b179bf

Browse files
committed
Revert "implemented rv64. did not use intrinsics due to [this issue](rust-lang/stdarch#1453 (comment))"
This reverts commit 660197d.
1 parent 660197d commit 9b179bf

3 files changed

Lines changed: 9 additions & 303 deletions

File tree

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
11
This is a pure-Rust platform-agnostic [AES](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197-upd1.pdf) library, that
22
is focused on reusability and optimal performance.
33

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.
66

77
# The implementations and their requirements are:
88

99
- 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.
1111
- 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
1313
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
1616
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.
1917
- Software AES => fallback implementation based on Rijmen and Daemen's `optimized` implementation (available
2018
on [their website](https://web.archive.org/web/20050828204927/http://www.iaik.tu-graz.ac.at/research/krypto/AES/old/%7Erijmen/rijndael/))
2119

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
2321
the `RUSTFLAGS` environment variable, and use the `nightly` feature only if you are using a nightly compiler.
2422

2523
# Warning
2624

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
2927
supported on your CPU, use the command
3028

3129
````bash

src/aes_riscv64.rs

Lines changed: 0 additions & 283 deletions
This file was deleted.

src/lib.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@ cfg_if! {
4343
mod aes_arm;
4444
pub use aes_arm::AesBlock;
4545
use aes_arm::*;
46-
} else if #[cfg(all(
47-
feature = "nightly",
48-
target_arch = "riscv64",
49-
target_feature = "zkne",
50-
target_feature = "zknd"
51-
))] {
52-
mod aes_riscv64;
53-
pub use aes_riscv64::AesBlock;
54-
use aes_riscv64::*;
5546
} else {
5647
mod aes_default;
5748
pub use aes_default::AesBlock;

0 commit comments

Comments
 (0)