Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable fast feature of ed25519-dalek #190

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <info@ironcorelabs.com>"]
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
Loading