Crates.io | aes_crypto |
lib.rs | aes_crypto |
version | |
source | src |
created_at | 2024-04-21 03:00:36.012203 |
updated_at | 2024-10-29 18:56:03.579119 |
description | A platform-agnostic library for the AES cipher (Rijndael) |
homepage | |
repository | https://github.com/sayantn/aes |
max_upload_size | |
id | 1215106 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This is a pure-Rust platform-agnostic AES library, that is focused on reusability and optimal performance.
This library guarantees the best performance on the target_cpu
(if correctly specified). This currently has 7
implementations, among which it automatically decides the best (most performant) using Cargo's target_feature
flags.
nightly
feature to be enabled, and
compiling for x86(64) with the avx512f
and vaes
target_feature flags set.nightly
feature to be enabled, and
compiling for x86(64) with the vaes
target_feature flag set.sse4.1
and aes
target_feature flags set.aes
target_feature flag set (ARM-v8
requires a Nightly compiler and the nightly
feature to be enabled) .nightly
feature to be enabled and compiling for RISC-V RV64 or RV32 with
the zkne
and zknd
target-features enabled (performance considerably improves with the unaligned-scalar-mem
target-feature enabled)optimized
implementation (available
on their website)constant-time
feature. It is worth noting that all the accelerated AES implementations are constant-time, so this
only comes into play when no accelerated version is found.If you are unsure about the target_feature flags to set, use target_cpu=native
(if not cross-compiling) in
the RUSTFLAGS
environment variable, and use the nightly
feature only if you are using a nightly compiler.
Using the wrong target_feature
flags may lead to the binary crashing due to an "Unknown Instruction" error. This
library uses these flags to use the CPU intrinsics to maximize performance. If you are unsure what target_feature
s are
supported on your CPU, use the command
rustc --print cfg -C target-cpu=native
Using the nightly
feature when not using a nightly compiler can lead to compile failures, so use this only if you
are using a nightly compiler.