Skip to content

Commit e54b370

Browse files
authored
Enable fast feature of ed25519-dalek (#190)
1 parent 223e068 commit e54b370

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.14.1 (2024-12-05)
4+
5+
- [[#190](https://github.com/IronCoreLabs/recrypt-rs/pull/190)]
6+
- Fix performance regression with generating ed25519 keypairs introduced in 0.14.0.
7+
38
## 0.14.0 (2024-12-03)
49

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

1722
### Public API changes
23+
1824
None
1925

2026
### Notable internal changes
27+
2128
[[#163]](https://github.com/IronCoreLabs/recrypt-rs/pull/163) Fix compilation error for certain combinations of transitive dependencies related to ed25519-dalek-fiat
2229

2330
## 0.13.0 (yanked)

Cargo.toml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
11
[package]
22
name = "recrypt"
3-
version = "0.14.0"
3+
version = "0.14.1"
44
authors = ["IronCore Labs <[email protected]>"]
55
readme = "README.md"
66
license = "AGPL-3.0-only"
77
repository = "https://github.com/IronCoreLabs/recrypt-rs"
88
documentation = "https://docs.rs/recrypt"
99
categories = ["cryptography", "algorithms"]
10-
keywords = ["cryptography", "proxy-re-encryption", "PRE", "ECC", "transform-encryption"]
10+
keywords = [
11+
"cryptography",
12+
"proxy-re-encryption",
13+
"PRE",
14+
"ECC",
15+
"transform-encryption",
16+
]
1117
description = "A pure-Rust implementation of Transform Encryption, a Proxy Re-encryption scheme"
1218
edition = "2021"
1319
rust-version = "1.70.0"
1420

1521
[target.'cfg(all(unix, not(target_arch = "wasm32")))'.dependencies]
16-
libc = {version = "0.2"}
22+
libc = { version = "0.2" }
1723

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

2127
[dependencies]
2228
cfg-if = "1"
2329
clear_on_drop = "0.2"
2430
derivative = "2.1"
25-
# Disable all features for ed25519 and enable the proper ones down in the [features] section below
26-
ed25519-dalek = {version = "2.1.1", default-features = false, features = ["std", "rand_core"]}
31+
ed25519-dalek = { version = "2.1.1", default-features = false, features = [
32+
"std",
33+
"rand_core",
34+
"fast",
35+
] }
2736
# Explicit dependency so we can pass the wasm-bindgen flag to it
28-
getrandom = {version = "0.2", optional = true}
37+
getrandom = { version = "0.2", optional = true }
2938
gridiron = "0.10"
3039
hex = "0.4"
3140
lazy_static = "1.4"

benches/api_benchmark.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use std::cell::RefCell;
1515

1616
macro_rules! recrypt_bench {
1717
(api = $api:ident; suite_desc = $suite_desc:ident; bits = $bits:tt) => {
18+
#[allow(dead_code)]
1819
fn $suite_desc(c: &mut Criterion) {
1920
c.bench_function(concat!($bits, "-bit generate key pair"), |b| {
2021
let api = $api::new();
@@ -213,6 +214,7 @@ macro_rules! recrypt_bench {
213214
};
214215
}
215216

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

0 commit comments

Comments
 (0)