Skip to content

Commit da6a04b

Browse files
olegnnlovesh
authored andcommitted
coconut -> coconut_crypto
1 parent 4f68dfe commit da6a04b

File tree

15 files changed

+43
-50
lines changed

15 files changed

+43
-50
lines changed

benches/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ serde.workspace = true
1818
serde_with.workspace = true
1919
blake2 = { version = "0.10", default-features = false }
2020
itertools = "0.10.5"
21-
coconut = { version = "0.1.0", default-features = false, path = "../coconut" }
21+
coconut-crypto = { version = "0.1.0", default-features = false, path = "../coconut" }
2222
dock_crypto_utils = { default-features = false, path = "../utils" }
2323
zeroize.workspace = true
2424

benches/benches/ps_proof.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use benches::setup_ps;
99
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
1010
use itertools::{EitherOrBoth, Itertools};
1111

12-
use coconut::signature::Signature;
13-
use coconut::{setup::*, SignaturePoKGenerator};
12+
use coconut_crypto::signature::Signature;
13+
use coconut_crypto::{setup::*, SignaturePoKGenerator};
1414

1515
type Fr = <Bls12_381 as Pairing>::ScalarField;
1616

benches/benches/ps_signature.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use ark_std::{
55
UniformRand,
66
};
77
use benches::setup_ps;
8-
use coconut::setup::*;
9-
use coconut::Signature;
8+
use coconut_crypto::setup::*;
9+
use coconut_crypto::Signature;
1010
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
1111

1212
type Fr = <Bls12_381 as Pairing>::ScalarField;

coconut/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "coconut"
2+
name = "coconut-crypto"
33
version = "0.1.0"
44
edition.workspace = true
55
authors.workspace = true

coconut/src/macros.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,6 @@ macro_rules! impl_deref {
2626
};
2727
}
2828

29-
/// Implements `From<type>` for the wrapper.
30-
#[macro_export]
31-
macro_rules! impl_deref_from_type_conversion {
32-
($wrapper: ident: $($type: ty),+) => {
33-
$(
34-
impl From<$type> for $wrapper {
35-
fn from(value: $type) -> $wrapper {
36-
$wrapper(value.into())
37-
}
38-
}
39-
)+
40-
}
41-
}
42-
4329
/// Convert given slices to `OwnedPairs`, panics in case of error.
4430
#[macro_export]
4531
macro_rules! owned_pairs {

proof_system/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ark-groth16.workspace = true
2929
ark-r1cs-std.workspace = true
3030
ark-relations.workspace = true
3131
zeroize.workspace = true
32-
coconut = { version = "0.1.0", default-features = false, path = "../coconut" }
32+
coconut-crypto = { version = "0.1.0", default-features = false, path = "../coconut" }
3333
merlin = { workspace = true, default-features = false }
3434
legogroth16 = { workspace = true, default-features = false, features = ["circom", "aggregation"] }
3535
itertools = "0.10.5"
@@ -44,8 +44,8 @@ test_utils = { version = "0.1.0", default-features = false, path = "../test_util
4444

4545
[features]
4646
default = ["parallel"]
47-
std = ["ark-ff/std", "ark-ec/std", "ark-std/std", "ark-serialize/std", "schnorr_pok/std", "dock_crypto_utils/std", "serde/std", "saver/std", "ark-groth16/std", "legogroth16/std", "ark-r1cs-std/std", "ark-relations/std", "merlin/std", "coconut/std"]
47+
std = ["ark-ff/std", "ark-ec/std", "ark-std/std", "ark-serialize/std", "schnorr_pok/std", "dock_crypto_utils/std", "serde/std", "saver/std", "ark-groth16/std", "legogroth16/std", "ark-r1cs-std/std", "ark-relations/std", "merlin/std", "coconut-crypto/std"]
4848
print-trace = ["ark-std/print-trace", "schnorr_pok/print-trace", "bbs_plus/print-trace", "vb_accumulator/print-trace", "dock_crypto_utils/print-trace"]
49-
parallel = ["std", "ark-ff/parallel", "ark-ec/parallel", "ark-std/parallel", "rayon", "schnorr_pok/parallel", "bbs_plus/parallel", "vb_accumulator/parallel", "saver/parallel", "ark-groth16/parallel", "legogroth16/parallel", "ark-r1cs-std/parallel", "dock_crypto_utils/parallel", "coconut/parallel"]
49+
parallel = ["std", "ark-ff/parallel", "ark-ec/parallel", "ark-std/parallel", "rayon", "schnorr_pok/parallel", "bbs_plus/parallel", "vb_accumulator/parallel", "saver/parallel", "ark-groth16/parallel", "legogroth16/parallel", "ark-r1cs-std/parallel", "dock_crypto_utils/parallel", "coconut-crypto/parallel"]
5050
wasmer-js = ["legogroth16/wasmer-js"]
5151
wasmer-sys = ["legogroth16/wasmer-sys"]

proof_system/src/derived_params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use bbs_plus::setup::{
99
PreparedSignatureParamsG1 as PreparedBBSPlusSigParams, PublicKeyG2 as BBSPlusPk,
1010
SignatureParamsG1 as BBSPlusSigParams,
1111
};
12-
use coconut::setup::{
12+
use coconut_crypto::setup::{
1313
PreparedPublicKey as PreparedPSPk, PreparedSignatureParams as PreparedPSSigParams,
1414
PublicKey as PSPk, SignatureParams as PSSigParams,
1515
};

proof_system/src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub enum ProofSystemError {
7575
NoAggregateLegoGroth16ProofFound,
7676
InvalidNumberOfAggregateLegoGroth16Proofs(usize, usize),
7777
NotFoundAggregateLegoGroth16ProofForRequiredStatements(usize, BTreeSet<usize>),
78-
PSSignaturePoKError(coconut::SignaturePoKError),
78+
PSSignaturePoKError(coconut_crypto::SignaturePoKError),
7979
}
8080

8181
impl From<SchnorrError> for ProofSystemError {
@@ -120,8 +120,8 @@ impl From<CircomError> for ProofSystemError {
120120
}
121121
}
122122

123-
impl From<coconut::SignaturePoKError> for ProofSystemError {
124-
fn from(e: coconut::SignaturePoKError) -> Self {
123+
impl From<coconut_crypto::SignaturePoKError> for ProofSystemError {
124+
fn from(e: coconut_crypto::SignaturePoKError) -> Self {
125125
Self::PSSignaturePoKError(e)
126126
}
127127
}

proof_system/src/proof_spec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use bbs_plus::setup::{
1515
PreparedSignatureParamsG1 as PreparedBBSPlusSigParams, PublicKeyG2 as BBSPlusPk,
1616
SignatureParamsG1 as BBSPlusSigParams,
1717
};
18-
use coconut::setup::{
18+
use coconut_crypto::setup::{
1919
PreparedPublicKey as PreparedPSPk, PreparedSignatureParams as PreparedPSSigParams,
2020
PublicKey as PSPk, SignatureParams as PSSigParams,
2121
};

proof_system/src/setup_params.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ pub enum SetupParams<E: Pairing, G: AffineRepr> {
4747
R1CS(#[serde_as(as = "ArkObjectBytes")] R1CS<E>),
4848
Bytes(Vec<u8>),
4949
FieldElemVec(#[serde_as(as = "Vec<ArkObjectBytes>")] Vec<E::ScalarField>),
50-
PSSignatureParams(coconut::setup::SignatureParams<E>),
51-
PSSignaturePublicKey(coconut::setup::PublicKey<E>),
50+
PSSignatureParams(coconut_crypto::setup::SignatureParams<E>),
51+
PSSignaturePublicKey(coconut_crypto::setup::PublicKey<E>),
5252
}
5353

5454
macro_rules! delegate {

0 commit comments

Comments
 (0)