Skip to content

Commit 1adde78

Browse files
committed
Remove src/old and update Cargo.toml accordingly.
1 parent 682a5b6 commit 1adde78

27 files changed

+83
-2735
lines changed

Cargo.toml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,24 @@ exclude = [
2020
]
2121

2222
[dependencies]
23-
merlin = "3"
24-
rand = { version = "0.8", features = ["std", "rand_chacha"] }
2523
serde = "1"
2624
serde_derive = "1"
2725
thiserror = "1"
28-
# Disable default features to deselect a backend, then select one below
29-
curve25519-dalek = { version = "4", default-features = false, features = ["serde", "rand_core", "alloc", "digest", "precomputed-tables", "group"] }
3026
group = "0.13.0"
3127
ff = { version = "0.13", features = ["derive"] }
3228
sha3 = "0.10.8"
33-
rand_chacha = "0.3"
3429
hex = "0.4"
3530
sha2 = "0.10"
3631
subtle = "2.6.1"
3732
num-bigint = "0.4.6"
3833
num-traits = "0.2.19"
3934
tiny-keccak = { version = "2.0.2", features = ["fips202"] }
35+
rand = "0.8.5"
36+
curve25519-dalek = { version = "4", default-features = false, features = ["serde", "rand_core", "alloc", "digest", "precomputed-tables", "group"] }
4037

4138
[dev-dependencies]
42-
bincode = "1"
43-
sha2 = "0.10"
44-
criterion = { version = "0.5", features = ["html_reports"]}
39+
bincode = "2"
4540
bls12_381 = "0.8.0"
41+
sha2 = "0.10"
42+
criterion = { version = "0.6", features = ["html_reports"]}
4643
hex-literal = "1.0.0"
47-
48-
[[bench]]
49-
name = "dleq_benches"
50-
harness = false
51-
52-
[features]
53-
debug-transcript = ["merlin/debug-transcript"]

benches/dleq_benches.rs

Lines changed: 0 additions & 263 deletions
This file was deleted.

benches/zkp.rs

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/group_serialization.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use group::{Group, GroupEncoding};
21
use ff::PrimeField;
2+
use group::{Group, GroupEncoding};
33

4-
pub fn serialize_element<G: Group + GroupEncoding>(element: &G) -> Vec<u8>{
4+
pub fn serialize_element<G: Group + GroupEncoding>(element: &G) -> Vec<u8> {
55
element.to_bytes().as_ref().to_vec()
66
}
77

@@ -30,7 +30,9 @@ pub fn serialize_scalar<G: Group>(scalar: &G::Scalar) -> Vec<u8> {
3030
}
3131

3232
pub fn deserialize_scalar<G: Group>(data: &[u8]) -> Option<G::Scalar> {
33-
let scalar_len = <<G as Group>::Scalar as PrimeField>::Repr::default().as_ref().len();
33+
let scalar_len = <<G as Group>::Scalar as PrimeField>::Repr::default()
34+
.as_ref()
35+
.len();
3436
if data.len() != scalar_len {
3537
return None;
3638
}
@@ -43,4 +45,4 @@ pub fn deserialize_scalar<G: Group>(data: &[u8]) -> Option<G::Scalar> {
4345
});
4446

4547
G::Scalar::from_repr(repr).into()
46-
}
48+
}

src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,3 @@ pub use r#trait::*;
3232
pub use schnorr_protocol::*;
3333

3434
pub mod codec;
35-
#[deprecated(
36-
since = "0.2.0",
37-
note = "This module contains the old implementation of Sigma protocols from Henry de Valence."
38-
)]
39-
pub mod old;

0 commit comments

Comments
 (0)