Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (21 sloc) 1.6 KB

Support for your own BOLT implementation

By dumping key log file

Your own BOLT implementation can use lightning-dissector by dumping key log file.
Whenever key lotation happens, BOLT implementation write out <16byte MAC & key> of "first BOLT packet" to key log file.
Every line of the key log file consists of:

<16-byte MAC of the encrypted message length> <rk or sk to decrypt that message>

BOLT #8 describes each item in detail.
Both items must be encoded as hex string like:

f5c824813efadaa8cb34b52fca45d8e6 9971413e29a98f2f173d19f405561c6ccebec1a88d358fab59ff32fb33cbe008

Implementations must insert a new line to the key log file when key rotation happens.
When you use Wireshark, you can specify key log file by Wireshark preference Protocols -> LIGHTNING -> Key log file.

By writing a new SecretFactory

Your own BOLT implementation can use lightning-dissector by writing a new SecretFactory.
and put its instance to here.

Add support for another message

You can add support for another message by writing a new deserializer like this.
and put it here.