Merge pull request #27 from huitseeker/curve2559_backends

Pass-through x,curve2559 backends
This commit is contained in:
François Garillot
2020-07-22 17:56:03 -04:00
committed by GitHub
3 changed files with 62 additions and 17 deletions
+51 -14
View File
@@ -5,8 +5,57 @@ on:
types: [opened, repoened, synchronize]
jobs:
combo:
name: test + Clippy + rustfmt
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
backend_feature:
- u64_backend
- u32_backend
name: test
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features ${{ matrix.backend_feature }}
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
format:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
@@ -26,18 +75,6 @@ jobs:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features -- -D warnings
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
deny-check:
name: cargo-deny check
runs-on: ubuntu-latest
+5 -3
View File
@@ -10,13 +10,15 @@ edition = "2018"
readme = "README.md"
[features]
default = []
default = ["u64_backend"]
slow-hash = ["scrypt"]
bench = []
u64_backend = ["curve25519-dalek/u64_backend", "x25519-dalek/u64_backend"]
u32_backend = ["curve25519-dalek/u32_backend", "x25519-dalek/u32_backend"]
[dependencies]
aead = "0.3.1"
curve25519-dalek = "2.1.0"
curve25519-dalek = { version = "2.1.0", default-features = false, features = ["std"]}
displaydoc = "0.1"
generic-array = "0.14.2"
hkdf = "0.9.0-alpha.0"
@@ -25,7 +27,7 @@ rand_core = "0.5.1"
scrypt = { version = "0.3.0", optional = true }
sha2 = "0.9.0"
thiserror = "1.0.19"
x25519-dalek = "0.6.0"
x25519-dalek = { version = "0.6.0", default-features = false, features = ["std"]}
zeroize = "1.1"
[dev-dependencies]
+6
View File
@@ -386,6 +386,12 @@
#![cfg_attr(not(feature = "bench"), deny(missing_docs))]
#![deny(unsafe_code)]
#[cfg(not(any(feature = "u64_backend", feature = "u32_backend",)))]
compile_error!(
"no dalek arithmetic backend cargo feature enabled! \
please enable one of: u64_backend, u32_backend"
);
// Error types
pub mod errors;