summaryrefslogtreecommitdiff
path: root/crypto_aead/lilliputaei128v1/ref
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@airbus.com>2018-11-22 16:29:14 +0100
committerKévin Le Gouguec <kevin.legouguec@airbus.com>2018-11-22 16:29:14 +0100
commit778bb979efd0cf202899f21360992ce9a616cbfd (patch)
treec0c7f67c1a937fc645688a29daa9100413aaaf8a /crypto_aead/lilliputaei128v1/ref
parent0abbc481e729c9db422239c7220238d5cdfc9051 (diff)
downloadlilliput-ae-implem-778bb979efd0cf202899f21360992ce9a616cbfd.tar.xz
Ajout de la clé dans les paramètres de l'API AE
Herp derp.
Diffstat (limited to 'crypto_aead/lilliputaei128v1/ref')
-rw-r--r--crypto_aead/lilliputaei128v1/ref/lilliput-ae-i.c2
-rw-r--r--crypto_aead/lilliputaei128v1/ref/lilliput-ae.h2
-rw-r--r--crypto_aead/lilliputaei128v1/ref/test/test-ae-roundtrip.c5
3 files changed, 6 insertions, 3 deletions
diff --git a/crypto_aead/lilliputaei128v1/ref/lilliput-ae-i.c b/crypto_aead/lilliputaei128v1/ref/lilliput-ae-i.c
index 945c75c..82dd0b7 100644
--- a/crypto_aead/lilliputaei128v1/ref/lilliput-ae-i.c
+++ b/crypto_aead/lilliputaei128v1/ref/lilliput-ae-i.c
@@ -7,6 +7,7 @@
void lilliput_ae_encrypt(
size_t message_len, const uint8_t message[message_len],
size_t auth_data_len, const uint8_t auth_data[auth_data_len],
+ const uint8_t key[KEY_BYTES],
const uint8_t nonce[NONCE_BYTES],
size_t *ciphertext_len, uint8_t ciphertext[message_len+BLOCK_BYTES],
@@ -18,6 +19,7 @@ void lilliput_ae_encrypt(
bool lilliput_ae_decrypt(
size_t ciphertext_len, const uint8_t ciphertext[ciphertext_len],
size_t auth_data_len, const uint8_t auth_data[auth_data_len],
+ const uint8_t key[KEY_BYTES],
const uint8_t nonce[NONCE_BYTES],
const uint8_t tag[TAG_BYTES],
diff --git a/crypto_aead/lilliputaei128v1/ref/lilliput-ae.h b/crypto_aead/lilliputaei128v1/ref/lilliput-ae.h
index 973533c..d5c19b3 100644
--- a/crypto_aead/lilliputaei128v1/ref/lilliput-ae.h
+++ b/crypto_aead/lilliputaei128v1/ref/lilliput-ae.h
@@ -11,6 +11,7 @@
void lilliput_ae_encrypt(
size_t message_len, const uint8_t message[message_len],
size_t auth_data_len, const uint8_t auth_data[auth_data_len],
+ const uint8_t key[KEY_BYTES],
const uint8_t nonce[NONCE_BYTES],
size_t *ciphertext_len, uint8_t ciphertext[message_len+BLOCK_BYTES],
@@ -20,6 +21,7 @@ void lilliput_ae_encrypt(
bool lilliput_ae_decrypt(
size_t ciphertext_len, const uint8_t ciphertext[ciphertext_len],
size_t auth_data_len, const uint8_t auth_data[auth_data_len],
+ const uint8_t key[KEY_BYTES],
const uint8_t nonce[NONCE_BYTES],
const uint8_t tag[TAG_BYTES],
diff --git a/crypto_aead/lilliputaei128v1/ref/test/test-ae-roundtrip.c b/crypto_aead/lilliputaei128v1/ref/test/test-ae-roundtrip.c
index d97a813..f1cb24c 100644
--- a/crypto_aead/lilliputaei128v1/ref/test/test-ae-roundtrip.c
+++ b/crypto_aead/lilliputaei128v1/ref/test/test-ae-roundtrip.c
@@ -87,7 +87,7 @@ int main()
lilliput_ae_encrypt(
v->message_len, v->message,
v->auth_len, v->auth,
- v->nonce,
+ v->nonce, v->key,
&ciphertext_len, ciphertext,
tag
);
@@ -97,8 +97,7 @@ int main()
bool valid = lilliput_ae_decrypt(
ciphertext_len, ciphertext,
v->auth_len, v->auth,
- v->nonce,
- tag,
+ v->nonce, v->key, tag,
&deciphered_len, deciphered
);