go-libp2p icon indicating copy to clipboard operation
go-libp2p copied to clipboard

noise: dump session keys for debugging

Open yusefnapora opened this issue 4 years ago • 2 comments

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.

yusefnapora avatar Dec 06 '19 22:12 yusefnapora

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

marten-seemann avatar Dec 07 '19 03:12 marten-seemann

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

marten-seemann avatar Jun 28 '23 02:06 marten-seemann