summaryrefslogtreecommitdiff
path: root/src/ref/constants.h
blob: 6f17b40bdefd930cdf557e582fec53b92e88dd3a (plain)
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
/*
Implementation of the Lilliput-AE tweakable block cipher.

Author: Kévin Le Gouguec, 2019.

For more information, feedback or questions, refer to our website:
https://paclido.fr/lilliput-ae

To the extent possible under law, the implementer has waived all copyright
and related or neighboring rights to the source code in this file.
http://creativecommons.org/publicdomain/zero/1.0/

---

This file provides bit and byte lengths for input and output parameters.
*/

#ifndef CONSTANTS_H
#define CONSTANTS_H

#include "parameters.h"

#define TWEAKEY_LENGTH_BITS       (TWEAK_LENGTH_BITS+KEY_LENGTH_BITS)
#define ROUND_TWEAKEY_LENGTH_BITS 64
#define BLOCK_LENGTH_BITS         128
#define NONCE_LENGTH_BITS         120
#define TAG_LENGTH_BITS           128

#define TWEAK_BYTES         (TWEAK_LENGTH_BITS/8)
#define KEY_BYTES           (KEY_LENGTH_BITS/8)
#define TWEAKEY_BYTES       (TWEAKEY_LENGTH_BITS/8)
#define ROUND_TWEAKEY_BYTES (ROUND_TWEAKEY_LENGTH_BITS/8)
#define BLOCK_BYTES         (BLOCK_LENGTH_BITS/8)
#define NONCE_BYTES         (NONCE_LENGTH_BITS/8)
#define TAG_BYTES           (TAG_LENGTH_BITS/8)

#endif /* CONSTANTS_H */