Skip to content

Twitter query: PRAGMA support with SQLCipher? #264

Closed

Description

@justinclift

Query from Twitter:

    https://twitter.com/niall111/status/589078702132166656

Tried app with cipher support here … but we use a pragma key and want to browse DB with it, possible?

and:

    https://twitter.com/niall111/status/589119373006213120

We use a pre-generated hex pragma key to encrypt the DB in Unity, and want to be able to view it without requiring Unity.

Any ideas? @MKleusberg ? 😄

Activity

  1. niall111 commented on Apr 17, 2015

    @niall111

    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)

  2. hukadev commented on Sep 4, 2015

    @hukadev

    Will you develop Cipher for Windows?

  3. justinclift commented on Sep 9, 2015

    @justinclift
    MemberAuthor

    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. 😄

  4. hukadev commented on Sep 9, 2015

    @hukadev

    I wish I can, but my skill is not good. Exactly I don't have experience. :)

  5. Z4us commented on Sep 9, 2015

    @Z4us

    Simple suggestion (perhaps too simple to be a true solution)
    First decrypt with your key;
    Then encrypt with cipher embedded in DB4S

  6. oliverw commented on Jan 17, 2017

    @oliverw

    @justinclift Has been made any progress on this?

  7. MKleusberg commented on Jan 22, 2017

    @MKleusberg
    Member

    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!

  8. justinclift commented on May 17, 2017

    @justinclift
    MemberAuthor

    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. 😉

  9. justinclift commented on May 17, 2017

    @justinclift
    MemberAuthor

    Hmmm, looking at discussions about that Unity plugin... it seems like it's not actively developed any more. 😦

  10. MKleusberg commented on May 17, 2017

    @MKleusberg
    Member

    Oh 😦 But well, the hex input is definitely an improvement in DB4S anyway 😉

  11. justinclift commented on May 17, 2017

    @justinclift
    MemberAuthor

    Good point. 😄

    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.

  12. justinclift commented on Jun 27, 2017

    @justinclift
    MemberAuthor

    No response from the Unity plugin people. 😦

    Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions