From eb859f8df6013c673e570799c73da0057848a06c Mon Sep 17 00:00:00 2001 From: "Pavel V. Shatov (Meister)" Date: Sat, 23 Mar 2019 10:48:24 +0300 Subject: Added blinding support to test vector generation scripts. --- vector/vector_format.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'vector/vector_format.py') diff --git a/vector/vector_format.py b/vector/vector_format.py index accf691..67a50f0 100644 --- a/vector/vector_format.py +++ b/vector/vector_format.py @@ -40,7 +40,8 @@ SCRIPT_USAGE = "USAGE: vector_format.py [openssl_binary]" KEY_LENGTH = 1024 -RNG_SEED = 0 +RNG_SEED_MESSAGE = 1 +RNG_SEED_BLINDING = 2 if __name__ == "__main__": @@ -49,10 +50,11 @@ if __name__ == "__main__": if len(OPENSSL_BINARY) > 0: - MESSAGE = vector_util.random_message(RNG_SEED, KEY_LENGTH) - VECTOR = vector_util.load_vector(OPENSSL_BINARY, KEY_LENGTH) + MESSAGE = vector_util.random_message(RNG_SEED_MESSAGE, KEY_LENGTH) + BLINDING = vector_util.random_blinding(RNG_SEED_BLINDING, KEY_LENGTH) + VECTOR = vector_util.load_vector(OPENSSL_BINARY, KEY_LENGTH) - vector_ok = VECTOR.selfcheck(MESSAGE) + vector_ok = VECTOR.selfcheck(MESSAGE, BLINDING) if vector_ok: vector_util.save_vector(VECTOR) print("Test vector formatted.") -- cgit v1.2.3