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

X1 new bounds in q/3...2q/3 #31

Open
wants to merge 2 commits into
base: 2.0
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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ edition = "2021"
[dependencies]
rand = "0.8"
serde = { version = "1", features = ["derive"] }
two-party-ecdsa = { git = "https://github.com/ZenGo-X/two-party-ecdsa.git" }
two-party-ecdsa = { git = "https://github.com/ZenGo-X/two-party-ecdsa.git" ,branch = "party1-msg1-rand-range"}
2 changes: 2 additions & 0 deletions src/ecdsa/two_party/party1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub struct KeyGenParty1Message2 {
pub ecdh_second_message: party_one::KeyGenSecondMsg,
pub ek: EncryptionKey,
pub c_key: BigInt,
pub encrypted_share_minus_q_thirds: BigInt,
pub correct_key_proof: NICorrectKeyProof,
pub range_proof: RangeProofNi,
}
Expand Down Expand Up @@ -131,6 +132,7 @@ impl MasterKey1 {
ecdh_second_message: key_gen_second_message,
ek: paillier_key_pair.ek.clone(),
c_key: paillier_key_pair.encrypted_share.clone(),
encrypted_share_minus_q_thirds:paillier_key_pair.encrypted_share_minus_q_thirds.clone(),
correct_key_proof,
range_proof,
},
Expand Down
6 changes: 3 additions & 3 deletions src/ecdsa/two_party/party2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ impl MasterKey2 {
(),
> {
let paillier_encryption_key = party_one_second_message.ek.clone();
let paillier_encrypted_share = party_one_second_message.c_key.clone();
let paillier_encrypted_share = party_one_second_message.encrypted_share_minus_q_thirds.clone();

let party_two_second_message =
party_two::KeyGenSecondMsg::verify_commitments_and_dlog_proof(
&party_one_first_message,
&party_one_second_message.ecdh_second_message,
);

let party_two_paillier = party_two::PaillierPublic {
let mut party_two_paillier = party_two::PaillierPublic {
ek: paillier_encryption_key.clone(),
encrypted_secret_share: paillier_encrypted_share.clone(),
};
Expand All @@ -132,7 +132,7 @@ impl MasterKey2 {
&party_two_paillier,
&party_one_second_message.range_proof,
);

party_two_paillier.encrypted_secret_share = party_one_second_message.c_key.clone();
let (pdl_first_message, pdl_chal) = party_two_paillier.pdl_challenge(
&party_one_second_message
.ecdh_second_message
Expand Down