[noise] NoiseSocket - test vectors

Alexey Ermishkin scratch.net at gmail.com
Mon Mar 20 05:18:29 PDT 2017


Finally managed to produce something that looks like test vectors for the
NoiseSocket protocol. 
It's right here:
https://github.com/go-noisesocket/noisesocket/blob/master/testvectors.json

The spec itself is here:
https://github.com/noisesocket/spec/blob/master/noise_socket.md

A little bit about its structure
1) Initial message is moved to the root to reduce the file size. It contains
16 sub-messages each correspond to a specific Noise protocol. You can see
the order of protocols in [Protocols] array
2) "Server" chooses which sub-message to answer and this forms a session. 
3) Each session contains an array of transport messages which consist of raw
wire data ("Packet" field), payload and fields
4) "Payload" is something that is formed by concatenating Noise socket
fields. It may or may not be present during handshake (1st XX message has
always empty payload)
5) After parsing nonempty payload you get some fields. I've added one during
handshake (dummy json type 1024) and two (1- data and 0 - padding) for
transport messages.

My tests do pass but I'm sure I messed somewhere, so feedback is very
welcome




More information about the Noise mailing list