Closed ArneJanning closed 2 months ago
Hi! Thanks for your report, but I'm afraid you are misunderstanding the --desktopkey
option. I should probably make it a little more clear, but from the README:
To use any of the desktop functions of this tool on Linux/macOS, the decrypted key must be manually supplied through the --desktopkey option
This "decrypted key" is not the encryption key that you found in your config.json
, it is a key that is obtained from that encryption key (and it will be 64 bytes).*
Unfortunately, obtaining this key is (as far as I know) not yet possible on macOS. For Windows the code is already in this tool, for Linux some code that I will at some point include here is available here. But for macOS I have not started implementing it yet. I do plan on trying it, but it will take a while because of the usual time constraints and:
I will leave this open as a sort of request for supporting key retrieval from the keyring on macOS, so I have some place to report back to if/when I make progress on that. But as far as I can tell there is no bug here.
throw a "Bad argument"-exception.
It doesn't actually throw an exception does it? It should just print that error and exit cleanly, if it does throw an exception that would be a bug.
Thanks!
*If you have any older versions of your config.json
, maybe from a backup, the decrypted key may be in there (listed as key
). Unless you at some point recently deleted your data and relinked your phone, the key should still be the same except it is encrypted now (which is why it is now called encryptedKey
).
It was actually less difficult than expected. A first attempt at a tool to get the decrypted key for macOS is now available here: https://github.com/bepaald/get_signal_desktop_key_mac
I plan to incorporate this functionality in this project at some later time, but for now hopefully with that tool and the --desktopkey
option, everything should at least be working. I would love to hear if the tool works for you.
Thanks!
I've incorporated the functionality of https://github.com/bepaald/get_signal_desktop_key_mac into this program now, so the desktop key should now be automatically decrypted on macOS. Assuming it is working correctly. So I believe this issue can be closed, but feel free to add to it, or open a new one if you think otherwise. Thanks!
Originally posted by @bepaald in https://github.com/bepaald/signalbackup-tools/issues/203#issuecomment-2217841919
On MacOS the encryptionKey in config.json is actually 190 bytes long which causes the regex ("^[0-9a-fA-F]{64}$") in arg/arg.cc:575 to fail and throw a "Bad argument"-exception.