-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathoverview.txt
320 lines (264 loc) · 7.99 KB
/
overview.txt
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
* API overview *
---------------------- Module: [wasi_ephemeral_crypto_symmetric] ----------------------
enum crypto_errno: (tag: u16)
- `success`: crypto_errno
- `guest_error`: crypto_errno
- `not_implemented`: crypto_errno
- `unsupported_feature`: crypto_errno
- `prohibited_operation`: crypto_errno
- `unsupported_encoding`: crypto_errno
- `unsupported_algorithm`: crypto_errno
- `unsupported_option`: crypto_errno
- `invalid_key`: crypto_errno
- `invalid_length`: crypto_errno
- `verification_failed`: crypto_errno
- `rng_error`: crypto_errno
- `algorithm_failure`: crypto_errno
- `invalid_signature`: crypto_errno
- `closed`: crypto_errno
- `invalid_handle`: crypto_errno
- `overflow`: crypto_errno
- `internal_error`: crypto_errno
- `too_many_handles`: crypto_errno
- `key_not_supported`: crypto_errno
- `key_required`: crypto_errno
- `invalid_tag`: crypto_errno
- `invalid_operation`: crypto_errno
- `nonce_required`: crypto_errno
- `invalid_nonce`: crypto_errno
- `option_not_set`: crypto_errno
- `not_found`: crypto_errno
- `parameters_missing`: crypto_errno
- `in_progress`: crypto_errno
- `incompatible_keys`: crypto_errno
- `expired`: crypto_errno
enum keypair_encoding: (tag: u16)
- `raw`: keypair_encoding
- `pkcs8`: keypair_encoding
- `pem`: keypair_encoding
- `local`: keypair_encoding
enum publickey_encoding: (tag: u16)
- `raw`: publickey_encoding
- `pkcs8`: publickey_encoding
- `pem`: publickey_encoding
- `sec`: publickey_encoding
- `compressed_sec`: publickey_encoding
- `local`: publickey_encoding
enum secretkey_encoding: (tag: u16)
- `raw`: secretkey_encoding
- `pkcs8`: secretkey_encoding
- `pem`: secretkey_encoding
- `sec`: secretkey_encoding
- `compressed_sec`: secretkey_encoding
- `local`: secretkey_encoding
enum signature_encoding: (tag: u16)
- `raw`: signature_encoding
- `der`: signature_encoding
enum algorithm_type: (tag: u16)
- `signatures`: algorithm_type
- `symmetric`: algorithm_type
- `key_exchange`: algorithm_type
alias version = u64
alias size = usize
alias timestamp = u64
alias u64 = u64
alias array_output = handle
alias options = handle
alias secrets_manager = handle
alias keypair = handle
alias signature_state = handle
alias signature = handle
alias publickey = handle
alias secretkey = handle
alias signature_verification_state = handle
alias symmetric_state = handle
alias symmetric_key = handle
alias symmetric_tag = handle
enum opt_options_u: (tag: u8)
- `some`: opt_options_u
- `none`: opt_options_u
union opt_options: (tag: u8)
- `some`: options
- `none`: (empty)
enum opt_symmetric_key_u: (tag: u8)
- `some`: opt_symmetric_key_u
- `none`: opt_symmetric_key_u
union opt_symmetric_key: (tag: u8)
- `some`: symmetric_key
- `none`: (empty)
function symmetric_key_generate(): crypto_errno
- Input:
- `algorithm`: string
- `options`: opt_options
- Output:
- mut_ptr<symmetric_key>
function symmetric_key_import(): crypto_errno
- Input:
- `algorithm`: string
- `raw`: ptr<u8>
- `raw_len`: size
- Output:
- mut_ptr<symmetric_key>
function symmetric_key_export(): crypto_errno
- Input:
- `symmetric_key`: symmetric_key
- Output:
- mut_ptr<array_output>
function symmetric_key_close(): crypto_errno
- Input:
- `symmetric_key`: symmetric_key
- No output
function symmetric_key_generate_managed(): crypto_errno
- Input:
- `secrets_manager`: secrets_manager
- `algorithm`: string
- `options`: opt_options
- Output:
- mut_ptr<symmetric_key>
function symmetric_key_store_managed(): crypto_errno
- Input:
- `secrets_manager`: secrets_manager
- `symmetric_key`: symmetric_key
- `symmetric_key_id`: mut_ptr<u8>
- `symmetric_key_id_max_len`: size
- No output
function symmetric_key_replace_managed(): crypto_errno
- Input:
- `secrets_manager`: secrets_manager
- `symmetric_key_old`: symmetric_key
- `symmetric_key_new`: symmetric_key
- Output:
- mut_ptr<version>
function symmetric_key_id(): crypto_errno
- Input:
- `symmetric_key`: symmetric_key
- `symmetric_key_id`: mut_ptr<u8>
- `symmetric_key_id_max_len`: size
- Output:
- mut_ptr<size>
- mut_ptr<version>
function symmetric_key_from_id(): crypto_errno
- Input:
- `secrets_manager`: secrets_manager
- `symmetric_key_id`: ptr<u8>
- `symmetric_key_id_len`: size
- `symmetric_key_version`: version
- Output:
- mut_ptr<symmetric_key>
function symmetric_state_open(): crypto_errno
- Input:
- `algorithm`: string
- `key`: opt_symmetric_key
- `options`: opt_options
- Output:
- mut_ptr<symmetric_state>
function symmetric_state_options_get(): crypto_errno
- Input:
- `handle`: symmetric_state
- `name`: string
- `value`: mut_ptr<u8>
- `value_max_len`: size
- Output:
- mut_ptr<size>
function symmetric_state_options_get_u64(): crypto_errno
- Input:
- `handle`: symmetric_state
- `name`: string
- Output:
- mut_ptr<u64>
function symmetric_state_close(): crypto_errno
- Input:
- `handle`: symmetric_state
- No output
function symmetric_state_absorb(): crypto_errno
- Input:
- `handle`: symmetric_state
- `data`: ptr<u8>
- `data_len`: size
- No output
function symmetric_state_squeeze(): crypto_errno
- Input:
- `handle`: symmetric_state
- `out`: mut_ptr<u8>
- `out_len`: size
- No output
function symmetric_state_squeeze_tag(): crypto_errno
- Input:
- `handle`: symmetric_state
- Output:
- mut_ptr<symmetric_tag>
function symmetric_state_squeeze_key(): crypto_errno
- Input:
- `handle`: symmetric_state
- `alg_str`: string
- Output:
- mut_ptr<symmetric_key>
function symmetric_state_max_tag_len(): crypto_errno
- Input:
- `handle`: symmetric_state
- Output:
- mut_ptr<size>
function symmetric_state_encrypt(): crypto_errno
- Input:
- `handle`: symmetric_state
- `out`: mut_ptr<u8>
- `out_len`: size
- `data`: ptr<u8>
- `data_len`: size
- Output:
- mut_ptr<size>
function symmetric_state_encrypt_detached(): crypto_errno
- Input:
- `handle`: symmetric_state
- `out`: mut_ptr<u8>
- `out_len`: size
- `data`: ptr<u8>
- `data_len`: size
- Output:
- mut_ptr<symmetric_tag>
function symmetric_state_decrypt(): crypto_errno
- Input:
- `handle`: symmetric_state
- `out`: mut_ptr<u8>
- `out_len`: size
- `data`: ptr<u8>
- `data_len`: size
- Output:
- mut_ptr<size>
function symmetric_state_decrypt_detached(): crypto_errno
- Input:
- `handle`: symmetric_state
- `out`: mut_ptr<u8>
- `out_len`: size
- `data`: ptr<u8>
- `data_len`: size
- `raw_tag`: ptr<u8>
- `raw_tag_len`: size
- Output:
- mut_ptr<size>
function symmetric_state_ratchet(): crypto_errno
- Input:
- `handle`: symmetric_state
- No output
function symmetric_tag_len(): crypto_errno
- Input:
- `symmetric_tag`: symmetric_tag
- Output:
- mut_ptr<size>
function symmetric_tag_pull(): crypto_errno
- Input:
- `symmetric_tag`: symmetric_tag
- `buf`: mut_ptr<u8>
- `buf_len`: size
- Output:
- mut_ptr<size>
function symmetric_tag_verify(): crypto_errno
- Input:
- `symmetric_tag`: symmetric_tag
- `expected_raw_tag_ptr`: ptr<u8>
- `expected_raw_tag_len`: size
- No output
function symmetric_tag_close(): crypto_errno
- Input:
- `symmetric_tag`: symmetric_tag
- No output