tbvdm / sigtop

Export messages from Signal Desktop
Other
258 stars 10 forks source link

Cannot Find Key: "sigtop: cannot decrypt database key: cannot find encryption key" #56

Open piercegwang opened 1 month ago

piercegwang commented 1 month ago

OS: NixOS (Custom build of the latest version of sigtop, 0.15.0) Problem: No matter what command I run, I receive a sigtop: cannot decrypt database key: cannot find encryption key error.

Things I've tried:

I see that other people have posted issues unrelated to this, and I assume that at some level this program must work... so, my only conclusion is that I'm doing something stupid or missing something. But, I can't for the life of me figure out what that is. Any help would be greatly appreciated!

olewales commented 1 month ago

Just installed sigtop for the first time and encountered the same issue. Version: sigtop@v0.15.1-0.20240913183615-8909429fc593 Signal desktop version: 7.21.0

tbvdm commented 4 weeks ago

What desktop environment are you using?

How did you generate the keyfile, and what is the command you used to pass the keyfile to sigtop?

piercegwang commented 4 weeks ago

Thanks for replying! I'm using KDE Plasma 6.

For the keyfile, I didn't know I had to generate one. From what I could tell from the sigtop man page, it just requires the directory. None of the example commands passed a keyfile, so I was sort of just guessing along the way. These are the commands I tried:

What other commands should I run to get the encryption key? Are there documented hoops I have to jump through currently due to weird signal encryption things? Thanks for your help again.

tbvdm commented 4 weeks ago

I understand your confusion. KDE support in sigtop is subpar currently. The documentation is not completely up to date either.

To generate a keyfile for KDE, run:

kwallet-query -f "Chromium Keys" -r "Chromium Safe Storage" kdewallet >keyfile

Then use the -k option to pass the keyfile to sigtop. For example:

sigtop export-messages -k keyfile messages

You can also pipe the kwallet-query output directly to sigtop if you prefer. For example:

kwallet-query -f "Chromium Keys" -r "Chromium Safe Storage" kdewallet | sigtop export-messages -k - messages
piercegwang commented 4 weeks ago

Fantastic. Finally got around to testing this, and it works like a charm. Would it be helpful if made a pull request to add this info to the readme?

tbvdm commented 2 weeks ago

sigtop is now able to get the encryption key from KWallet. You no longer have to run kwallet-query and provide a keyfile.