Skip to content

Commit e9e9253

Browse files
committed
Minor cleanup
Signed-off-by: lovesh <lovesh.bond@gmail.com>
1 parent 665d0ad commit e9e9253

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

.DS_Store

-8 KB
Binary file not shown.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ Cargo.lock
77
# These are backup files generated by rustfmt
88
**/*.rs.bk
99

10+
# IDE specific
1011
.idea
12+
13+
.DS_Store

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Library providing privacy enhancing cryptographic primitives.
1212
2. [BBS+ signature](./bbs_plus) for anonymous credentials. Based on the paper [Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited](https://eprint.iacr.org/2016/663)
1313
3. [Dynamic accumulators, both positive and universal](./vb_accumulator). Based on the paper [Dynamic Universal Accumulator with Batch Update over Bilinear Groups](https://eprint.iacr.org/2020/777)
1414
4. [Proof system](./proof_system) that combines above primitives for use cases like prove knowledge of a BBS+ signature and the corresponding messages and the (non)membership of a certain message in the accumulator.
15-
5. [Verifiable encryption](./saver) using [SAVER](https://eprint.iacr.org/2019/1270) paper. This is PoC implementation.
15+
5. [Verifiable encryption](./saver) using [SAVER](https://eprint.iacr.org/2019/1270).
1616
6. [Compression and amortization of Sigma protocols](./compressed_sigma). This is PoC implementation.
1717

1818
## Build
@@ -43,4 +43,4 @@ Some tests also print time consumed by the operations, run `cargo test --release
4343

4444
## WASM wrapper
4545

46-
A WASM wrapper has been created over this repo [here](https://github.com/docknetwork/crypto-wasm). The wrapper is then used to create [this Typescript library](https://github.com/docknetwork/crypto-wasm-ts) which is more ergonomic than using the wrapper as the wrapper contains free floating functions.
46+
A WASM wrapper has been created over this repo [here](https://github.com/docknetwork/crypto-wasm). The wrapper is then used to create [this Typescript library](https://github.com/docknetwork/crypto-wasm-ts) which is more ergonomic than using the wrapper as the wrapper contains free floating functions.

proof_system/tests/bbs_plus_and_accumulator.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -968,11 +968,15 @@ fn proof_spec_modification() {
968968

969969
#[test]
970970
fn verifier_local_linkability() {
971-
// A verifier wants to attach a unique identifier to a prover without either learning anything unintended (by prover) from the prover's signature nor can that unique identifier be used by other verifiers to identify the prover,
972-
// eg. a seller (as a verifier) should be able to identify repeat customers (prover) by using a unique identifier but he should not be able to share that unique identifier with other sellers using their own identifier for that prover.
973-
// This is done by making the prover go through a one-time registration process with the verifier by creating a Pedersen commitment to some value in the signature(s) which the verifier persists, lets call it registration commitment.
974-
// At each subsequent proof, the prover resends the commitment with the proof that commitment contains message from the prover's signature (prover had persisted commitment and randomness) and the verifier checks that the commitment is
975-
// same as the one during registration. The registration commitment serves as an identifier.
971+
// A verifier wants to attach a unique identifier to a prover without either learning anything unintended (by prover)
972+
// from the prover's signature nor can that unique identifier be used by other verifiers to identify the prover,
973+
// eg. a seller (as a verifier) should be able to identify repeat customers (prover) by using a unique identifier
974+
// but he should not be able to share that unique identifier with other sellers using their own identifier for that prover.
975+
// This is done by making the prover go through a one-time registration process with the verifier by creating a
976+
// Pedersen commitment to some value in the signature(s) which the verifier persists, lets call it registration commitment.
977+
// At each subsequent proof, the prover resends the commitment with the proof that commitment contains message
978+
// from the prover's signature (prover had persisted commitment and randomness) and the verifier checks that the
979+
// commitment is same as the one during registration. The registration commitment serves as an identifier.
976980

977981
// Following shows a prover interacting with 2 different verifiers and creating and using 2 different registration commitments, 1 at each verifier
978982

saver/src/saver_legogroth16.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ mod protocol_1 {
7979
}
8080

8181
/// `r` is the randomness used during the encryption
82+
#[allow(dead_code)]
8283
pub fn create_proof<E, C, R>(
8384
circuit: C,
8485
v: E::Fr,
@@ -106,6 +107,7 @@ mod protocol_1 {
106107
Ok(proof)
107108
}
108109

110+
#[allow(dead_code)]
109111
pub fn verify_proof<E: PairingEngine>(
110112
pvk: &PreparedVerifyingKey<E>,
111113
proof: &Proof<E>,
@@ -138,6 +140,7 @@ mod protocol_2 {
138140
use crate::encryption::CiphertextAlt;
139141

140142
/// `r` is the randomness used during the encryption
143+
#[allow(dead_code)]
141144
pub fn create_proof<E, C, R>(
142145
circuit: C,
143146
v: E::Fr,
@@ -161,6 +164,7 @@ mod protocol_2 {
161164
Ok(proof)
162165
}
163166

167+
#[allow(dead_code)]
164168
pub fn verify_proof<E: PairingEngine>(
165169
pvk: &PreparedVerifyingKey<E>,
166170
proof: &Proof<E>,

0 commit comments

Comments
 (0)