Closed AljoschaMeyer closed 6 years ago
Yup, turns out state.remote.hello
is only 96 bytes long (or at least the equivalent buffer in my implementation is). Node just "conveniently" ignores that 112 is too long and simply slices to the end of the buffer.
yes that is the sort of thing node does. yes that should be the unboxed length not the boxed length. good spotting.
In
serverVerifyAuth
, the server receives the longterm public key of the client by callingstate.remote.hello.slice(64, exports.client_auth_length)
. The resulting slice has length112 bytes - 64 bytes = 48 bytes
. But isn't the public key only 32 bytes long?