summaryrefslogtreecommitdiff
path: root/src/lilliput-ae-ii.c
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@airbus.com>2018-11-27 10:37:56 +0100
committerKévin Le Gouguec <kevin.legouguec@airbus.com>2018-11-27 10:37:56 +0100
commit4fefe35fd63842b827016acecfadae891d0da953 (patch)
tree48eb48e8bc2fdfc77b9158438733d1bd98f29e45 /src/lilliput-ae-ii.c
parentef8bf4acd51c5eba9d205506b36e66da7a7bbc8b (diff)
downloadlilliput-ae-implem-4fefe35fd63842b827016acecfadae891d0da953.tar.xz
Extraction du traitement des données authentifiées
Commun à ΘCB3 et SCT-2.
Diffstat (limited to 'src/lilliput-ae-ii.c')
-rw-r--r--src/lilliput-ae-ii.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/lilliput-ae-ii.c b/src/lilliput-ae-ii.c
index 23ff27e..fc50211 100644
--- a/src/lilliput-ae-ii.c
+++ b/src/lilliput-ae-ii.c
@@ -2,18 +2,11 @@
#include <stdint.h>
#include <string.h>
+#include "ae-common.h"
#include "cipher.h"
#include "lilliput-ae.h"
-static void _process_associated_data(
- const uint8_t key[KEY_BYTES],
- size_t A_len,
- const uint8_t A[A_len],
- uint8_t Auth[BLOCK_BYTES]
-)
-{
-}
static void _generate_tag(
const uint8_t key[KEY_BYTES],
@@ -61,7 +54,7 @@ void lilliput_ae_encrypt(
)
{
uint8_t auth[BLOCK_BYTES];
- _process_associated_data(key, auth_data_len, auth_data, auth);
+ process_associated_data(key, auth_data_len, auth_data, auth);
_generate_tag(key, message_len, message, nonce, auth, tag);
@@ -82,7 +75,7 @@ bool lilliput_ae_decrypt(
_decrypt_message(key, ciphertext_len, ciphertext, nonce, tag, message);
uint8_t auth[BLOCK_BYTES];
- _process_associated_data(key, auth_data_len, auth_data, auth);
+ process_associated_data(key, auth_data_len, auth_data, auth);
uint8_t effective_tag[TAG_BYTES];
_generate_tag(key, ciphertext_len, message, nonce, auth, effective_tag);