latticex-foundation / opentss Goto Github PK
View Code? Open in Web Editor NEWAn ECDSA threshold signature algorithm implemented in Rust.
License: GNU General Public License v3.0
An ECDSA threshold signature algorithm implemented in Rust.
License: GNU General Public License v3.0
Amazing library. We really love it. For work, we can't use the Signing function, instead we need to generate a valid {t,n} threshold ecdsa (PublicKey, PrivateKey) pair. We can even ask the t
out of n
clients to send their local private keys to the final computer that will generate the final valid pair. Also this process will be used only once as we no longer use the same party again.
Let's rewrite here our scenario
n
computers generate their local secrets.t
of these n
computers will share their keys to a special node.Think it as a 3rd party authentication service that is able to recreate the final (PublicKey,PrivateKey) pair.
Or think it as an escrow multi sig. We know from the beginning the multi sig address, and after some time t
out of n
will allow one node to create the (PublicKey, PrivateKey) to claim control over the multi-sig address.
Any idea of how to do it ? We really appreciate if you can help us, otherwise we can not use this amazing library in our work.
Those sample codes of keygen and singing function are really helpful. But Singature Verifiction is not yet present. Please provide.
I generated digital signature according to the readme.md. But there is no way to verify the correctness of this signature. Could you provide sample code for verifying the signature? Thanks
I tried to write the sample code according to the readme.md, but it couldn't run, and I didn't find the cause of the error. Could you please provide a working sample code? Sample code and errors are shown below. Thank you very much.
pub mod communication;
pub mod protocols;
pub mod utilities;
use crate::communication::sending_messages::*;
use curv::elliptic::curves::{Point, Scalar, Secp256k1};
use protocols::multi_party::dmz21::common::*;
use protocols::multi_party::dmz21::keygen::*;
pub type CU = Secp256k1;
pub type FE = Scalar<Secp256k1>;
pub type GE = Point<Secp256k1>;
fn main() {
// step 1:新建一个Phase对象。
println!("第 1 步:新建一个Phase对象。");
let partyid = "1".to_string();
let params = Parameters {
threshold: 1,
share_count: 3,
};
let party_ids = vec!["1".to_string(), "2".to_string(), "3".to_string()];
let mut keygen = KeyGenPhase::new(partyid, params, &Some(party_ids)).unwrap();
// step 2:首先调用process_begin,返回下一轮要发送的消息。
println!("第 2 步:首先调用process_begin,返回下一轮要发送的消息。");
let sending_msg: SendingMessages = keygen.process_begin().unwrap();
match sending_msg {
SendingMessages::BroadcastMessage(msg) => {
// broadcast the msg to all(including self).
println!("1");
}
SendingMessages::P2pMessage(msg) => {
// send according to the k,v in the msg. k is the index which v will to be sent to.
println!("2");
}
SendingMessages::SubsetMessage(msg) => {
// send according to the k in the party_ids or subset(used in sign phase). k is the index which msg will to be sent to.
println!("3");
}
_ => {}
}
// step 3:通过 处理消息msg_handler。
println!("第 3 步:通过 处理消息msg_handler。");
loop {
// let (recv_from, recv_msg) = According to the last round of SendingMessages
let recv_from = "".to_string();
let recv_msg = vec![0u8];
let sending_msg = keygen.msg_handler(recv_from, &recv_msg).unwrap();
match sending_msg {
SendingMessages::KeyGenSuccessWithResult(msg) => {
println!("{}", msg);
// got the keygen result
break;
}
_ => {
// other sending messages, ref Step 2.
}
}
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.