You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Twitter query: PRAGMA support with SQLCipher? #264
To perhaps clarify a bit more outside of the twitter character limit! We have a SQLite DB in our Unity project, and a requirement was encryption. sqlcipher wasn't supported by the SQLite Unity plugin we used (https://www.assetstore.unity3d.com/en/#!/content/4334), so we had to use their "PRAGMA key = X" to encrypt the DB on devices. We would love a way to then use sqlitebrowser to decrypt the contents of this DB after pulling it off a device and entering our key. I grabbed the latest nightly build of sqlitebrowser as well as the cipher-enabled version, but neither of them will decrypt our DB. (though i'm unsure if changing the "page size" value in sqlcipher version would help, I have no idea what value I'd use there)
The format of key we're using is: 0x5c516e4e21a65b8fee841db84b462367
(some digits changed to protect the innocent, but length remains the same as what we're using)
From what I understand this is an issue with the key formats we support. SQLCipher allows text key (like 'my passphrase') as well as raw keys (like '0xabcdef0123456789'). Since we only support the text key format all databases encrypted using the raw key format can't be opened. At least that's how I understand the issue, and either way: this definitely needs to be fixed 😃
I've just added some code for this, so the next nightly build will have support for the raw key format. So please give that new version a test 😃 Chances are that it's working when changing the format to 'Raw key' in the cipher dialog and then enter the key in the '0x...' format.
However, I can't guarantee that it's working for databases created with that Unity plugin because I couldn't find much information about the encryption used in that plugin. If they don't rely on SQLCipher internally my fix won't work. But as I said, it's definitely worth a try!
I've just emailed the contact point (orangetree@) for the Unity plugin developers, pointing them at this issue + asking if they're using SQLCipher for the encryption layer.
Hopefully we get a response back, and they use SQLCipher. If they do, this might all be workable. 😉
In the meantime I've added the response requested label, so we come back to this issue in a few days time if I don't get a response to the email first.
Activity
niall111 commentedon Apr 17, 2015
To perhaps clarify a bit more outside of the twitter character limit! We have a SQLite DB in our Unity project, and a requirement was encryption. sqlcipher wasn't supported by the SQLite Unity plugin we used (https://www.assetstore.unity3d.com/en/#!/content/4334), so we had to use their "PRAGMA key = X" to encrypt the DB on devices. We would love a way to then use sqlitebrowser to decrypt the contents of this DB after pulling it off a device and entering our key. I grabbed the latest nightly build of sqlitebrowser as well as the cipher-enabled version, but neither of them will decrypt our DB. (though i'm unsure if changing the "page size" value in sqlcipher version would help, I have no idea what value I'd use there)
The format of key we're using is: 0x5c516e4e21a65b8fee841db84b462367
(some digits changed to protect the innocent, but length remains the same as what we're using)
hukadev commentedon Sep 4, 2015
Will you develop Cipher for Windows?
justinclift commentedon Sep 9, 2015
It would be good to have, but we're low on developer time at the moment. If you have the skill to get it working, your assistance would be welcome. 😄
hukadev commentedon Sep 9, 2015
I wish I can, but my skill is not good. Exactly I don't have experience. :)
Z4us commentedon Sep 9, 2015
Simple suggestion (perhaps too simple to be a true solution)
First decrypt with your key;
Then encrypt with cipher embedded in DB4S
oliverw commentedon Jan 17, 2017
@justinclift Has been made any progress on this?
cipher: Add support for encryption using the raw key format
MKleusberg commentedon Jan 22, 2017
From what I understand this is an issue with the key formats we support. SQLCipher allows text key (like 'my passphrase') as well as raw keys (like '0xabcdef0123456789'). Since we only support the text key format all databases encrypted using the raw key format can't be opened. At least that's how I understand the issue, and either way: this definitely needs to be fixed 😃
I've just added some code for this, so the next nightly build will have support for the raw key format. So please give that new version a test 😃 Chances are that it's working when changing the format to 'Raw key' in the cipher dialog and then enter the key in the '0x...' format.
However, I can't guarantee that it's working for databases created with that Unity plugin because I couldn't find much information about the encryption used in that plugin. If they don't rely on SQLCipher internally my fix won't work. But as I said, it's definitely worth a try!
justinclift commentedon May 17, 2017
I've just emailed the contact point (orangetree@) for the Unity plugin developers, pointing them at this issue + asking if they're using SQLCipher for the encryption layer.
Hopefully we get a response back, and they use SQLCipher. If they do, this might all be workable. 😉
justinclift commentedon May 17, 2017
Hmmm, looking at discussions about that Unity plugin... it seems like it's not actively developed any more. 😦
MKleusberg commentedon May 17, 2017
Oh 😦 But well, the hex input is definitely an improvement in DB4S anyway 😉
justinclift commentedon May 17, 2017
Good point. 😄
In the meantime I've added the
response requestedlabel, so we come back to this issue in a few days time if I don't get a response to the email first.justinclift commentedon Jun 27, 2017
No response from the Unity plugin people. 😦
Closing this issue.