digestpp 1.0
C++11 header-only message digest library
Loading...
Searching...
No Matches
ascon_constants.hpp
Go to the documentation of this file.
1/*
2This code is written by kerukuro and released into public domain.
3*/
4
5#ifndef DIGESTPP_PROVIDERS_ASCON_CONSTANTS_HPP
6#define DIGESTPP_PROVIDERS_ASCON_CONSTANTS_HPP
7
8namespace digestpp
9{
10
11namespace detail
12{
13
14template<typename T>
16{
17 const static uint64_t RC[12];
18 const static uint64_t IVHASH[5];
19 const static uint64_t IVXOF[5];
20 const static uint64_t IVCXOF[5];
21};
22
23template<typename T>
24const uint64_t ascon_constants<T>::RC[12] = {
25 0x00000000000000f0ull, 0x00000000000000e1ull, 0x00000000000000d2ull, 0x00000000000000c3ull,
26 0x00000000000000b4ull, 0x00000000000000a5ull, 0x0000000000000096ull, 0x0000000000000087ull,
27 0x0000000000000078ull, 0x0000000000000069ull, 0x000000000000005aull, 0x000000000000004bull
28};
29
30template<typename T>
31const uint64_t ascon_constants<T>::IVHASH[5] = {
32 0x9b1e5494e934d681ull, 0x4bc3a01e333751d2ull, 0xae65396c6b34b81aull, 0x3c7fd4a4d56a4db3ull,
33 0x1a5c464906c5976dull
34};
35
36template<typename T>
37const uint64_t ascon_constants<T>::IVXOF[5] = {
38 0xda82ce768d9447ebull, 0xcc7ce6c75f1ef969ull, 0xe7508fd780085631ull, 0x0ee0ea53416b58ccull,
39 0xe0547524db6f0bdeull
40};
41
42template<typename T>
43const uint64_t ascon_constants<T>::IVCXOF[5] = {
44 0x675527c2a0e8de03ull, 0x43d12d7dc0377bbcull, 0xe9901dec426e81b5ull, 0x2ab14907720780b6ull,
45 0x8f3f1d02d432bc46ull
46};
47
48enum class ascon_type
49{
50 hash,
51 xof,
52 cxof
53};
54
55} // namespace detail
56
57} // namespace digestpp
58
59#endif // DIGESTPP_PROVIDERS_ASCON_CONSTANTS_HPP
ascon_type
Definition ascon_constants.hpp:49
digestpp namespace
Definition ascon.hpp:14
Definition ascon_constants.hpp:16
static const uint64_t IVCXOF[5]
Definition ascon_constants.hpp:20
static const uint64_t RC[12]
Definition ascon_constants.hpp:17
static const uint64_t IVXOF[5]
Definition ascon_constants.hpp:19
static const uint64_t IVHASH[5]
Definition ascon_constants.hpp:18