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

Paillier Zero Knowledge proof #29

Open
gbenattar opened this issue May 25, 2018 · 0 comments
Open

Paillier Zero Knowledge proof #29

gbenattar opened this issue May 25, 2018 · 0 comments

Comments

@gbenattar
Copy link

gbenattar commented May 25, 2018

Pull request: mortendahl/rust-paillier#2.

The purpose of this task is to add Zero Knowledge proof that a Paillier public key (EK) was generated correctly.

Reference: Subsection 3.1 of Fast Secure Two-Party ECDSA Signing.

Example of scenario:

(1) Prover send EK to Verifier
(2) Verifier generates a challenge, send it to Prover
(3) Prover send a proof to Verifier based on his challenge
(4) Verifier verifies that EK is ligitimate by using his challenge and Prover's proof

Basic trait proposal:

pub struct CorrectInputProof<I> {
    pub e : I,
    pub z : Vec<I>,
}

pub struct CorrectKeyProof<I> {
    pub proof : I,
}

pub trait ProveCorrectKey<I, EK, DK> {
    fn generate_challenge(ek: &EK) -> (Vec<I>, CorrectInputProof<I>, Vec<I>);
    fn prove(dk: &DK, challenge: &Vec<I>, correct_input_proof: &CorrectInputProof<I>)
        -> Result<CorrectKeyProof<I>, ProofError>;
    fn verify(correct_key_proof: &CorrectKeyProof<I>, y: &Vec<I>) -> Result<(), ProofError>;
}
let (ek, dk) = test_keypair().keys();

let (challenge, correct_input_proof, y) = AbstractPaillier::generate_challenge(&ek);
let proof_results = AbstractPaillier::prove(&dk, &challenge, &correct_input_proof);
assert!(proof_results.is_ok());

let result = AbstractPaillier::verify(&proof_results.unwrap(), &y);
assert!(result.is_ok());
gbenattar pushed a commit to gbenattar/rust-paillier that referenced this issue May 26, 2018
Test: cargo build & cargo test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant