-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmultisig.proto
41 lines (33 loc) · 1.15 KB
/
multisig.proto
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
32
33
34
35
36
37
38
39
40
41
syntax = "proto3";
option go_package = "tofnd;tofnd";
package tofnd;
import "common.proto"; // import key presence request/response
service Multisig {
rpc KeyPresence(KeyPresenceRequest) returns (KeyPresenceResponse);
rpc Keygen(KeygenRequest) returns (KeygenResponse);
rpc Sign(SignRequest) returns (SignResponse);
}
message KeygenRequest {
string key_uid = 1;
string party_uid = 2; // used only for logging
Algorithm algorithm = 3;
}
message KeygenResponse {
oneof keygen_response {
bytes pub_key = 1; // SEC1-encoded compressed curve point
string error = 2; // reply with an error message if keygen fails
}
}
message SignRequest {
string key_uid = 1;
bytes msg_to_sign = 2; // 32-byte pre-hashed message digest
string party_uid = 3; // used only for logging
bytes pub_key = 4; // SEC1-encoded compressed pub key bytes to find the right mnemonic. Latest is used, if empty.
Algorithm algorithm = 5;
}
message SignResponse {
oneof sign_response {
bytes signature = 1; // ASN.1 DER-encoded ECDSA signature
string error = 2; // reply with an error message if sign fails
}
}