Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace proof of fairness with a PDL with Slack proof from GG18/20 #26

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/add_party_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub struct JoinMessage {
/// environment variables for each party that they agree on. In this case, each new party generates
/// it's own DlogStatements and submits it's proofs
fn generate_h1_h2_n_tilde() -> (BigInt, BigInt, BigInt, BigInt, BigInt) {
let (ek_tilde, dk_tilde) = Paillier::keypair().keys();
let (ek_tilde, dk_tilde) = Paillier::keypair_with_modulus_size(crate::PAILLIER_KEY_SIZE).keys();
let one = BigInt::one();
let phi = (&dk_tilde.p - &one) * (&dk_tilde.q - &one);
let h1 = BigInt::sample_below(&ek_tilde.n);
Expand Down
22 changes: 16 additions & 6 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,28 @@ pub enum FsDkrError {
#[error("Shares did not pass verification.")]
PublicShareValidationError,

#[error("SizeMismatch error for the refresh message {refresh_message_index:?} - Fairness proof length: {fairness_proof_len:?}, Points Commited Length: {points_commited_len:?}, Points Encrypted Length: {points_encrypted_len:?}")]
#[error("SizeMismatch error for the refresh message {refresh_message_index:?} - pdl proof length: {pdl_proof_len:?}, Points Commited Length: {points_commited_len:?}, Points Encrypted Length: {points_encrypted_len:?}")]
SizeMismatchError {
refresh_message_index: usize,
fairness_proof_len: usize,
pdl_proof_len: usize,
points_commited_len: usize,
points_encrypted_len: usize,
},

#[error("Fairness proof verification failed, results - T_add_e_Y == z_G: {t_add_eq_z_g:?} - e_u_add_c_e == enc_z_w: {e_u_add_eq_z_w:?}")]
FairnessProof {
t_add_eq_z_g: bool,
e_u_add_eq_z_w: bool,
#[error("PDLwSlack proof verification failed, results: u1 == u1_test: {is_u1_eq:?}, u2 == u2_test: {is_u2_eq:?}, u3 == u3_test: {is_u3_eq:?}")]
PDLwSlackProof {
is_u1_eq: bool,
is_u2_eq: bool,
is_u3_eq: bool,
},

#[error("Range Proof failed for party: {party_index:?}")]
RangeProof { party_index: usize },

#[error("The Paillier moduli size of party: {party_index:?} is {moduli_size:?} bits, when it should be 2047-2048 bits")]
MouliTooSmall {
party_index: usize,
moduli_size: usize,
},

#[error("Paillier verification proof failed for party {party_index:?}")]
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

pub mod add_party_message;
pub mod error;
pub mod proof_of_fairness;
pub mod range_proofs;
pub mod refresh_message;
mod test;
pub mod zk_pdl_with_slack;

pub(crate) const PAILLIER_KEY_SIZE: usize = 2048;
197 changes: 0 additions & 197 deletions src/proof_of_fairness.rs

This file was deleted.

Loading