From af916d874c7447669a870a25ea9aaa40cb7d425c Mon Sep 17 00:00:00 2001 From: Ernie Turner Date: Tue, 16 Jul 2019 13:02:02 -0600 Subject: [PATCH 1/3] #80 Add features to let WASM use a 32bit backend for ed25519. Also re-enables CC on clear_on_drop --- Cargo.toml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 34eaef8..1d340c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,18 +17,14 @@ sha2 = "~0.8" num-traits = "~0.2" lazy_static = "~1.2" arrayvec = "~0.4" -ed25519-dalek = "1.0.0-pre.1" +#Disable all features for ed25519 and enable the proper ones down in the [features] section below +ed25519-dalek = { version="1.0.0-pre.1", default-features = false } clear_on_drop = "~0.2" -gridiron = "^0.6.0" +gridiron = "^0.6.0" quick-error = "~1.2" hex="~0.3" arrayref = "^0.3.5" -[target.wasm32-unknown-unknown.dependencies] -# The clear_on_drop crate, by default, implements code via C to clear memory. That doesn't work in WASM. However, they -# have a feature to turn off requiring C which we're enabling here for WASM targets. -clear_on_drop = {version = "0.2", features = ["no_cc"]} - [profile.dev] opt-level = 2 # Build deps with optimization, don't build ourselves with optimization debug = true @@ -48,7 +44,8 @@ rand_chacha = "~0.1" criterion = "~0.2" [features] -unstable = [] +default = ["ed25519-dalek/std", "ed25519-dalek/u64_backend"] +wasm = ["ed25519-dalek/std", "ed25519-dalek/u32_backend", "clear_on_drop/no_cc"] [[bench]] name = "api_benchmark" From debca3d647cad211a7b30325e855ff4c43fa386e Mon Sep 17 00:00:00 2001 From: Ernie Turner Date: Tue, 16 Jul 2019 13:03:25 -0600 Subject: [PATCH 2/3] Bump version and add changelog --- CHANGELOG.md | 20 ++++++++++++++------ Cargo.toml | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dd008c..2b2a2e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.7.1 + +- [[#80](#80)] Added a default set of features to enable `ed2559-dalek`s 64 bit backend and added a `wasm` feature that will instead use a 32 bit backend + +### Public API changes + +None + ## 0.7.0 ### Public API changes @@ -10,14 +18,14 @@ - `PrivateKey::ENCODED_SIZE_BYTES` is now pub - [[#63](#63)] Added a prelude for easier importing of common types and traits - `use recrypt::prelude::*` - - [[#70](#70)] + - [[#70](#70)] - `DerivedSymmetricKey` now has a `to_private_key` - `PublicKey` APIs now take all arguments as borrows - - [[#71](#71)] + - [[#71](#71)] - provide `From` instance for `[u8; 64]` - provide `Clone` for `PrivateKey` - many wrapped byte types can be consumed to get the underlying bytes out without copying - - [[#72](#72)] `PublicSigningKey`'s `bytes()` method now returns a reference instead of copying + - [[#72](#72)] `PublicSigningKey`'s `bytes()` method now returns a reference instead of copying ## 0.6.2 @@ -56,9 +64,9 @@ ## 0.4.0 - [#20] Update dependencies (rand 0.6, sha 0.8, ed25519 1.0.0-pre.0) -- [#18] Add a way to hash a Plaintext to 32 bytes. -- [#17] Add quick_error to all of our error ADTS -- [#14] Add benchmarking on Travis +- [#18] Add a way to hash a Plaintext to 32 bytes. +- [#17] Add quick_error to all of our error ADTS +- [#14] Add benchmarking on Travis ## 0.3.0 - Add hashable instance for TransformKey (#13) diff --git a/Cargo.toml b/Cargo.toml index 1d340c3..2027ff4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "recrypt" -version = "0.7.0" +version = "0.7.1" authors = ["IroncCore Labs "] readme = "README.md" license = "AGPL-3.0-only" From 4f9a7ac90800fc4cef5e170e1d9a7645b569d55c Mon Sep 17 00:00:00 2001 From: Ernie Turner Date: Tue, 16 Jul 2019 13:04:39 -0600 Subject: [PATCH 3/3] Add back in unstable feature --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 2027ff4..7746fd9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,6 +44,7 @@ rand_chacha = "~0.1" criterion = "~0.2" [features] +unstable = [] default = ["ed25519-dalek/std", "ed25519-dalek/u64_backend"] wasm = ["ed25519-dalek/std", "ed25519-dalek/u32_backend", "clear_on_drop/no_cc"]