-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Stick with backwards compat #15
base: master
Are you sure you want to change the base?
Conversation
Why do this here? Why not in the app? |
You can't issue PRAGMA commands from the IOCipher interface. There is no way to inject custom SQL commands when you mount the volume. |
sticking that hardcoded in the library will break any app that has
already upgraded. How about using old 3.x binaries of sqlcipher with
this version of IOCipher?
|
I need the 64-bit builds unfortunately. For now, I will just use my own v3 compat flag. I will think about modifying the API to support the ability to issue custom PRAGMA in the mount process. |
Seems like figuring out the proper migration is the best way forward, to
avoid the technical debt building up. What ended up happening there
that blocked you?
|
The proper migration still requires using a PRAGMA command. It would be nice to have a way for IOCipher instances to migrate without requiring to use the SQLCipher API to mount, etc. Adding a way to call PRAGMA would make that possible. What happened in my case was it would always return a failure code instantly. I migrated my standard SQLCipher database without an issue. What makes IOCipher different possible is that we use a different SQL page size, and also my IOCipher volume was 400MB. For now, since I need to ship an important update to keanu, I am just building my own compat v3 version of IOCipher which works fine, but we should def figure this out for others. |
If I remember correrctly, you can just open the IOCipher database file
directly e.g. outside of IOCipher and issue PRAGMA commands there for
things like migrating the database. Just use the plain sqlicpher
database API.
There is more info here, including a claim that v3.5.9 includes 64-bit
binaries:
sqlcipher/android-database-sqlcipher#446
|
What would a proper fix here look like?
Additionally we should also provide a way to tweak the compatibility settings (option 2 in this post), perhaps a new mount method like (also, I think this issue belongs in iocipher not libslfs) |
I'm pretty sure that IOCipher would work against a wide range of
SQLCipher releases, so really this belongs in SQLCipher. I suppose
there could be example migration code in IOCipher. I haven't heard
anything specific to IOCipher in this issue, it seems entirely a
low-level SQLCipher thing. The migration needs to happen when SQLCipher
goes from 3.x to 4.x.
|
Feel free to build off of this, ideally it should be configurable: ChatSecure@4456f8a |
I couldn't make the cipher migration for SQLCipher 4 to work with an existing larger IOCipher instance. The easier solution for now is to set the v3 compatibility mode.