xref: /openbmc/qemu/include/crypto/clmul.h (revision 07f348d7)
1 /*
2  * Carry-less multiply operations.
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  *
5  * Copyright (C) 2023 Linaro, Ltd.
6  */
7 
8 #ifndef CRYPTO_CLMUL_H
9 #define CRYPTO_CLMUL_H
10 
11 /**
12  * clmul_8x8_low:
13  *
14  * Perform eight 8x8->8 carry-less multiplies.
15  */
16 uint64_t clmul_8x8_low(uint64_t, uint64_t);
17 
18 /**
19  * clmul_8x4_even:
20  *
21  * Perform four 8x8->16 carry-less multiplies.
22  * The odd bytes of the inputs are ignored.
23  */
24 uint64_t clmul_8x4_even(uint64_t, uint64_t);
25 
26 /**
27  * clmul_8x4_odd:
28  *
29  * Perform four 8x8->16 carry-less multiplies.
30  * The even bytes of the inputs are ignored.
31  */
32 uint64_t clmul_8x4_odd(uint64_t, uint64_t);
33 
34 /**
35  * clmul_8x4_packed:
36  *
37  * Perform four 8x8->16 carry-less multiplies.
38  */
39 uint64_t clmul_8x4_packed(uint32_t, uint32_t);
40 
41 #endif /* CRYPTO_CLMUL_H */
42