-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Stratum uses Noise NX handshake to establish encrypted session between client and server.
after an initial roundtrip
-> e
<- e, ee, s, es, <certificate>
specification suggests to negotiate a different symmetric cipher.
Idea is that client suggests a list of alternatives ciphers, and server chooses one of them.
But since this is not a stratum-message, doesn't have a stratum header, it is impossible for the server to know how many bytes it should read and decrypt on the connection.
the only content according to the spec is ciphertext of SEQ0_32[u32].
There are two options:
- we define a frame for this message
- we remove this step entirely
Some ideas for a frame:
a. Use encrypted array length as a header: 1 + 16 B = 17 B, followed by an encrypted tuple of N u32 numbers (N x 4 B + 16)
b. Define a stratum message with a full sv2-header (extenstion type, message type, payload length...