Botan 3.6.1
Crypto and TLS for C&
frodo_types.h
Go to the documentation of this file.
1/*
2 * FrodoKEM modes and constants
3 *
4 * The Fellowship of the FrodoKEM:
5 * (C) 2023 Jack Lloyd
6 * 2023 René Meusel, Amos Treiber - Rohde & Schwarz Cybersecurity
7 *
8 * Botan is released under the Simplified BSD License (see license.txt)
9 */
10
11#ifndef BOTAN_FRODOKEM_TYPES_H_
12#define BOTAN_FRODOKEM_TYPES_H_
13
14#include <botan/secmem.h>
15#include <botan/strong_type.h>
16
17#include <array>
18#include <vector>
19
20namespace Botan {
21
22// Bytes of seed_a
23using FrodoSeedA = Strong<std::vector<uint8_t>, struct FrodoSeedA_>;
24
25// Bytes of s
26using FrodoSeedS = Strong<secure_vector<uint8_t>, struct FrodoSeedS_>;
27
28// Bytes of seed_se
29using FrodoSeedSE = Strong<secure_vector<uint8_t>, struct FrodoSeedSE_>;
30
31// Bytes of z
32using FrodoSeedZ = Strong<std::vector<uint8_t>, struct FrodoSeedZ_>;
33
34// Bytes of an r^(i)
35using FrodoSampleR = Strong<secure_vector<uint8_t>, struct FrodoSampleR_>;
36
37// Bytes of pkh
38using FrodoPublicKeyHash = Strong<std::vector<uint8_t>, struct FrodoPublicKeyHash_>;
39
40// Bytes of a packed Matrix
41using FrodoPackedMatrix = Strong<std::vector<uint8_t>, struct FrodoPackedMatrix_>;
42
43// Bytes of a serialized Matrix
44using FrodoSerializedMatrix = Strong<secure_vector<uint8_t>, struct FrodoSerializedMatrix_>;
45
46// Constant byte 0x5F/0x96 given to SHAKE for domain separation
47using FrodoDomainSeparator = Strong<std::array<uint8_t, 1>, struct FrodoDoaminSeparator_>;
48
49// Bytes of u/u'
50using FrodoPlaintext = Strong<secure_vector<uint8_t>, struct FrodoPlaintext_>;
51
52// Bytes of salt
53using FrodoSalt = Strong<std::vector<uint8_t>, struct FrodoSalt_>;
54
55// Bytes of k/k' aka intermediate shared secret in FO transform
56using FrodoIntermediateSharedSecret = Strong<secure_vector<uint8_t>, struct FrodoIntermediateSharedSecret_>;
57
58} // namespace Botan
59
60#endif