4 ms·
While encrypted, encryption key for the database is kept as plaintext in a JSON file. ...which is kept right next to the encrypted DB and presumably has the sa
by userbinator 6y ago
While encrypted, encryption key for the database is kept as plaintext in a JSON file.
...which is kept right next to the encrypted DB and presumably has the same permissions, so what's the point?
- tmp538394722 6y agoA more secure delete, for one.
- 0x426577617265 6y agoNot really considering SQLite databases can use WAL commits and it’s easy to view those previous commits.
- pseudalopex 6y agoSQLCipher encrypts the WAL.[1] [1] https://www.zetetic.net/sqlcipher/design/ https://www.zetetic.net/sqlcipher/design/
- 0x426577617265 6y agoFrom your source, it uses the same key: > Write Ahead Log Files - Using the new WAL mode (i.e. PRAGMA journal_mode = WAL;), page data stored in the WAL file is encrypted using the datbase key. Pages in the rollback journal are encrypted using the same key as the main database. Verification: create an encrypted database, start a transaction, make changes, and then inspect the -wal file using hexdump or a similar program.
- pseudalopex 6y agoSo destroying the key makes both unrecoverable.
- 0x426577617265 6y agoYes, Except the key isn’t destroyed it’s in the json file next to the main db file. Meaning user’s deleted messages could still be recovered. Even if the user went as far as deleting the json file, it could still possibly be recovered due to the way the FS ‘deletes’ files.
- Operyl 6y agoI think the other posters are saying it’s much easier to shred a small file than it is to shred a multiple GB database, although these days it doesn’t matter so much for a database that small. It’s super efficient for file systems though.
- pseudalopex 6y agoYes. And I'm talking generally. I don't know what Signal does.