@@ -10,17 +10,10 @@ class SecretKey:
10
10
def public_key (self ) -> PublicKey :
11
11
...
12
12
13
- def to_secret_bytes (self ) -> bytes :
14
- ...
15
-
16
13
@staticmethod
17
14
def from_bytes (data : bytes ) -> SecretKey :
18
15
...
19
16
20
- @staticmethod
21
- def serialized_size () -> int :
22
- ...
23
-
24
17
25
18
class SecretKeyFactory :
26
19
@@ -36,35 +29,27 @@ class SecretKeyFactory:
36
29
def from_secure_randomness (seed : bytes ) -> SecretKeyFactory :
37
30
...
38
31
39
- def make_key (self , label : bytes ) -> SecretKey :
32
+ def make_secret (self , label : bytes ) -> bytes :
40
33
...
41
34
42
- def make_factory (self , label : bytes ) -> SecretKeyFactory :
43
- ...
44
-
45
- def to_secret_bytes (self ) -> bytes :
35
+ def make_key (self , label : bytes ) -> SecretKey :
46
36
...
47
37
48
- @staticmethod
49
- def from_bytes (data : bytes ) -> SecretKeyFactory :
38
+ def make_factory (self , label : bytes ) -> SecretKeyFactory :
50
39
...
51
40
52
41
@staticmethod
53
- def serialized_size ( ) -> int :
42
+ def from_secure_randomness ( data : bytes ) -> SecretKeyFactory :
54
43
...
55
44
56
45
57
46
class PublicKey :
58
47
59
48
@staticmethod
60
- def from_bytes (data : bytes ) -> PublicKey :
61
- ...
62
-
63
- def __bytes__ (self ) -> bytes :
49
+ def from_compressed_bytes (data : bytes ) -> PublicKey :
64
50
...
65
51
66
- @staticmethod
67
- def serialized_size () -> int :
52
+ def to_compressed_bytes (self ) -> bytes :
68
53
...
69
54
70
55
@@ -86,23 +71,15 @@ class Signature:
86
71
...
87
72
88
73
@staticmethod
89
- def from_bytes (data : bytes ) -> Signature :
74
+ def from_der_bytes (data : bytes ) -> Signature :
90
75
...
91
76
92
- def __bytes__ (self ) -> bytes :
93
- ...
94
-
95
- @staticmethod
96
- def serialized_size () -> int :
77
+ def to_der_bytes (self ) -> bytes :
97
78
...
98
79
99
80
100
81
class Capsule :
101
82
102
- @staticmethod
103
- def serialized_size () -> int :
104
- ...
105
-
106
83
@staticmethod
107
84
def from_bytes (data : bytes ) -> Capsule :
108
85
...
@@ -139,26 +116,15 @@ class KeyFrag:
139
116
def __bytes__ (self ) -> bytes :
140
117
...
141
118
142
- @staticmethod
143
- def serialized_size () -> int :
144
- ...
145
-
146
119
147
120
class VerifiedKeyFrag :
148
121
149
- def from_verified_bytes (self , data : bytes ) -> VerifiedKeyFrag :
150
- ...
151
-
152
122
def __bytes__ (self ) -> bytes :
153
123
...
154
124
155
125
def unverify (self ) -> KeyFrag :
156
126
...
157
127
158
- @staticmethod
159
- def serialized_size () -> int :
160
- ...
161
-
162
128
163
129
def generate_kfrags (
164
130
delegating_sk : SecretKey ,
@@ -193,27 +159,15 @@ class CapsuleFrag:
193
159
def __bytes__ (self ) -> bytes :
194
160
...
195
161
196
- @staticmethod
197
- def serialized_size () -> int :
198
- ...
199
-
200
162
201
163
class VerifiedCapsuleFrag :
202
164
203
- @staticmethod
204
- def from_verified_bytes (data : bytes ) -> VerifiedCapsuleFrag :
205
- ...
206
-
207
165
def __bytes__ (self ) -> bytes :
208
166
...
209
167
210
168
def unverify (self ) -> CapsuleFrag :
211
169
...
212
170
213
- @staticmethod
214
- def serialized_size () -> int :
215
- ...
216
-
217
171
218
172
def reencrypt (capsule : Capsule , kfrag : VerifiedKeyFrag ) -> VerifiedCapsuleFrag :
219
173
...
0 commit comments