From 833b24eb5dffcfb675aabbefd2435ed6f6b72bfe Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Tue, 5 Feb 2019 08:21:47 +0100 Subject: Mise en commun des sources à l'aide de liens symboliques MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/add_tweakeyloop/lilliput-ae-i.c | 196 +----------------------------------- 1 file changed, 1 insertion(+), 195 deletions(-) mode change 100644 => 120000 src/add_tweakeyloop/lilliput-ae-i.c (limited to 'src/add_tweakeyloop/lilliput-ae-i.c') diff --git a/src/add_tweakeyloop/lilliput-ae-i.c b/src/add_tweakeyloop/lilliput-ae-i.c deleted file mode 100644 index b1758c9..0000000 --- a/src/add_tweakeyloop/lilliput-ae-i.c +++ /dev/null @@ -1,195 +0,0 @@ -#include -#include -#include - -#include "ae-common.h" -#include "cipher.h" -#include "lilliput-ae.h" - - -static const uint8_t _0n[BLOCK_BYTES] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - - -static void _fill_msg_tweak( - uint8_t prefix, - const uint8_t N[NONCE_BYTES], - uint64_t block_nb, - uint8_t tweak[TWEAK_BYTES] -) -{ - /* The 192-bit tweak is filled as follows: - * - * - bits 1- 68: block number - * 1- 64: actual 64-bit block number - * 64- 68: 0-padding - * - bits 67-188: nonce - * - bits 189-192: constant 4-bit prefix - */ - - for (size_t i=0; i> 8*i; - - tweak[i] = b; - } - - tweak[sizeof(block_nb)] = lower_nibble(N[0]) << 4; - - for (size_t i=1; i