Skip to content

Commit

Permalink
Several changes
Browse files Browse the repository at this point in the history
- New protocol for proving pseudonym correctness in Syra
- Use hash based commitment in some secret sharing schemes
- Describe the extended NI-TZK protocol
- Update notation at few places to make review easier
- Upgrade wasmer to 5.0

Signed-off-by: lovesh <[email protected]>
  • Loading branch information
lovesh committed Oct 30, 2024
1 parent a285dd1 commit 8b705f4
Show file tree
Hide file tree
Showing 20 changed files with 1,047 additions and 997 deletions.
2 changes: 1 addition & 1 deletion legogroth16/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ark-r1cs-std = { workspace = true, optional = true }
tracing = { version = "0.1", default-features = false, features = [ "attributes" ], optional = true }
derivative = { version = "2.0", features = ["use_core"], optional = true }
rayon = { workspace = true, optional = true }
wasmer = { version = "4.3.6", optional = true, default-features = false }
wasmer = { version = "5.0.0", optional = true, default-features = false }
fnv = { version = "1.0.3", default-features = false, optional = true }
num-bigint = { version = "0.4", default-features = false, optional = true }
log = "0.4"
Expand Down
10 changes: 4 additions & 6 deletions proof_system/src/sub_protocols/verifiable_encryption_tz_21.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use zeroize::{Zeroize, ZeroizeOnDrop};

pub mod dkgith_decls {
use super::BatchedHashedElgamalCiphertext;
use ark_ec::AffineRepr;
use verifiable_encryption::tz_21::dkgith::{CompressedCiphertext, DkgithProof};

// Very large values for repetitions cause stack overflow
Expand All @@ -47,7 +46,7 @@ pub mod dkgith_decls {
pub const SEED_SIZE: usize = 16;
pub const SALT_SIZE: usize = 32;

pub type Proof<G: AffineRepr> = DkgithProof<
pub type Proof<G> = DkgithProof<
G,
BatchedHashedElgamalCiphertext<G>,
NUM_PARTIES,
Expand All @@ -57,12 +56,11 @@ pub mod dkgith_decls {
SEED_SIZE,
SALT_SIZE,
>;
pub type Ciphertext<G: AffineRepr> =
pub type Ciphertext<G> =
CompressedCiphertext<G, BatchedHashedElgamalCiphertext<G>, SUBSET_SIZE>;
}

pub mod rdkgith_decls {
use ark_ec::AffineRepr;
use dock_crypto_utils::elgamal::BatchedHashedElgamalCiphertext;
use verifiable_encryption::tz_21::rdkgith::{CompressedCiphertext, RdkgithProof};

Expand All @@ -77,14 +75,14 @@ pub mod rdkgith_decls {
pub const NUM_PARTIES_MINUS_THRESHOLD: usize = 15;
pub const SUBSET_SIZE: usize = 10;

pub type Proof<G: AffineRepr> = RdkgithProof<
pub type Proof<G> = RdkgithProof<
G,
BatchedHashedElgamalCiphertext<G>,
NUM_PARTIES,
THRESHOLD,
NUM_PARTIES_MINUS_THRESHOLD,
>;
pub type Ciphertext<G: AffineRepr> =
pub type Ciphertext<G> =
CompressedCiphertext<G, BatchedHashedElgamalCiphertext<G>, SUBSET_SIZE>;
}

Expand Down
12 changes: 9 additions & 3 deletions secret_sharing_and_dkg/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<!-- cargo-rdme start -->

# Secret sharing and distributed key generation

Implements Secret Sharing (SS), Verifiable Secret Sharing (VSS), Distributed Verifiable Secret Sharing (DVSS), Distributed
Key Generation (DKG) and Publicly Verifiable Secret Sharing (PVSS) algorithms. DVSS and DKG do not require a trusted dealer. Also implements a distributed discrete log check.
Implements Secret Sharing (SS), Verifiable Secret Sharing (VSS), Distributed Verifiable Secret Sharing (DVSS), Distributed
Key Generation (DKG) and Publicly Verifiable Secret Sharing (PVSS) algorithms. DVSS and DKG do not require a trusted dealer.
Also implements a distributed discrete log check.


1. [Shamir secret sharing (Requires a trusted dealer)](./src/shamir_ss.rs)
Expand All @@ -12,4 +15,7 @@ Key Generation (DKG) and Publicly Verifiable Secret Sharing (PVSS) algorithms. D
1. [Gennaro DKG from the paper Secure Distributed Key Generation for Discrete-Log Based Cryptosystems](./src/gennaro_dkg.rs)
1. [Distributed Key Generation from FROST](./src/frost_dkg.rs)
1. [Distributed discrete log (DLOG) check](./src/distributed_dlog_check)
1. [Publicly Verifiable Secret Sharing](./src/baghery_pvss)
1. [Publicly Verifiable Secret Sharing](./src/baghery_pvss)
1. [Verifiable Secret Sharing using hash-commitments](./src/baghery_vss.rs)

<!-- cargo-rdme end -->
Loading

0 comments on commit 8b705f4

Please sign in to comment.