-
| As I understand, Noise protocol in XX pattern takes three steps of information exchanging(source): However in libp2p, upon a noise xx connection upgrade request, we use rt15_initiator/responder(code link), which performs: How does an empty message send out the ephemeral key? And by  | 
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
| Using Wireshark I noticed three tcp packages after responder agreed with initiator's proposal of noise upgrade. However can't make sense of these packages. Data after these three packages are encrypted. | 
Beta Was this translation helpful? Give feedback.
-
| Hi @normanade, Thanks for raising this question. The call to  
 Let me know in case the above makes sense. | 
Beta Was this translation helpful? Give feedback.
-
| After reading the noise spec, I realised that this  Libp2p users can neither change the ephemeral key, nor print them. The only way of acknowledging the key is using the network interception softwares. Difference between  | 
Beta Was this translation helpful? Give feedback.
Hi @normanade,
Thanks for raising this question.
The call to
send_emptydoes not send an overall empty Noise message, but instead the first Noise message of the XX handshake with an empty additional user payload.rust-libp2p/transports/noise/src/io/handshake.rs
Line 209 in 2c739e9
write_emptywill result in a call toHandshakeState::write_messagewhich will write both the Noise handshake payload and the (here empty) user payload.Let me know in case the above makes sense.