Whisperfish - The unofficial SailfishOS Signal client

Thanks for this script. I did something similar using the scrypt package.
print(scrypt.hash(pw, salt, buflen = 32).hex())

At least I now know, that both ways to generate the key, mine and yours, produce the same hex key in the end.

Nevertheless, I still can’t access the database using sqlcipher. I always get an error
Error: file is not a database

Doing the same on my Jolla Phone (sqlcipher 3.15), I get something similar:
Error: file is encrypted or is not a database

I’m tempted to revert to my non-working whisperfish config to see whether whisperfish can still read the database or if the database file is broken.

Thanks for pointing to sqlitebrowser! I just installed that in ArchLinux but opening the file also tells me that it doesn’t seem to be a database. But maybe, I’m just too stupid to find out how to open an encrypted database…

So… I’ve been building sqlitebrowser from source with -Dsqlcipher=1 and it is working now!
Yippieh!
I wonder, why it didn’t work from the command line using sqlcipher
Anyhow, I will now play around a little, maybe I find a neat way to merge my old and new databases.

Thanks again for all effort!

UPDATE: The correct settings for the latest sqlcipher command line tools are:

PRAGMA key = "x'1234...'"
PRAGMA cipher_page_size = 4096;
PRAGMA cipher_hmac_algorithm = HMAC_SHA1;
PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA1;
2 Likes

Great job and thanks for sharing the details!

Now that you mentioned rebuilding sqlbrowser, I think there’re two binaries in the Windows build; one for sqlcipher and one for sqlite… Faint memories, could have been sqlitestudio, too, I tried them both at one time…

If I may give you a hint here: make sure that all the conversations (session table) already exist before you start merging. Only merge messages and all sub-tables (i.e., attachments/reactions/…), don’t introduce new sessions. Sessions are linked via a session state too, and that’s in a file that needs to exist before you merge stuff.

If you create some logic that does the merging, please do dump your scripts and tools in the merging issue! That way we already have a head start if we’re to implement it in WF itself :slight_smile:

1 Like

A wiki page has been added to the whisperfish repo describing the steps to access the database

3 Likes

I had already noted on the release notes thread that Whisperfish cannot install as-is on 4.3.

Now, there seems to be a workaround (kudos @HengYeDev, who has the same problem in Sailtrix). If you add the OR repository of lpra7, Whisperfish should be installable again. lptra7 has a backport of the legacy OpenSSL library for 4.3. This is not ideal (better would be a forward-port of OpenSSL 1.1 for sailfishos<4.2), but it’ll do for now.

https://openrepos.net/content/lpra7/openssl-102-legacy-jollaphone-x-xa2

I don’t have time to test this today, but I will probably do that tomorrow. If meanwhile someone can confirm that this works, would be nice to know.

In the future, I would like to provide two builds (maybe three): for <4.3, and 4.3+, such that the people on 3.x (Jolla1) can still enjoy Whisperfish while it is still possible.

6 Likes

You are just so sweet and awesome, mate.

(XA2 SFOS 4.3) (test device) (The listing of apps in storeman looks weird, don’t know what it means) Couldn’t install openssl 1.0.2 via storeman, so, download, install via pkcon. After that WF installs (via storeman), starts up. Didn’t went on…

By now, there’s a “beta 7” on OpenRepos. It should install trivially on the whole 4.x series from within Storeman, but on the 3.x series you’ll have to do it manually now: zypper install harbour-whisperfish-0.6.0.beta.7-0.sf3.armv7hl should do it. I’m trying to find whether it’s possible for storeman/zypper to be smart enough about this that it picks the correct package for the correct OS version, but it’s not easy. Normal RPM systems would use multiple repositories for this purpose (which is what Chum does), but that’s not really a thing on OpenRepos without multi accounting.

Beta 7 also solves some other issues, you can see the changelog on Openrepos.

2 Likes

thanks @rubdos - just installed it and it works fine on my 10 ii / 4.3

I still have some issues with sending to / receiving from some recipients, but I need to open an issue on GL :slight_smile:

1 Like

Hello, with freshly installed 4.3 on an XA2 I get to the screen where the SMS can be requested in Whisperfish. if I click continue then the app crashes.

Sounds like [SailfishOS] Crash during registration (#366) · Issues · Whisperfish / Whisperfish - Signal on Sailfish OS · GitLab
I haven’t been able to reproduce that, it seems like it’s only on XA and Pinephone for some odd reason. Maybe I should buy a Pinephone to debug :thinking:

1 Like

Just out of curiosity, as it was discussed in the community meeting, Thursday the 11th, did you compile the 3.x versions on openrepos using the 3.4 targets in the SDK? That’s what I’ve been doing to avoid packages being unavailable < 4.x. From discussion at the community meeting that seems a ‘workable hack’ but only applies to harbour (from that discussion).

Yep. I’m compiling Whisperfish by install 3.4 targets on the 4.1 SDK. Rust allows this for armv7hl and aarch64, because those are forwarded through sb2. It’s relatively hacky, but it actually works quite cleanly. I cannot make any i486 packages for 3.4 though, but there is no i486 device that cannot run 4.0+, so there’s not really a problem either.

1 Like

Thanks for the confirmation. It won’t make @slava happy since it’s a bunch o’ work ™ but it’s a workaround. I’m just praying we can get obs/chum (with signing) to become the norm for harbour and/or openrepos soon.

Chum would also solve the problem of selecting the correct Whisperfish version for the current OS.

I can test this with my XA2 Ultra today, and submit the logs, if there’s anything of interest.

1 Like

Hi @direc85, would be nice if you could do that and add your findings to [SailfishOS] Crash during registration (#366) · Issues · Whisperfish / Whisperfish - Signal on Sailfish OS · GitLab. It might even be useful to have a look with GDB. Sounds like we’ll have to go through the reCAPTCHA-render-hell again :frowning:

Hi! AFAICT noone has mentioned this as of now, at least not in the forum. I have the following weird issue:

I had a working Whisperfish under 4.2.

I updated to 4.3, as usual, under warnings that Whisperfish would not work there.

Then @rubdos uploaded a new package to OpenRepos

The package is installable, it opens, I see my old chats. However, it never connects to the server, so I cannot send or receive anything new. I’m on a Dual Sim X10 Plus.

Hey @rsoto, did you by any chance register your phone number again on a different phone (e.g. Android/iOS)? I ask, because that would have unregistered your Whisperfish install. If that’s not the case, it would be nice to see some logs while you reproduce the issue. You can mail me the logs, but better would be to open an issue on Gitlab :slight_smile:

1 Like