forked from coinbase/cb-mpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschnorr_2p.h
More file actions
31 lines (24 loc) · 694 Bytes
/
schnorr_2p.h
File metadata and controls
31 lines (24 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
#include <cbmpc/crypto/base.h>
#include <cbmpc/protocol/ec_dkg.h>
#include <cbmpc/protocol/mpc_job.h>
#include <cbmpc/zk/zk_ec.h>
#include <cbmpc/zk/zk_paillier.h>
namespace coinbase::mpc::schnorr2p {
using key_t = eckey::key_share_2p_t;
enum class variant_e {
EdDSA,
BIP340,
};
/**
* @specs:
* - schnorr-spec | Schnorr-2PC-Sign-2P
*/
error_t sign_batch(job_2p_t& job, key_t& key, const std::vector<mem_t>& msgs, std::vector<buf_t>& sigs,
variant_e variant);
/**
* @specs:
* - schnorr-spec | Schnorr-2PC-Sign-2P
*/
error_t sign(job_2p_t& job, key_t& key, const mem_t& msg, buf_t& sig, variant_e variant);
} // namespace coinbase::mpc::schnorr2p