aboutsummaryrefslogtreecommitdiff
path: root/vector/vector_format.py
diff options
context:
space:
mode:
authorPavel V. Shatov (Meister) <meisterpaul1@yandex.ru>2019-03-23 10:48:24 +0300
committerPavel V. Shatov (Meister) <meisterpaul1@yandex.ru>2019-03-23 10:48:24 +0300
commiteb859f8df6013c673e570799c73da0057848a06c (patch)
tree3e88204bd11f06969fc6ad0fd04994e9c30bccb7 /vector/vector_format.py
parentc01d11dbd8578b98b825b6d3075b21d04a3080db (diff)
Added blinding support to test vector generation scripts.
Diffstat (limited to 'vector/vector_format.py')
-rw-r--r--vector/vector_format.py10
1 files changed, 6 insertions, 4 deletions
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.")