From e9682e5ff9946a018e00f513f58b7c7651708a63 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Mon, 25 Mar 2019 10:35:27 +0100 Subject: [implem-python] Construction de _tweak_message par concaténation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Et petits nettoyages par-ci par-là. --- test/python/crypto_aead.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/python/crypto_aead.py') diff --git a/test/python/crypto_aead.py b/test/python/crypto_aead.py index 6a9b328..d2f1896 100644 --- a/test/python/crypto_aead.py +++ b/test/python/crypto_aead.py @@ -16,7 +16,7 @@ import lilliput from lilliput.constants import ( - NONCE_BYTES as NPUBBYTES, # Expose to genkat_aead. + NONCE_BITS, TAG_BYTES ) @@ -26,6 +26,9 @@ from parameters import ( ) +NPUBBYTES = NONCE_BITS//8 + + def encrypt(m, ad, npub, k): c, tag = lilliput.encrypt(m, ad, k, npub, MODE) return c+tag -- cgit v1.2.3