-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathlibcrux_mlkem1024_avx2.h
More file actions
65 lines (53 loc) · 1.73 KB
/
Copy pathlibcrux_mlkem1024_avx2.h
File metadata and controls
65 lines (53 loc) · 1.73 KB
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
/*
* SPDX-FileCopyrightText: 2024 Cryspen Sarl <info@cryspen.com>
*
* SPDX-License-Identifier: MIT or Apache-2.0
*
* This code was generated with the following revisions:
* Charon: 962f26311ccdf09a6a3cfeacbccafba22bf3d405
* Eurydice: e66abbc2119485abfafa17c1911bdbdada5b04f3
* Karamel: 7862fdc3899b718d39ec98568f78ec40592a622a
* F*: a32b316e521fa4f239b610ec8f1d15e78d62cbe8-dirty
* Libcrux: a1a608ad503a9e3f8f017e9c2082ccf929194c41
*/
#ifndef __libcrux_mlkem1024_avx2_H
#define __libcrux_mlkem1024_avx2_H
#if defined(__cplusplus)
extern "C" {
#endif
#include "eurydice_glue.h"
#include "libcrux_core.h"
/**
Decapsulate ML-KEM 1024
Generates an [`MlKemSharedSecret`].
The input is a reference to an [`MlKem1024PrivateKey`] and an
[`MlKem1024Ciphertext`].
*/
void libcrux_ml_kem_mlkem1024_avx2_decapsulate(
libcrux_ml_kem_types_MlKemPrivateKey_95 *private_key,
libcrux_ml_kem_mlkem1024_MlKem1024Ciphertext *ciphertext, uint8_t ret[32U]);
/**
Encapsulate ML-KEM 1024
Generates an ([`MlKem1024Ciphertext`], [`MlKemSharedSecret`]) tuple.
The input is a reference to an [`MlKem1024PublicKey`] and
[`SHARED_SECRET_SIZE`] bytes of `randomness`.
*/
tuple_21 libcrux_ml_kem_mlkem1024_avx2_encapsulate(
libcrux_ml_kem_types_MlKemPublicKey_1f *public_key,
uint8_t randomness[32U]);
/**
Generate ML-KEM 1024 Key Pair
*/
libcrux_ml_kem_mlkem1024_MlKem1024KeyPair
libcrux_ml_kem_mlkem1024_avx2_generate_key_pair(uint8_t randomness[64U]);
/**
Validate a public key.
Returns `Some(public_key)` if valid, and `None` otherwise.
*/
core_option_Option_99 libcrux_ml_kem_mlkem1024_avx2_validate_public_key(
libcrux_ml_kem_types_MlKemPublicKey_1f public_key);
#if defined(__cplusplus)
}
#endif
#define __libcrux_mlkem1024_avx2_H_DEFINED
#endif