libp2p / go-libp2p

libp2p implementation in Go
MIT License
6.08k stars 1.08k forks source link

noise: dump session keys for debugging #1536

Open yusefnapora opened 4 years ago

yusefnapora commented 4 years ago

This is a long-term "nice to have" feature. It would be nice to be able to opt-in to dumping session keys to aid in debugging. Opting in shouldn't be possible to do by accident; a combination of a build-time flag and an environment variable is probably enough.

There's a really cool libp2p wireshark dissector that supports (a fork of) SECIO. It would be cool to extend that to support noise as well, but that would require a little work to make the session keys accessible to the dissector.

marten-seemann commented 4 years ago

Not familiar with the Noise code at all, but TLS standard library uses the KeyLogWriter in the tls.Config.

marten-seemann commented 1 year ago

This really only makes sense once there's a WireShark dissector for Noise, or some other way to decrypt the recorded traffic.