Skip to content

Commit

Permalink
Enable fast feature of ed25519-dalek (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
giarc3 authored Dec 5, 2024
1 parent 223e068 commit e54b370
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.14.1 (2024-12-05)

- [[#190](https://github.com/IronCoreLabs/recrypt-rs/pull/190)]
- Fix performance regression with generating ed25519 keypairs introduced in 0.14.0.

## 0.14.0 (2024-12-03)

- [[#184](https://github.com/IronCoreLabs/recrypt-rs/pull/188)]
Expand All @@ -15,9 +20,11 @@
## 0.13.1 (2021-11-29)

### Public API changes

None

### Notable internal changes

[[#163]](https://github.com/IronCoreLabs/recrypt-rs/pull/163) Fix compilation error for certain combinations of transitive dependencies related to ed25519-dalek-fiat

## 0.13.0 (yanked)
Expand Down
23 changes: 16 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
[package]
name = "recrypt"
version = "0.14.0"
version = "0.14.1"
authors = ["IronCore Labs <[email protected]>"]
readme = "README.md"
license = "AGPL-3.0-only"
repository = "https://github.com/IronCoreLabs/recrypt-rs"
documentation = "https://docs.rs/recrypt"
categories = ["cryptography", "algorithms"]
keywords = ["cryptography", "proxy-re-encryption", "PRE", "ECC", "transform-encryption"]
keywords = [
"cryptography",
"proxy-re-encryption",
"PRE",
"ECC",
"transform-encryption",
]
description = "A pure-Rust implementation of Transform Encryption, a Proxy Re-encryption scheme"
edition = "2021"
rust-version = "1.70.0"

[target.'cfg(all(unix, not(target_arch = "wasm32")))'.dependencies]
libc = {version = "0.2"}
libc = { version = "0.2" }

[target.'cfg(all(windows, not(target_arch = "wasm32")))'.dependencies]
winapi = {version = "0.3", features = ["memoryapi", "sysinfoapi"]}
winapi = { version = "0.3", features = ["memoryapi", "sysinfoapi"] }

[dependencies]
cfg-if = "1"
clear_on_drop = "0.2"
derivative = "2.1"
# Disable all features for ed25519 and enable the proper ones down in the [features] section below
ed25519-dalek = {version = "2.1.1", default-features = false, features = ["std", "rand_core"]}
ed25519-dalek = { version = "2.1.1", default-features = false, features = [
"std",
"rand_core",
"fast",
] }
# Explicit dependency so we can pass the wasm-bindgen flag to it
getrandom = {version = "0.2", optional = true}
getrandom = { version = "0.2", optional = true }
gridiron = "0.10"
hex = "0.4"
lazy_static = "1.4"
Expand Down
2 changes: 2 additions & 0 deletions benches/api_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use std::cell::RefCell;

macro_rules! recrypt_bench {
(api = $api:ident; suite_desc = $suite_desc:ident; bits = $bits:tt) => {
#[allow(dead_code)]
fn $suite_desc(c: &mut Criterion) {
c.bench_function(concat!($bits, "-bit generate key pair"), |b| {
let api = $api::new();
Expand Down Expand Up @@ -213,6 +214,7 @@ macro_rules! recrypt_bench {
};
}

// Note: this benchmark is currently unused. Uncomment `criterion_benchmark_fp480` below to run it as well.
recrypt_bench! {api = Recrypt480; suite_desc = criterion_benchmark_fp480; bits = "480"}
recrypt_bench! {api = Recrypt; suite_desc = criterion_benchmark_fp256; bits = "256"}

Expand Down

0 comments on commit e54b370

Please sign in to comment.