From 54ee7f6f31bfe0c751c322134a7c3c5d69969e3f Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Thu, 4 Jul 2019 14:30:14 +0200 Subject: Résumé des modifications dans l'implémentation de référence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.txt | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'CHANGELOG.txt') diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d836ba6..e983aed 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,7 +1,39 @@ v1.1 ==== -TODO +ref +--- + +### Fixes + +These modifications change the algorithm's output. + +- Change alpha coefficients in tweakey schedule to ensure lane 0 is updated between each round: + - lane 0: Id => M + - lane 1: M => M^2 + - lane 2: M^2 => M^3 + - lane 3: M^3 => M^4 + - lane 4: M_R (unchanged) + - lane 5: M_R^2 (unchanged) + - lane 6: M_R^3 (unchanged) + (multiplications.h, tweakey.c) + +### Cleanups + +These modifications are structural and/or stylistic and do not change the algorithm's ouptut. + +- Introduce helper function copy_block_index() to make tweak-building functions more legible. + (lilliput-ae-utils.h, lilliput-i.c, lilliput-ii.c) + +- Initialize ΘCB3 tweak with nonce instead of copying the latter into the latter repeatedly. + (lilliput-i.c) + +- Re-write _nonlinear_layer() and _linear_layer() functions to better resemble the specification. + (cipher.c) + +- Extract tweakey multiplications into their own header file, so that other implementations can make more targeted changes. + (constants.h, multiplications.h, tweakey.c) + v1.0 ==== -- cgit v1.2.3 From 893678ca67e8d8503d5a67190b770f13918522e5 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Thu, 4 Jul 2019 14:33:55 +0200 Subject: Ajout de squelettes pour les changelogs des autres implémentations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'CHANGELOG.txt') diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e983aed..9ab7d75 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -34,6 +34,26 @@ These modifications are structural and/or stylistic and do not change the algori - Extract tweakey multiplications into their own header file, so that other implementations can make more targeted changes. (constants.h, multiplications.h, tweakey.c) +add_threshold +------------- + +TODO + +add_tweakeyloop +--------------- + +TODO + +add_python +---------- + +TODO + +add_vhdl +-------- + +TODO + v1.0 ==== -- cgit v1.2.3 From 649073fb97cb11e4c1057ad25d8b816575fb85c2 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Thu, 4 Jul 2019 15:05:41 +0200 Subject: Résumé des modifications dans les implémentations C et Python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.txt | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'CHANGELOG.txt') diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9ab7d75..cc38a27 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -37,17 +37,36 @@ These modifications are structural and/or stylistic and do not change the algori add_threshold ------------- -TODO +### Fixes + +See reference implementation. + +### Cleanups + +See reference implementation. Further cleanups: + +- Use size_t to iterate on arrays in lilliput_tbc_encrypt() and lilliput_tbc_decrypt(). + (cipher.c) + +- Add constant macros KEY_LANES_NB and TWEAK_LANES_NB to make tweakey schedule code more legible. + (tweakey.c) add_tweakeyloop --------------- -TODO +See reference implementation. add_python ---------- -TODO +### Fixes + +See reference implementation. + +### Cleanups + +- Re-write tweakey multiplications to better resemble the specification. + (multiplications.py) add_vhdl -------- -- cgit v1.2.3 From 5fdd2fd67a68d43830300c3ddf4440478ff73cfd Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Fri, 5 Jul 2019 09:48:32 +0200 Subject: Utilisation de "size_t" pour l'indexation d'un tableau MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cf. db83bae, surtout par souci d'homogénéité. --- CHANGELOG.txt | 6 +++--- src/add_felicsref/cipher.c | 4 ++-- src/ref/cipher.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'CHANGELOG.txt') diff --git a/CHANGELOG.txt b/CHANGELOG.txt index cc38a27..eb074ad 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -34,6 +34,9 @@ These modifications are structural and/or stylistic and do not change the algori - Extract tweakey multiplications into their own header file, so that other implementations can make more targeted changes. (constants.h, multiplications.h, tweakey.c) +- Use size_t to iterate on arrays in lilliput_tbc_encrypt() and lilliput_tbc_decrypt(). + (cipher.c) + add_threshold ------------- @@ -45,9 +48,6 @@ See reference implementation. See reference implementation. Further cleanups: -- Use size_t to iterate on arrays in lilliput_tbc_encrypt() and lilliput_tbc_decrypt(). - (cipher.c) - - Add constant macros KEY_LANES_NB and TWEAK_LANES_NB to make tweakey schedule code more legible. (tweakey.c) diff --git a/src/add_felicsref/cipher.c b/src/add_felicsref/cipher.c index 7de0a08..59bc5d8 100644 --- a/src/add_felicsref/cipher.c +++ b/src/add_felicsref/cipher.c @@ -150,7 +150,7 @@ void lilliput_tbc_encrypt( uint8_t RTK[ROUND_TWEAKEY_BYTES]; tweakey_state_init(TK, key, tweak); - for (unsigned i=0; i Date: Fri, 5 Jul 2019 10:12:03 +0200 Subject: Simplification du format du changelog --- CHANGELOG.txt | 51 +++++++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 30 deletions(-) (limited to 'CHANGELOG.txt') diff --git a/CHANGELOG.txt b/CHANGELOG.txt index eb074ad..f793279 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,26 +1,16 @@ -v1.1 -==== - -ref ---- +This document summarizes the modifications brought by each version. Some modifications are tagged as follows: -### Fixes +- [spec] when the modification is brought by a new revision of the specification, +- [break] when the modification changes the implementation's output. -These modifications change the algorithm's output. +A modification that has no tag corresponds to stylistic and/or structural changes that have no impact on test vectors. -- Change alpha coefficients in tweakey schedule to ensure lane 0 is updated between each round: - - lane 0: Id => M - - lane 1: M => M^2 - - lane 2: M^2 => M^3 - - lane 3: M^3 => M^4 - - lane 4: M_R (unchanged) - - lane 5: M_R^2 (unchanged) - - lane 6: M_R^3 (unchanged) - (multiplications.h, tweakey.c) -### Cleanups +v1.1 +==== -These modifications are structural and/or stylistic and do not change the algorithm's ouptut. +ref +--- - Introduce helper function copy_block_index() to make tweak-building functions more legible. (lilliput-ae-utils.h, lilliput-i.c, lilliput-ii.c) @@ -37,16 +27,21 @@ These modifications are structural and/or stylistic and do not change the algori - Use size_t to iterate on arrays in lilliput_tbc_encrypt() and lilliput_tbc_decrypt(). (cipher.c) +[spec][break] +- Change alpha coefficients in tweakey schedule to ensure lane 0 is updated between each round: + - lane 0: Id => M + - lane 1: M => M^2 + - lane 2: M^2 => M^3 + - lane 3: M^3 => M^4 + - lane 4: M_R (unchanged) + - lane 5: M_R^2 (unchanged) + - lane 6: M_R^3 (unchanged) + (multiplications.h, tweakey.c) + add_threshold ------------- -### Fixes - -See reference implementation. - -### Cleanups - -See reference implementation. Further cleanups: +See reference implementation. Further changes: - Add constant macros KEY_LANES_NB and TWEAK_LANES_NB to make tweakey schedule code more legible. (tweakey.c) @@ -59,11 +54,7 @@ See reference implementation. add_python ---------- -### Fixes - -See reference implementation. - -### Cleanups +See [spec] and [break] changes in reference implementation. Further changes: - Re-write tweakey multiplications to better resemble the specification. (multiplications.py) -- cgit v1.2.3 From c77e2ddc9b9c1dbab7513084d597a238b9b498dd Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Fri, 5 Jul 2019 10:17:26 +0200 Subject: Résumé des modifications sur felicsref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'CHANGELOG.txt') diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f793279..3a6348e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -38,6 +38,17 @@ ref - lane 6: M_R^3 (unchanged) (multiplications.h, tweakey.c) +add_felicsref +------------- + +See reference implementation. Further changes: + +- Introduce helper function _multiply() to reduce code duplication. + (tweakey.c) + +- Compute round-tweakeys on the fly to save on RAM, instead of storing all pre-computed round-tweakeys. + (cipher.c) + add_threshold ------------- -- cgit v1.2.3 From 904b99b495a419fefc666e489c31893f86d5080e Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Fri, 5 Jul 2019 11:07:41 +0200 Subject: Renommage de la version initiale en "v1" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Une traduction automatique de la version en nom de dossier crypto_aead transformerait v1.0 en v10, or 1. nos dossiers s'appelaient v1 2. un jour on aura peut-être une version 10 (Le schéma de nommage crypto_aead ouvre la porte a pas mal d'ambiguïtés, de toute façon…) --- CHANGELOG.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CHANGELOG.txt') diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3a6348e..5a15c61 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -76,7 +76,7 @@ add_vhdl TODO -v1.0 -==== +v1 +== Initial release to round 1 of the LWC standardization process. -- cgit v1.2.3 From da895e90ec0db658ce9ebbfe60591c7e88f9d6a3 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Fri, 5 Jul 2019 11:06:43 +0200 Subject: Ajout d'une explication dans le changelog --- CHANGELOG.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'CHANGELOG.txt') diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 5a15c61..2e92008 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -38,6 +38,25 @@ ref - lane 6: M_R^3 (unchanged) (multiplications.h, tweakey.c) +[break] +- Make byte string concatenation more consistent in AE modes: + + - v1 mixed two interpretations of concatenation: + 1. M_0 || M_1 was interpreted as { M[0], ... M[15] } || { M[16], ... M[31] }, + 2. pad(10*) and tweak-building functions interpreted X||Y as { Y[0], ... Y[ylen-1] } || { X[0], ... X[xlen-1] }. + + This was potentially confusing, and also led to inefficient hardware implementations. E.g. a message M of length 34 bytes was padded as follows: + + M_0 M_1 pad10*(M_*) + { M[0], ... M[15] } || { M[16], ... M[31] } || { 0, ... 0, 0x80, M[32], M[33] } + + - v1.1 sticks to the first interpretation. The same message M is now padded as follows: + + M_0 M_1 pad10*(M_*) + { M[0], ... M[15] } || { M[16], ... M[31] } || { M[32], M[33], 0x80, 0, ... 0 } + + (lilliput-ae-utils.h, lilliput-i.c, lilliput-ii.c) + add_felicsref ------------- -- cgit v1.2.3