-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathnotes2
66 lines (49 loc) · 1.29 KB
/
notes2
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//pubkey, seckey
//type XYZ struct {
// X, Y, Z Field
// Infinity bool
//}
/*
type XYZ struct {
X, Y, Z Field
Infinity bool
}
func (r *XYZ) SetXY(a *XY) {
func (a *XYZ) IsValid() bool {
// r = a*G
func ECmultGen(r *XYZ, a *Number) {
*/
/*
type XY struct {
X, Y Field
Infinity bool
}
//func (elem *XY) ParsePubkey(pub []byte) bool {
//func (pub *XY) Bytes(compressed bool) (raw []byte) {
//type XY struct {
//func (a *XY) IsValid() bool {
//func (pk *XY) GetPublicKey(out []byte) {
*/
/*
type Signature struct {
R, S Number
}
func (r *Signature) ParseBytes(sig []byte) int {
func (r *Signature) Verify(pubkey *XY, message *Number) (ret bool) {
func (sig *Signature) Sign(seckey, message, nonce *Number, recid *int) int {
func (sig *Signature) Bytes() []byte {
*/
/*
ec.go
func Verify(k, s, m []byte) bool {
func DecompressPoint(X []byte, off bool, Y []byte) {
func RecoverPublicKey(r, s, h []byte, recid int, pubkey *XY) bool {
// Standard EC multiplacation k(xy)
// xy - is the standarized public key format (33 or 65 bytes long)
// out - should be the buffer for 33 bytes (1st byte will be set to either 02 or 03)
func Multiply(xy, k, out []byte) bool {
// Multiply k by G
// out - should be the buffer for 33 bytes (1st byte will be set to either 02 or 03)
func BaseMultiply(k, out []byte) bool {
==
*/