From ff54e8b4a758d35f4a1d4e0b0303092e7d96da0e Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Tue, 5 Feb 2019 08:44:52 +0100 Subject: Renommage des entêtes de constantes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Aucune idée de pourquoi j'avais insisté pour nommer les deux "parameters" plutôt que de distinguer les constantes des paramètres. Peut-être par souci de compatibilité avec FELICS, qui utilise constants.h. 🤷 --- src/ref/constants.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/ref/constants.h (limited to 'src/ref/constants.h') diff --git a/src/ref/constants.h b/src/ref/constants.h new file mode 100644 index 0000000..063c8af --- /dev/null +++ b/src/ref/constants.h @@ -0,0 +1,20 @@ +#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 */ -- cgit v1.2.3