nayutaco / lightning-dissector

WIP: A wireshark plugin to analyze communication between lightning network nodes
MIT License
88 stars 12 forks source link

c-lightning decryption key not found #28

Open nettijoe96 opened 5 years ago

nettijoe96 commented 5 years ago

I am testing out the new c-lightning beta plugin. I have installed Lua, luarocks, wireshark, and the special lightning-cli. Wireshark can detect lightning packets but cannot decrypt them.

wireshark

I am not sure if this is a bug or if I am missing something.

nettijoe96 commented 5 years ago

Update: Although it is still not working, we managed to debug this quite a bit. We noticed that this line is always failing:

secret-factory.lua line 34 local key = rex.match(log, length_mac .. " ([0-9a-f]+)") this means that the mac->key pair is not found in the keys.log file.

nayuta-gondo commented 5 years ago

You use https://github.com/arowser/lightning? Have you set the path of the key log file? Protocols -> LIGHTNING -> Key log file preference

nettijoe96 commented 5 years ago

yes this is set in wireshark. I removed the file location for the eclair log and kept it for the c-lightning log. The contents of the keys.log changes on startup of wireshark when I am receiving lightning messages. The contents are a single line: "MAC space Private Key"

ghost commented 5 years ago

Thanks for the report! Is that packet sent from c-lightning? or sent from other implementation to c-lightning? Currently lightning-dissector doesn't support the latter.

ghost commented 5 years ago

and you have to start Wireshark before c-lightning starts.