Skip to content

Commit 1929e47

Browse files
committed
docs
Signed-off-by: lovesh <lovesh.bond@gmail.com>
1 parent 0405015 commit 1929e47

File tree

35 files changed

+169
-90
lines changed

35 files changed

+169
-90
lines changed

bbs_plus/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bbs_plus"
3-
version = "0.21.0"
3+
version = "0.22.0"
44
edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
@@ -23,10 +23,10 @@ sha3 = { version = "0.10.6", default-features = false }
2323
serde.workspace = true
2424
serde_with.workspace = true
2525
zeroize.workspace = true
26-
schnorr_pok = { version = "0.19.0", default-features = false, path = "../schnorr_pok" }
27-
dock_crypto_utils = { version = "0.19.0", default-features = false, path = "../utils" }
28-
oblivious_transfer_protocols = { version = "0.8.0", default-features = false, path = "../oblivious_transfer" }
29-
secret_sharing_and_dkg = { version = "0.12.0", default-features = false, path = "../secret_sharing_and_dkg" }
26+
schnorr_pok = { version = "0.20.0", default-features = false, path = "../schnorr_pok" }
27+
dock_crypto_utils = { version = "0.20.0", default-features = false, path = "../utils" }
28+
oblivious_transfer_protocols = { version = "0.9.0", default-features = false, path = "../oblivious_transfer" }
29+
secret_sharing_and_dkg = { version = "0.13.0", default-features = false, path = "../secret_sharing_and_dkg" }
3030

3131
[dev-dependencies]
3232
blake2.workspace = true

bbs_plus/src/proof.rs

+7
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ impl<E: Pairing> PoKOfSignatureG1Protocol<E> {
296296
})
297297
}
298298

299+
/// Generate a partial proof, i.e. don't generate responses for message indices in `skip_responses_for` as these will be
300+
/// generated by some other protocol.
299301
pub fn gen_partial_proof(
300302
mut self,
301303
challenge: &E::ScalarField,
@@ -307,6 +309,7 @@ impl<E: Pairing> PoKOfSignatureG1Protocol<E> {
307309
}
308310
// Schnorr response for relation `A_bar - d == A'*{-e} + h_0*r2`
309311
let sc_resp_1 = mem::take(&mut self.sc_comm_1).gen_proof(challenge);
312+
310313
let wits = schnorr_responses_to_msg_index_map(
311314
mem::take(&mut self.sc_wits_2),
312315
revealed_msg_ids,
@@ -386,6 +389,8 @@ impl<E: Pairing> PoKOfSignatureG1Proof<E> {
386389
)
387390
}
388391

392+
/// Similar to `Self::verify` but responses for some messages (witnesses) are provided in `missing_responses`.
393+
/// The keys of the map are message indices.
389394
pub fn verify_partial(
390395
&self,
391396
revealed_msgs: &BTreeMap<usize, E::ScalarField>,
@@ -403,6 +408,8 @@ impl<E: Pairing> PoKOfSignatureG1Proof<E> {
403408
)
404409
}
405410

411+
/// Similar to `Self::verify_with_randomized_pairing_checker` but responses for some messages (witnesses) are provided in `missing_responses`.
412+
/// The keys of the map are message indices.
406413
pub fn verify_partial_with_randomized_pairing_checker(
407414
&self,
408415
revealed_msgs: &BTreeMap<usize, E::ScalarField>,

bbs_plus/src/proof_23_cdl.rs

+6
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ impl<E: Pairing> PoKOfSignature23G1Protocol<E> {
241241
})
242242
}
243243

244+
/// Generate a partial proof, i.e. don't generate responses for message indices in `skip_responses_for` as these will be
245+
/// generated by some other protocol.
244246
pub fn gen_partial_proof(
245247
mut self,
246248
challenge: &E::ScalarField,
@@ -331,6 +333,8 @@ impl<E: Pairing> PoKOfSignature23G1Proof<E> {
331333
)
332334
}
333335

336+
/// Similar to `Self::verify` but responses for some messages (witnesses) are provided in `missing_responses`.
337+
/// The keys of the map are message indices.
334338
pub fn verify_partial(
335339
&self,
336340
revealed_msgs: &BTreeMap<usize, E::ScalarField>,
@@ -348,6 +352,8 @@ impl<E: Pairing> PoKOfSignature23G1Proof<E> {
348352
)
349353
}
350354

355+
/// Similar to `Self::verify_with_randomized_pairing_checker` but responses for some messages (witnesses) are provided in `missing_responses`.
356+
/// The keys of the map are message indices.
351357
pub fn verify_partial_with_randomized_pairing_checker(
352358
&self,
353359
revealed_msgs: &BTreeMap<usize, E::ScalarField>,

bbs_plus/src/proof_23_ietf.rs

+6
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ impl<E: Pairing> PoKOfSignature23G1Protocol<E> {
192192
})
193193
}
194194

195+
/// Generate a partial proof, i.e. don't generate responses for message indices in `skip_responses_for` as these will be
196+
/// generated by some other protocol.
195197
pub fn gen_partial_proof(
196198
mut self,
197199
challenge: &E::ScalarField,
@@ -273,6 +275,8 @@ impl<E: Pairing> PoKOfSignature23G1Proof<E> {
273275
)
274276
}
275277

278+
/// Similar to `Self::verify` but responses for some messages (witnesses) are provided in `missing_responses`.
279+
/// The keys of the map are message indices.
276280
pub fn verify_partial(
277281
&self,
278282
revealed_msgs: &BTreeMap<usize, E::ScalarField>,
@@ -290,6 +294,8 @@ impl<E: Pairing> PoKOfSignature23G1Proof<E> {
290294
)
291295
}
292296

297+
/// Similar to `Self::verify_with_randomized_pairing_checker` but responses for some messages (witnesses) are provided in `missing_responses`.
298+
/// The keys of the map are message indices.
293299
pub fn verify_partial_with_randomized_pairing_checker(
294300
&self,
295301
revealed_msgs: &BTreeMap<usize, E::ScalarField>,

bulletproofs_plus_plus/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bulletproofs_plus_plus"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
@@ -18,7 +18,7 @@ serde.workspace = true
1818
serde_with.workspace = true
1919
zeroize.workspace = true
2020
rayon = { workspace = true, optional = true }
21-
dock_crypto_utils = { version = "0.19.0", default-features = false, path = "../utils" }
21+
dock_crypto_utils = { version = "0.20.0", default-features = false, path = "../utils" }
2222

2323
[dev-dependencies]
2424
blake2.workspace = true

coconut/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "coconut-crypto"
3-
version = "0.10.0"
3+
version = "0.11.0"
44
edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
@@ -22,9 +22,9 @@ itertools.workspace = true
2222
zeroize.workspace = true
2323
serde_with.workspace = true
2424
rayon = { workspace = true, optional = true }
25-
utils = { package = "dock_crypto_utils", version = "0.19.0", default-features = false, path = "../utils" }
26-
schnorr_pok = { version = "0.19.0", default-features = false, path = "../schnorr_pok" }
27-
secret_sharing_and_dkg = { version = "0.12.0", default-features = false, path = "../secret_sharing_and_dkg" }
25+
utils = { package = "dock_crypto_utils", version = "0.20.0", default-features = false, path = "../utils" }
26+
schnorr_pok = { version = "0.20.0", default-features = false, path = "../schnorr_pok" }
27+
secret_sharing_and_dkg = { version = "0.13.0", default-features = false, path = "../secret_sharing_and_dkg" }
2828

2929
[dev-dependencies]
3030
blake2.workspace = true

compressed_sigma/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "compressed_sigma"
3-
version = "0.0.10"
3+
version = "0.0.11"
44
edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
@@ -15,7 +15,7 @@ ark-std.workspace = true
1515
ark-poly.workspace = true
1616
rayon = {workspace = true, optional = true}
1717
digest.workspace = true
18-
dock_crypto_utils = { version = "0.19.0", default-features = false, path = "../utils" }
18+
dock_crypto_utils = { version = "0.20.0", default-features = false, path = "../utils" }
1919

2020
[dev-dependencies]
2121
blake2.workspace = true

delegatable_credentials/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "delegatable_credentials"
3-
version = "0.9.0"
3+
version = "0.10.0"
44
edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
@@ -20,8 +20,8 @@ serde.workspace = true
2020
serde_with.workspace = true
2121
zeroize.workspace = true
2222
num-bigint = { version = "0.4.0", default-features = false }
23-
schnorr_pok = { version = "0.19.0", default-features = false, path = "../schnorr_pok" }
24-
dock_crypto_utils = { version = "0.19.0", default-features = false, path = "../utils" }
23+
schnorr_pok = { version = "0.20.0", default-features = false, path = "../schnorr_pok" }
24+
dock_crypto_utils = { version = "0.20.0", default-features = false, path = "../utils" }
2525

2626
[dependencies.num-integer]
2727
version = "0.1.42"

kvac/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kvac"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
@@ -18,8 +18,8 @@ rayon = {workspace = true, optional = true}
1818
serde.workspace = true
1919
serde_with.workspace = true
2020
itertools.workspace = true
21-
dock_crypto_utils = { version = "0.19.0", default-features = false, path = "../utils" }
22-
schnorr_pok = { version = "0.19.0", default-features = false, path = "../schnorr_pok" }
21+
dock_crypto_utils = { version = "0.20.0", default-features = false, path = "../utils" }
22+
schnorr_pok = { version = "0.20.0", default-features = false, path = "../schnorr_pok" }
2323

2424
[dev-dependencies]
2525
blake2.workspace = true

kvac/src/bbdt_2016/proof_cdh.rs

+6
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ impl<G: AffineRepr> PoKOfMACProtocol<G> {
214214
})
215215
}
216216

217+
/// Generate a partial proof, i.e. don't generate responses for message indices in `skip_responses_for` as these will be
218+
/// generated by some other protocol.
217219
pub fn gen_partial_proof(
218220
mut self,
219221
challenge: &G::ScalarField,
@@ -282,6 +284,8 @@ impl<G: AffineRepr> PoKOfMAC<G> {
282284
self._verify(revealed_msgs, challenge, secret_key, params, None)
283285
}
284286

287+
/// Similar to `Self::verify` but responses for some messages (witnesses) are provided in `missing_responses`.
288+
/// The keys of the map are message indices.
285289
pub fn verify_partial(
286290
&self,
287291
revealed_msgs: &BTreeMap<usize, G::ScalarField>,
@@ -308,6 +312,8 @@ impl<G: AffineRepr> PoKOfMAC<G> {
308312
self._verify_schnorr_proof(revealed_msgs, challenge, params, None)
309313
}
310314

315+
/// Similar to `Self::verify_schnorr_proof` but responses for some messages (witnesses) are provided in `missing_responses`.
316+
/// The keys of the map are message indices.
311317
pub fn verify_partial_schnorr_proof(
312318
&self,
313319
revealed_msgs: &BTreeMap<usize, G::ScalarField>,

legogroth16/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "legogroth16"
3-
version = "0.14.0"
3+
version = "0.15.0"
44
authors = [ "arkworks contributors", "Dock.io" ]
55
description = "An implementation of the LegoGroth16, the Legosnark variant of Groth16 zkSNARK proof system"
66
repository.workspace = true
@@ -29,7 +29,7 @@ num-bigint = { version = "0.4", default-features = false, optional = true }
2929
log = "0.4"
3030
ark-groth16 = { workspace = true, optional = true }
3131
ark-snark = { version = "^0.4.0", default-features = false, optional = true }
32-
dock_crypto_utils = { version = "0.19.0", default-features = false, path = "../utils" }
32+
dock_crypto_utils = { version = "0.20.0", default-features = false, path = "../utils" }
3333

3434
[dev-dependencies]
3535
csv = { version = "1" }

oblivious_transfer/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "oblivious_transfer_protocols"
3-
version = "0.8.0"
3+
version = "0.9.0"
44
edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
@@ -23,8 +23,8 @@ sha3 = { version = "0.10.6", default-features = false }
2323
aes = { version = "0.8.2", default-features = false }
2424
itertools.workspace = true
2525
byteorder = { version = "1.4", default-features = false }
26-
dock_crypto_utils = { version = "0.19.0", default-features = false, path = "../utils" }
27-
schnorr_pok = { version = "0.19.0", default-features = false, path = "../schnorr_pok" }
26+
dock_crypto_utils = { version = "0.20.0", default-features = false, path = "../utils" }
27+
schnorr_pok = { version = "0.20.0", default-features = false, path = "../schnorr_pok" }
2828

2929
[dev-dependencies]
3030
blake2.workspace = true

proof_system/Cargo.toml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "proof_system"
3-
version = "0.30.0"
3+
version = "0.31.0"
44
edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
@@ -27,18 +27,18 @@ zeroize.workspace = true
2727
itertools.workspace = true
2828
aead = {version = "0.5.2", default-features = false, features = [ "alloc" ]}
2929
chacha20poly1305 = {version = "0.10.1", default-features = false}
30-
bbs_plus = { version = "0.21.0", default-features = false, path = "../bbs_plus" }
31-
schnorr_pok = { version = "0.19.0", default-features = false, path = "../schnorr_pok" }
32-
vb_accumulator = { version = "0.25.0", default-features = false, path = "../vb_accumulator" }
33-
dock_crypto_utils = { version = "0.19.0", default-features = false, path = "../utils" }
34-
saver = { version = "0.17.0", default-features = false, path = "../saver" }
35-
coconut-crypto = { version = "0.10.0", default-features = false, path = "../coconut" }
30+
bbs_plus = { version = "0.22.0", default-features = false, path = "../bbs_plus" }
31+
schnorr_pok = { version = "0.20.0", default-features = false, path = "../schnorr_pok" }
32+
vb_accumulator = { version = "0.26.0", default-features = false, path = "../vb_accumulator" }
33+
dock_crypto_utils = { version = "0.20.0", default-features = false, path = "../utils" }
34+
saver = { version = "0.18.0", default-features = false, path = "../saver" }
35+
coconut-crypto = { version = "0.11.0", default-features = false, path = "../coconut" }
3636
merlin = { package = "dock_merlin", version = "3.0.0", default-features = false, path = "../merlin" }
37-
legogroth16 = { version = "0.14.0", default-features = false, features = ["circom", "aggregation"], path = "../legogroth16" }
38-
bulletproofs_plus_plus = { version = "0.5.0", default-features = false, path = "../bulletproofs_plus_plus" }
39-
smc_range_proof = { version = "0.5.0", default-features = false, path = "../smc_range_proof" }
40-
short_group_sig = { version = "0.3.0", default-features = false, path = "../short_group_sig" }
41-
kvac = { version = "0.4.0", default-features = false, path = "../kvac" }
37+
legogroth16 = { version = "0.15.0", default-features = false, features = ["circom", "aggregation"], path = "../legogroth16" }
38+
bulletproofs_plus_plus = { version = "0.6.0", default-features = false, path = "../bulletproofs_plus_plus" }
39+
smc_range_proof = { version = "0.6.0", default-features = false, path = "../smc_range_proof" }
40+
short_group_sig = { version = "0.4.0", default-features = false, path = "../short_group_sig" }
41+
kvac = { version = "0.5.0", default-features = false, path = "../kvac" }
4242

4343
[dev-dependencies]
4444
ark-bls12-381.workspace = true

proof_system/src/prover.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,8 @@ impl<E: Pairing> Proof<E> {
11321132
}
11331133
}
11341134

1135+
/// Get indices of witnesses of statement index `s_id` for which response should not be generated since it already exists.
1136+
/// If the response didn't exists, then the given `resp_generated` will be updated
11351137
fn get_responses_to_skip(
11361138
s_id: usize,
11371139
total_msgs: usize,

proof_system/src/sub_protocols/bound_check_bpp.rs

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ impl<'a, G: AffineRepr> BoundCheckBppProtocol<'a, G> {
159159
self.bpp_randomness.take().unwrap(),
160160
)?;
161161
let proof = prover.prove(rng, self.setup_params.clone(), transcript)?;
162+
// Don't generated response for index 0 since its response will come from proofs of one of the signatures.
162163
let skip_for = BTreeSet::from([0]);
163164
Ok(StatementProof::BoundCheckBpp(BoundCheckBppProof {
164165
bpp_proof: ProofArbitraryRange {

proof_system/src/sub_protocols/bound_check_legogroth16.rs

+1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ impl<'a, E: Pairing> BoundCheckLegoGrothProtocol<'a, E> {
160160
self.id,
161161
));
162162
}
163+
// Don't generated response for index 0 since its response will come from proofs of one of the signatures.
163164
let skip_for = BTreeSet::from([0]);
164165
Ok(StatementProof::BoundCheckLegoGroth16(
165166
BoundCheckLegoGroth16Proof {

proof_system/src/sub_protocols/bound_check_smc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ impl<'a, E: Pairing> BoundCheckSmcProtocol<'a, E> {
165165
BoundCheckSmcInnerProof::CLS(p)
166166
}
167167
};
168+
// Don't generated response for index 0 since its response will come from proofs of one of the signatures.
168169
let skip_for = BTreeSet::from([0]);
169170
Ok(StatementProof::BoundCheckSmc(BoundCheckSmcProof {
170171
proof,

proof_system/src/sub_protocols/bound_check_smc_with_kv.rs

+1
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ impl<'a, E: Pairing> BoundCheckSmcWithKVProtocol<'a, E> {
197197
BoundCheckSmcWithKVInnerProof::CLS(p)
198198
}
199199
};
200+
// Don't generated response for index 0 since its response will come from proofs of one of the signatures.
200201
let skip_for = BTreeSet::from([0]);
201202
Ok(StatementProof::BoundCheckSmcWithKV(
202203
BoundCheckSmcWithKVProof {

proof_system/src/sub_protocols/inequality.rs

+1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ impl<'a, G: AffineRepr> InequalityProtocol<'a, G> {
130130
.take()
131131
.unwrap()
132132
.gen_proof(challenge);
133+
// Don't generated response for index 0 since its response will come from proofs of one of the signatures.
133134
let skip_for = BTreeSet::from([0]);
134135
Ok(StatementProof::Inequality(InequalityProof {
135136
proof,

proof_system/src/sub_protocols/saver.rs

+1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ impl<'a, E: Pairing> SaverProtocol<'a, E> {
221221
let mut sp_chunks = self.sp_chunks.take().unwrap();
222222
let mut sp_combined = self.sp_combined.take().unwrap();
223223
let skip_for_chunks = BTreeSet::from_iter(0..ciphertext.enc_chunks.len());
224+
// Don't generated response for index 0 since its response will come from proofs of one of the signatures.
224225
let skip_for_message = BTreeSet::from([0]);
225226
Ok(StatementProof::Saver(SaverProof {
226227
ciphertext,

proof_system/src/verifier.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,9 @@ impl<E: Pairing> Proof<E> {
17621762
Ok(())
17631763
}
17641764

1765+
/// Get the response for a witness from the tracked responses of witness equalities. Expects the response
1766+
/// to exists else throws error. This is not to be called for signature proof protocols but others whose
1767+
/// responses are expected to come from them or pedersen commitment protocols.
17651768
fn get_resp_for_message(
17661769
s_idx: usize,
17671770
disjoint_equalities: &[EqualWitnesses],

saver/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "saver"
3-
version = "0.17.0"
3+
version = "0.18.0"
44
edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
@@ -20,8 +20,8 @@ rayon = {workspace = true, optional = true}
2020
serde.workspace = true
2121
serde_with.workspace = true
2222
zeroize.workspace = true
23-
dock_crypto_utils = { version = "0.19.0", default-features = false, path = "../utils" }
24-
legogroth16 = { version = "0.14.0", default-features = false, features = ["aggregation"], path = "../legogroth16" }
23+
dock_crypto_utils = { version = "0.20.0", default-features = false, path = "../utils" }
24+
legogroth16 = { version = "0.15.0", default-features = false, features = ["aggregation"], path = "../legogroth16" }
2525
merlin = { package = "dock_merlin", version = "3.0.0", default-features = false, path = "../merlin" }
2626

2727
[dev-dependencies]

0 commit comments

Comments
 (0)