From ae1a30eccd0a8e7643c82ed51d87f585dfdd4717 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Tue, 2 Jul 2019 09:47:19 +0200 Subject: Mise à jour de l'implémentation threshold MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/add_threshold/tweakey.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/add_threshold/tweakey.c b/src/add_threshold/tweakey.c index 8f531d9..7822564 100644 --- a/src/add_threshold/tweakey.c +++ b/src/add_threshold/tweakey.c @@ -90,10 +90,11 @@ void tweakey_state_extract( typedef void (*matrix_multiplication)(const uint8_t x[LANE_BYTES], uint8_t y[LANE_BYTES]); -static const matrix_multiplication ALPHAS[6] = { +static const matrix_multiplication ALPHAS[7] = { _multiply_M, _multiply_M2, _multiply_M3, + _multiply_M4, _multiply_MR, _multiply_MR2, _multiply_MR3 @@ -102,16 +103,14 @@ static const matrix_multiplication ALPHAS[6] = { void tweakey_state_update(uint8_t TK_X[TWEAKEY_BYTES], uint8_t TK_Y[KEY_BYTES]) { - /* Skip lane 0, as it is multiplied by the identity matrix. */ - - for (size_t j=1; j