Added snow-multipsk test-vectors

This commit is contained in:
Piotr Lizonczyk
2017-09-11 00:58:55 +02:00
parent ac7e3506a9
commit a60def7614
3 changed files with 3263 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ logger = logging.getLogger(__name__)
vector_files = [
'vectors/cacophony.txt',
'vectors/noise-c-basic.txt'
'vectors/snow-multipsk.txt'
]
# As in test vectors specification (https://github.com/noiseprotocol/noise_wiki/wiki/Test-vectors)
@@ -114,7 +114,8 @@ class TestVectors(object):
handshake_finished = True
# Verify handshake hash
assert initiator.noise_protocol.handshake_hash == responder.noise_protocol.handshake_hash == vector['handshake_hash']
if 'handshake_hash' in vector:
assert initiator.noise_protocol.handshake_hash == responder.noise_protocol.handshake_hash == vector['handshake_hash']
# Verify split cipherstates keys
assert initiator.noise_protocol.cipher_state_encrypt.k == responder.noise_protocol.cipher_state_decrypt.k

View File

@@ -1,3 +1,4 @@
Test vectors:
- cacophony.txt from https://github.com/centromere/cacophony/blob/master/vectors/cacophony.txt, stripped from outer dict (so that it is just a list of json objects)
- noise-c-basic.txt from https://github.com/rweather/noise-c/blob/master/tests/vector/noise-c-basic.txt, stripped from outer dict (so that it is just a list of json objects)
- noise-c-basic.txt from https://github.com/rweather/noise-c/blob/master/tests/vector/noise-c-basic.txt, stripped from outer dict (so that it is just a list of json objects)
- snow-multipsk.txt from https://github.com/mcginty/snow/blob/master/tests/vectors/snow-multipsk.txt, stripped from outer dict (so that it is just a list of json objects)

File diff suppressed because it is too large Load Diff