mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Remove yolocrypto from avx2_backend
This commit is contained in:
parent
d791047aac
commit
16f39c82e5
5 changed files with 13 additions and 10 deletions
|
|
@ -10,7 +10,7 @@ env:
|
|||
# Tests the u64 backend
|
||||
- TEST_COMMAND=test EXTRA_FLAGS='--no-default-features' FEATURES='std u64_backend'
|
||||
# Tests the avx2 backend
|
||||
- TEST_COMMAND=test EXTRA_FLAGS='--no-default-features' FEATURES='std avx2_backend yolocrypto'
|
||||
- TEST_COMMAND=test EXTRA_FLAGS='--no-default-features' FEATURES='std avx2_backend'
|
||||
# Tests serde support and default feature selection
|
||||
- TEST_COMMAND=test EXTRA_FLAGS='' FEATURES='serde'
|
||||
# Tests building without std. We have to select a backend, so we select the one
|
||||
|
|
@ -21,7 +21,7 @@ matrix:
|
|||
exclude:
|
||||
# Test the avx2 backend only on nightly
|
||||
- rust: stable
|
||||
env: TEST_COMMAND=test EXTRA_FLAGS='--no-default-features' FEATURES='std avx2_backend yolocrypto'
|
||||
env: TEST_COMMAND=test EXTRA_FLAGS='--no-default-features' FEATURES='std avx2_backend'
|
||||
# Test no_std only on nightly.
|
||||
- rust: stable
|
||||
env: TEST_COMMAND=build EXTRA_FLAGS=--no-default-features FEATURES='u32_backend'
|
||||
|
|
|
|||
13
README.md
13
README.md
|
|
@ -71,15 +71,17 @@ Curve arithmetic is implemented using one of the following backends:
|
|||
|
||||
* a `u32` backend using `u64` products;
|
||||
* a `u64` backend using `u128` products;
|
||||
* an experimental AVX2 backend, available using the `yolocrypto` feature when
|
||||
compiling for a target with `target_feature=+avx2`.
|
||||
* an `avx2` backend using parallel formulas, available when compiling for a
|
||||
target with `target_feature=+avx2`.
|
||||
|
||||
By default the `u64` backend is selected. To select a specific backend, use:
|
||||
```sh
|
||||
cargo build --no-default-features --features "std u32_backend"
|
||||
cargo build --no-default-features --features "std u64_backend"
|
||||
cargo build --no-default-features --features "std avx2_backend yolocrypto"
|
||||
cargo build --no-default-features --features "std avx2_backend"
|
||||
```
|
||||
Crates using `curve25519-dalek` can either select a backend on behalf of their
|
||||
users, or expose feature flags that control the `curve25519-dalek` backend.
|
||||
|
||||
Benchmarks are run using [`criterion.rs`][criterion]:
|
||||
|
||||
|
|
@ -88,7 +90,7 @@ Benchmarks are run using [`criterion.rs`][criterion]:
|
|||
export RUSTFLAGS="-C target_cpu=native"
|
||||
cargo bench --no-default-features --features "std u32_backend"
|
||||
cargo bench --no-default-features --features "std u64_backend"
|
||||
cargo bench --no-default-features --features "std avx2_backend yolocrypto"
|
||||
cargo bench --no-default-features --features "std avx2_backend"
|
||||
```
|
||||
|
||||
# Contributing
|
||||
|
|
@ -117,7 +119,8 @@ to the Dalek race.*
|
|||
|
||||
Portions of this library were originally a port of [Adam Langley's
|
||||
Golang ed25519 library](https://github.com/agl/ed25519), which was in
|
||||
turn a port of the reference `ref10` implementation.
|
||||
turn a port of the reference `ref10` implementation. Most of this code,
|
||||
including the 32-bit field arithmetic, has since been rewritten.
|
||||
|
||||
The fast `u32` and `u64` scalar arithmetic was implemented by Andrew Moon, and
|
||||
the addition chain for scalar inversion was provided by Brian Smith.
|
||||
|
|
|
|||
2
build.rs
2
build.rs
|
|
@ -1,5 +1,5 @@
|
|||
#![cfg_attr(feature = "nightly", feature(cfg_target_feature))]
|
||||
#![cfg_attr(all(feature = "nightly", feature = "yolocrypto"), feature(stdsimd))]
|
||||
#![cfg_attr(all(feature = "nightly", feature = "avx2_backend"), feature(stdsimd))]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(dead_code)]
|
||||
|
|
|
|||
|
|
@ -27,6 +27,6 @@ pub mod u32;
|
|||
#[cfg(feature = "u64_backend")]
|
||||
pub mod u64;
|
||||
|
||||
#[cfg(all(feature = "avx2_backend", feature = "yolocrypto", target_feature = "avx2"))]
|
||||
#[cfg(all(feature = "avx2_backend", target_feature = "avx2"))]
|
||||
pub mod avx2;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#![cfg_attr(feature = "nightly", feature(cfg_target_feature))]
|
||||
#![cfg_attr(feature = "nightly", feature(external_doc))]
|
||||
#![cfg_attr(all(feature = "nightly", feature = "yolocrypto"), feature(stdsimd))]
|
||||
#![cfg_attr(all(feature = "nightly", feature = "avx2_backend"), feature(stdsimd))]
|
||||
|
||||
// Refuse to compile if documentation is missing, but only on nightly.
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in a new issue