mirror of
https://github.com/morgan9e/noiseprotocol
synced 2026-04-14 00:14:05 +09:00
Added snow-multipsk test-vectors
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
3258
tests/vectors/snow-multipsk.txt
Normal file
3258
tests/vectors/snow-multipsk.txt
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user