SQLite security?

LightStampLightStamp USMember, University

I'm coming from a SQL Server Compact Windows world. I've got an app I'm thinking of writing an Apple version and it looks like SQLite is the replacement for my SDF databases. I'm able to password encrypt my SDF databases. Can the SQLite dbs be encrypted too?

TIA
Harry

Posts

  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    As far as I know it is not possible out of the box to encrypt a sqlite database file. But there are components from http://sqlcipher.net/ available.

  • AndyFlisherAndyFlisher GBBeta, University ✭✭✭

    Not definitive, but my research backs up @sebastian, SqlCipher is also available for windows phone too so there's a full range of mobile libraries for all platforms if you go beyond ios

  • StephenHauckStephenHauck USMember ✭✭✭

    Do you want to encrypt your data that the application uses or the users data or both?
    You can implement simple encryption in your data access classes quite easily using the devices unique id or something as the key.
    All I can advise is don't worry too much about protection because if they really want the data they will get it.

  • LightStampLightStamp USMember, University

    Stephen,

    I'm think mostly about the database itself. If the database is moved I don't want it easily readable.

  • StephenHauckStephenHauck USMember ✭✭✭

    Simply base64 encode your data or even encrypt it in your model classes using the unique ID of the device ....this will affect performance.

  • NinineaNininea USUniversity ✭✭✭

    Can you give use some examples?

  • NinineaNininea USUniversity ✭✭✭

    Can you give us some examples?

  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    Base64 encoding is not a way to secure anything. Encrypting everything in code may heavily effect your apps performance. Take a look at the SqlCipher and give it a try.

  • NinineaNininea USUniversity ✭✭✭

    I found out xamarin component for android https://www.zetetic.net/sqlcipher/sqlcipher-for-xamarin/ ..

    Also there is free version for android in github. Is it possible to use this for xamarin (with binding libraries or something like that )?

  • NinineaNininea USUniversity ✭✭✭

    I found out xamarin component for android https://www.zetetic.net/sqlcipher/sqlcipher-for-xamarin/ ..

    Also there is free version for android in github. Is it possible to use this for xamarin (with binding libraries or something like that )?

  • cristophcristoph ROMember, Beta

    You can use now CryptonorDB, it is designed with privacy in mind: it encrypts data before it's stored and decrypted just before it's used. The encryption key is managed by you.

Sign In or Register to comment.