×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    15

    SQLite encrypted database Symbian/QT

    I'm trying to create an encrypted database for symbian devices (mainly S^3).
    I try to compile sqlcipher following this tutorial http://www.qtcentre.org/wiki/index.p...ndows/MinGW%29 but I couldn't make it work.
    There is another way to add encryption to a sqlite database in symbian?

    Thanks

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: SQLite encrypted database Symbian/QT

    Unfortunately, there's no public domain port of SqlCipher to Symbian (that I know of). I have a port I did for a customer, but can't release it without clearance.

    Porting is non-trivial.

    You can encrypt individual cells, but that's much, much "weaker", and slower as well.

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    15

    Re: SQLite encrypted database Symbian/QT

    but you were able to port the sqlcipher to symbian/qt, and make it work. Right?

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: SQLite encrypted database Symbian/QT

    Yes. It took about a month, looking back at file dates. Plus maybe a couple of weeks prior to that with much time spent studying up on crypto techniques. And I'd already spent a month or so studying Symbian C++, so wasn't totally in the dark there.

    Be aware of the Symbian crypto support here: http://wiki.forum.nokia.com/index.ph...ptography_APIs

  5. #5
    Registered User
    Join Date
    Nov 2010
    Posts
    15

    Re: SQLite encrypted database Symbian/QT

    thanks danhicksbyron, but i think I will take a different path for my project.

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: SQLite encrypted database Symbian/QT

    Quote Originally Posted by rostymartin View Post
    thanks danhicksbyron, but i think I will take a different path for my project.
    For most practical purposes, it should be enough to install/create the database in the application's private directory in phone memory (C-drive) without any encryption. Whether that's enough in your case depends on the case, of course.

  7. #7
    Registered User
    Join Date
    Nov 2010
    Posts
    15

    Re: SQLite encrypted database Symbian/QT

    I don't think that installing the database in the private directory is enough, because with a hacked phone any user can acces to the database. And there is, as far as I know, any device that couldn't be hacked or installed a custom firmware that allows access to the private directory. So to ensure the data protection, the database has to be encrypted.

    If i'm wrong, or there is another way to ensure that the data can be protected, please let me know.

  8. #8
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: SQLite encrypted database Symbian/QT

    In any case you have the problem of storing the key. Do you require the user to re-enter the key on every use?

    Is the data private to the person or private to you? If private to the person then one can assume that if they root their phone they're taking responsibility for the security. (I'm not sure if it's possible to root a phone without deleting applications stored on it.)

  9. #9
    Registered User
    Join Date
    Nov 2010
    Posts
    15

    Re: SQLite encrypted database Symbian/QT

    No, the user doesn't have to know the key.
    The data stored is used by the app to "draw" the info that is showed to the user. But the data by itself, needs to be secure. I'm not sure if this explains very well....

  10. #10
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: SQLite encrypted database Symbian/QT

    Then you have the problem of securely storing the key somewhere -- basically an impossible task, especially on a rooted phone.

  11. #11
    Registered User
    Join Date
    Nov 2010
    Posts
    15

    Re: SQLite encrypted database Symbian/QT

    But if the key is hardcoded in the source code, the key will no be "secure enough"?

  12. #12
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: SQLite encrypted database Symbian/QT

    Quote Originally Posted by rostymartin View Post
    But if the key is hardcoded in the source code, the key will no be "secure enough"?
    Secure enough for a regular user, but not secure for a hacker that wants to get at it. If all copies of your app has the same key, it only needs one hacker to find the key and publish it to the world. See http://en.wikipedia.org/wiki/Jon_Lech_Johansen

  13. #13
    Registered User
    Join Date
    Nov 2010
    Posts
    15

    Re: SQLite encrypted database Symbian/QT

    Ok, you have right. But I think that this will be "secure enough" for my app. Because to get the data is needed a way more "expert user" that to put the DB in the private folder, and let "(almost) any user" can get the data.
    If someone finds a way to encrypt / decript data, please let me know.

  14. #14
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: SQLite encrypted database Symbian/QT

    How much data needs to be protected? If it's only a small amount (out of a larger DB), you can store the critical info as a large blob (or perhaps a separate file) and decrypt it on app start, keeping it in a Qt structure in heap. When the app ends the decrypted data goes away.

  15. #15
    Registered User
    Join Date
    Nov 2010
    Posts
    15

    Re: SQLite encrypted database Symbian/QT

    It's a lot of data. But there is a small amount in each "screen", so what i was thinking in save all encrypted in each row of the DB, an decrypt when I have to work with the data, but the problem is that I cannot find a way to encrypt / decrypt data in Symbian phones, I tried SymbianCryptographyLibraries but I cannot make it work in Qt Creator :s

Similar Threads

  1. Add existing Sqlite database to Qt project
    By santijdelatorre in forum Qt
    Replies: 31
    Last Post: 2011-05-15, 01:20
  2. how to use encrypted database ...??
    By kalgi in forum Symbian
    Replies: 2
    Last Post: 2010-12-07, 09:02
  3. sqlite database on symbian devices
    By simmik in forum Symbian
    Replies: 2
    Last Post: 2007-05-17, 13:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •