Skip to content

Commit 09ac94d

Browse files
committed
Update package metadata.
1 parent 6f6ddb6 commit 09ac94d

13 files changed

+42
-118
lines changed

CHANGELOG.md

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,7 @@
22

33
Entries are listed in reverse chronological order.
44

5-
## 0.8.4
6-
* move Criterion to dev-dependencies
75

8-
## 0.8.3
9-
* switch to Criterion for benchmarking
10-
* remove define_proof benchmarking
11-
* revert `thiserror` to v1 until tor-browser 15.0
12-
13-
14-
## 0.8.2
15-
* remove `nightly` feature, fix clippy warnings
16-
17-
## 0.8.1
18-
* update `thiserror to v2`
19-
* fix tests
20-
21-
## 0.8.0
22-
* update `curve25519-dalek` dependency to 4.0
23-
* update `merlin` dependency to 3
24-
* update `rand` dependency to 0.8
25-
* update `sha2` dependency to 0.10
26-
* remove backend features to be consistent with upstream dalek-cryptography
27-
* fix bug that occurs when public point is the identity
28-
29-
## 0.7.0
30-
31-
* Update `curve25519-dalek`, `merlin` dependencies to 2.0.
32-
* Switch from `failure` to `thiserror` to provide `std`-compatible errors.
33-
* Correct `curve25519-dalek` feature-selection logic.
34-
35-
## 0.6.2
36-
37-
* Correct minimum `curve25519-dalek` version to 1.0.3, not 1.0.0.
38-
39-
## 0.6.1
40-
41-
* Add metadata for docs.rs.
42-
43-
## 0.6.0
44-
45-
* Rewrite around a constraint system API.
6+
## 0.1
467

8+
Initial fork from `lox-zkp` and compatibility with the sigma protocol IETF draft.

Cargo.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
[package]
2-
name = "lox-zkp"
2+
name = "sigma-rs"
33
version = "0.8.4"
4-
authors = ["Henry de Valence <[email protected]>"]
4+
authors = [
5+
"Henry de Valence <[email protected]>",
6+
"nougzarm <[email protected]>",
7+
"Michele Orrù <[email protected]>",
8+
"Lénaïck Gouriou <[email protected]>"
9+
]
510
edition = "2018"
611
license = "CC0-1.0"
712
readme = "README.md"
8-
repository = "https://gitlab.torproject.org/onyinyang/lox-zkp"
13+
repository = "https://github.com/mmaker/sigma-rs"
914
documentation = "https://docs.rs/lox-zkp"
1015
categories = ["cryptography"]
1116
keywords = ["cryptography", "ristretto", "zero-knowledge", "NIZK",

README.md

Lines changed: 9 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1-
# lox-zkp: a(n updated) toolkit for Schnorr proofs used by Lox
1+
# sigma-rs: a(n updated) toolkit for Σ-protocols
22

33
### Background
44

5-
This crate was originally created as part of [`dalek-cyptography`](https://github.com/dalek-cryptography) and then
6-
was forked to [`zkcrypto`](https://github.com/zkcrypto) and updated to include forks of
7-
`dalek-cryptography` dependencies that were compatible with `zkcrypto`'s
8-
[`zkp`](https://github.com/zkcrypto/zkp)
9-
crate. These forks have since fallen out of sync with the upstream
10-
`dalek-cryptography` crates which has led to incompatabilities when relying on
11-
up-to-date dependencies in projects that rely on both `zkp` and
12-
`dalek-cryptography` crates, such as [Lox](https://gitlab.torproject.org/tpo/anti-censorship/lox). This crate was created for 3 reasons:
13-
1. To bring the `zkp` crate up to date with `dalek-cryptography` dependencies
14-
2. To resolve a bug in the zkp crate
15-
3. To enabling publishing additional lox crates to crates.io with a working zkp
16-
dependency.
17-
18-
This crate has a toolkit for Schnorr-style zero-knowledge proofs,
19-
instantiated using the ristretto255 group.
5+
This crate was originally created as part of [`dalek-cyptography`](https://github.com/dalek-cryptography).
6+
It has been forked:
7+
1. To bring the `zkp` crate up to date with `dalek-cryptography` dependencies.
8+
2. To resolve bugs and incorporate changes to the fiat-shamir transform.
9+
3. To make this effort compatible with the Σ-protocol standardization effort.
2010

11+
This crate has a toolkit for Schnorr-style zero-knowledge proofs over generic [`Group`](https://github.com/zkcrypto/group)s
2112
It provides two levels of API:
2213

2314
* a higher-level, declarative API based around the `define_proof` macro,
@@ -31,7 +22,7 @@ It provides two levels of API:
3122
(A, G, H), // Public variables unique to each proof
3223
(B) : // Public variables common between proofs
3324
A = (x * B), // Statements to prove
34-
G = (x * H)
25+
G = (x * H)
3526
}
3627
```
3728
This expands into a module containing an implementation of proving,
@@ -46,40 +37,7 @@ It provides two levels of API:
4637
lower-level API.
4738
The lower-level API is contained in the `toolbox` module.
4839

49-
# Examples
50-
51-
Examples of how to use the API can be found in the library's `tests`
52-
directory.
53-
54-
Currently, the examples include:
55-
56-
* Specification of an "anonymous credential presentation with 10 hidden
57-
attributes" proof from CMZ'13. Depending on the backend selection, the
58-
generated implementation is between 20 to 40 times faster than the benchmark
59-
numbers reported in that paper.
60-
61-
* A transcript-based signature and VRF construction with an auto-generated
62-
implementation. This includes an example of using the online interactive
63-
composition [described in the Merlin blog post][merlin_blog] to provide chained
64-
signatures with a counterparty.
65-
66-
* An example of using the lower-level constraint system API.
67-
68-
69-
# Use and features
70-
71-
To enable the `define_proof` macro, import the crate like so:
72-
```
73-
#[macro_use]
74-
extern crate zkp;
75-
```
76-
77-
#### Transcript debugging
78-
79-
The `debug-transcript` feature is for development and testing, and
80-
prints a log of the data fed into the proof transcript.
81-
82-
#### Autogenerated benchmarks
40+
#### Auto-generated benchmarks
8341

8442
The `define_proof` macro builds benchmarks for the generated proof
8543
statements, but because these are generated in the client crate (where
@@ -101,4 +59,3 @@ code, for now there are no stability guarantees on the proofs, so they
10159
should not yet be deployed.
10260

10361
[bellman]: https://github.com/zkcrypto/bellman
104-
[merlin_blog]: https://medium.com/@hdevalence/merlin-flexible-composable-transcripts-for-zero-knowledge-proofs-28d9fda22d9a

benches/dleq_benches.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use criterion::{criterion_group, criterion_main, Criterion};
1313
extern crate bincode;
1414
extern crate curve25519_dalek;
15-
extern crate lox_zkp;
15+
extern crate sigma_rs;
1616
extern crate serde;
1717
extern crate serde_derive;
1818
extern crate sha2;
@@ -23,10 +23,10 @@ mod dleq_benches {
2323
use curve25519_dalek::constants as dalek_constants;
2424
use curve25519_dalek::ristretto::RistrettoPoint;
2525
use curve25519_dalek::scalar::Scalar;
26-
use lox_zkp::toolbox::{
26+
use sigma_rs::toolbox::{
2727
batch_verifier::BatchVerifier, prover::Prover, verifier::Verifier, SchnorrCS,
2828
};
29-
use lox_zkp::Transcript;
29+
use sigma_rs::Transcript;
3030

3131
#[allow(non_snake_case)]
3232
fn dleq_statement<CS: SchnorrCS>(

benches/zkp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
extern crate bincode;
1313
extern crate curve25519_dalek;
1414
#[macro_use]
15-
extern crate lox_zkp;
15+
extern crate sigma_rs;
1616
extern crate serde;
1717
extern crate serde_derive;
1818
extern crate sha2;

src/macros.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ macro_rules! define_proof {
371371

372372
/*use criterion::{criterion_group, criterion_main, Criterion};
373373
374-
mod lox_zkp_benches {
374+
mod sigma_rs_benches {
375375
use super::*;
376376
use rand::thread_rng;
377377
@@ -467,15 +467,15 @@ macro_rules! define_proof {
467467
}
468468
469469
criterion_group!{
470-
name = lox_zkp_benches;
470+
name = sigma_rs_benches;
471471
config = Criterion::default();
472472
targets =
473473
prove,
474474
verify_batchable_proof,
475475
verify_compact_proof,
476476
}
477477
}
478-
criterion_main!(lox_zkp_benches::lox_zkp_benches);*/
478+
criterion_main!(sigma_rs_benches::sigma_rs_benches);*/
479479
}
480480
}
481481
}

tests/dleq_using_constraint_api.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
extern crate bincode;
1414
extern crate curve25519_dalek;
15-
extern crate lox_zkp;
15+
extern crate sigma_rs;
1616
extern crate serde;
1717
extern crate sha2;
1818

@@ -22,10 +22,10 @@ use curve25519_dalek::constants as dalek_constants;
2222
use curve25519_dalek::ristretto::RistrettoPoint;
2323
use curve25519_dalek::scalar::Scalar;
2424

25-
use lox_zkp::toolbox::{
25+
use sigma_rs::toolbox::{
2626
batch_verifier::BatchVerifier, prover::Prover, verifier::Verifier, SchnorrCS,
2727
};
28-
use lox_zkp::Transcript;
28+
use sigma_rs::Transcript;
2929

3030
fn dleq_statement<CS: SchnorrCS>(
3131
cs: &mut CS,

tests/interactive_codec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rand::rngs::OsRng;
22
use curve25519_dalek::ristretto::RistrettoPoint;
33

4-
use lox_zkp::toolbox::sigma::transcript::{r#trait::TranscriptCodec, transcriptcodec::KeccakTranscript};
4+
use sigma_rs::toolbox::sigma::transcript::{r#trait::TranscriptCodec, transcriptcodec::KeccakTranscript};
55

66
pub type KeccakTranscriptRistretto = KeccakTranscript<curve25519_dalek::ristretto::RistrettoPoint>;
77

tests/non_interactive_protocol.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ use rand::rngs::OsRng;
22
use curve25519_dalek::ristretto::RistrettoPoint;
33
use curve25519_dalek::scalar::Scalar;
44

5-
use lox_zkp::toolbox::sigma::group_morphism::GroupMorphismPreimage;
6-
use lox_zkp::toolbox::sigma::schnorr_proof::SchnorrProof;
7-
use lox_zkp::toolbox::sigma::transcript::transcriptcodec::KeccakTranscript;
8-
use lox_zkp::toolbox::sigma::fiat_shamir::NISigmaProtocol;
5+
use sigma_rs::toolbox::sigma::group_morphism::GroupMorphismPreimage;
6+
use sigma_rs::toolbox::sigma::schnorr_proof::SchnorrProof;
7+
use sigma_rs::toolbox::sigma::transcript::transcriptcodec::KeccakTranscript;
8+
use sigma_rs::toolbox::sigma::fiat_shamir::NISigmaProtocol;
99

1010
type G = RistrettoPoint;
1111

tests/proof_composition_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::ops::Not;
22

33
use rand::{rngs::OsRng, CryptoRng, Rng};
4-
use lox_zkp::toolbox::sigma::{proof_composition::OrEnum, AndProtocol, OrProtocol, SigmaProtocol};
4+
use sigma_rs::toolbox::sigma::{proof_composition::OrEnum, AndProtocol, OrProtocol, SigmaProtocol};
55
use curve25519_dalek::{ristretto::RistrettoPoint, scalar::Scalar};
66

77
pub struct LokZkpSchnorr {
@@ -46,7 +46,7 @@ impl SigmaProtocol for LokZkpSchnorr {
4646
}
4747

4848
fn simulate_proof(
49-
&self,
49+
&self,
5050
challenge: &Self::Challenge,
5151
rng: &mut (impl Rng + CryptoRng)
5252
) -> (Self::Commitment, Self::Response) {

0 commit comments

Comments
 (0)