The noise handshake used in peers connection could use a custom Diffie-Hellman implementation. The Noisewarp constructor would benefit from passing the curve to the NoiseHandshake constructor making it more flexible. Besides, the implementation could be asynchronous so the receive method must await in order to decode the received buffer.
The noise handshake used in peers connection could use a custom Diffie-Hellman implementation. The Noisewarp constructor would benefit from passing the curve to the NoiseHandshake constructor making it more flexible. Besides, the implementation could be asynchronous so the receive method must await in order to decode the received buffer.
See this example: