-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signal-Desktop doesn't notice if db.sqlite is unencrypted #5245
Comments
I've just updated to Signal-Desktop and noticed the following console output:
So it seems like Signal-Desktop already has enough information to solve this problem. After the update:
|
Sorry you're running into this. To make sure I understand everything: you want Signal Desktop to verify that it's using SQLCipher and not SQLite. Is that right? I'm also confused about why some databases would be unencrypted—ideally, all of the databases would be encrypted and would be unreadable by "vanilla" SQLite. Do some unofficial Linux packages swap SQLCipher for plain SQLite? Let me know if there's some discussion I'm missing here. |
Yes. However, if I think more about it that adds a new issue as this might be difficult to avoid on (some) Linux setups/distributions. I guess it would be nice if there was also an environment variable (e.g.
Yes, that should be the case. But e.g. in my case it's still unencrypted and Signal-Desktop doesn't detect that or at least doesn't complain about it.
This is the case and causes the very misleading This is the biggest issue as it causes data loss. Unfortunately it is tricky to avoid. So it might be best if Signal-Desktop simply detects this case and shows a more appropriate error message.
The issue is that Signal-Desktop uses Electron and as a result it depends on a lot of system libraries. IIRC the issue was that Electron depends on GTK3 which depends on tracker3 which recently added a dependency on sqlite: https://gitlab.gnome.org/GNOME/tracker/-/issues/289 The result is that "enabling tracker3 in gtk3 [which is the default AFAIK] causes sqlite to be loaded in pretty much all gui processes" https://gitlab.gnome.org/GNOME/tracker/-/issues/289 should point to all of the relevant information (sqlcipher/sqlcipher#385 might be most relevant as this is currently a SQLCipher limitation/issue). The alternative (which I'd also be fine with) would be that Signal-Desktop stops using SQLCipher on Linux (not sure about other platforms but at least on Linux the encryption key ( |
@EvanHahn-Signal this comment from a core SQLCipher developer is also relevant for Signal-Desktop: sqlcipher/sqlcipher#385 (comment)
[...]
|
@EvanHahn-Signal Just want to chime in that it would make sense to be able to force an unencrypted Signal database (using standard Sqlite) for many users such as myself. I already have my GNU/Linux computer configured for full disk encryption, so encrypting the database on top of that is unnecessary. The database only needs proper file permissions set so other programs can't access it. This would also solve all the issues related to SQLCipher causing crashes and unrecoverable corruption. |
We use SQLCipher for two reasons:
We'd really rather not maintain two separate database implementations (even if they are similar) as this increases our maintenance burden; in addition, we believe SQLite to be less secure. Instead, we should figure out how to make SQLCipher work for everyone. |
What's the point of encrypting the data at rest if the key is stored with the db? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale. Also related: signalapp/better-sqlite3#3 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale and still an issue but with signalapp/better-sqlite3#3 merged an (accidentally) unencrypted DB shouldn't be possible anymore so a check is much less important now. I guess it's best to simply close this issue (otherwise it'll remain being ignored anyway). |
This is one of the causes for #4513 (likely the main one) and was reported in #5097. I'm reopening this because the underlying issue is still not fixed. Signal-Desktop needs a way to determine if the DB is encrypted or not and refuse to launch if
sqlite
is loaded instead ofsqlcipher
. IIRCsqlcipher
doesn't allow this yet but this clearly requires a solution.(Or just drop the unnecessary encryption on Linux - I'd be happy with that as well.)
There are currently two issues:
sqlcipher
but doesn't notice if the DB is unencrypted.sqlcipher
tosqlite
.Feedback from Linux users whether their DB is encrypted or not might also be nice.
In my case it's still unenecrypted:
PS: Sorry for the brevity but I need to cool down first as this caused a lot of unnecessary frustration and work for me as a downstream package maintainer for a Linux distribution.
The text was updated successfully, but these errors were encountered: