/
yk_keypair.go
79 lines (62 loc) · 1.74 KB
/
yk_keypair.go
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
67
68
69
70
71
72
73
74
75
76
77
78
79
package yubiks
import (
"crypto"
"crypto/ecdsa"
"github.com/bukodi/go-keystores"
"io"
)
// Check whether implements the keystores.KeyPair interface
var _ keystores.KeyPair = &YkKeyPair{}
type YkKeyPair struct {
keySore *YkKeyStore
slot int
pubKey crypto.PublicKey
id keystores.KeyPairId
keyAlgorithm keystores.KeyAlgorithm
label string
keyUsage map[keystores.KeyUsage]bool
}
func (kp YkKeyPair) Id() keystores.KeyPairId {
panic("implement me")
}
func (kp YkKeyPair) Label() string {
panic("implement me")
}
func (kp YkKeyPair) Algorithm() keystores.KeyAlgorithm {
panic("implement me")
}
func (kp YkKeyPair) KeyUsage() map[keystores.KeyUsage]bool {
panic("implement me")
}
func (kp YkKeyPair) KeyStore() keystores.KeyStore {
panic("implement me")
}
func (kp YkKeyPair) Public() crypto.PublicKey {
panic("implement me")
}
func (kp YkKeyPair) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) {
panic("implement me")
}
func (kp YkKeyPair) Decrypt(rand io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) {
panic("implement me")
}
func (kp YkKeyPair) ECDH(remote *ecdsa.PublicKey) ([]byte, error) {
panic("implement me")
}
func (kp YkKeyPair) ExportPrivate() (privKey crypto.PrivateKey, err error) {
panic("implement me")
}
func (kp YkKeyPair) Destroy() error {
panic("implement me")
}
func (kp YkKeyPair) Verify(signature []byte, digest []byte, opts crypto.SignerOpts) (err error) {
panic("implement me")
}
func (kp YkKeyPair) SetLabel(label string) error {
//TODO implement me
panic("implement me")
}
func (kp YkKeyPair) Attestation(nonce []byte) (att keystores.Attestation, err error) {
//TODO implement me
panic("implement me")
}