Where can see the encrypted data in db after encrypting db using the SQLCipher?


#1

Using the SQLCipher am able to encrypt the db. When i open the db it is asking the password, once enter the password am able to see the decrypted data. Where i can see the encrypted data.


#2

Hello @Malyadri

We have already responded to your private support inquiry, but in case you see this first I will provide an answer here as well. To view the raw contents of an encrypted database file, you will first need to retrieve the database file from the device/machine the file exists on. Next, you can run a tool called hexdump which will display the raw file content in formatted in hexadecimal. Here is an example:

hexdump -C YourDatabase.db

You can find more information regarding the SQLCipher design here. Thanks!


Where to see the database Encrypted file using sqlcipher Encryption in Android and IOS
#3

Hi,
We are asking about path of Encrypted file where it will store.we are able to see decrypted file after enter the password.please provide solution on this


#4

Hi @Usharani

SQLCipher decrypts the contents of the file in memory to resolve the results of a SQL query, it does not create a new file with decrypted content. The location of the database itself will vary by the platform that you target and where your application stores it. If you haven’t had the opportunity, you might consider reviewing our design page covering many of the technical details to SQLCipher. Thanks!


#5

Thank you. Can i run this command through Terminal?


#6

Thank you.
In SQLCipher site they mentioned temporary files will generate .
Where exactly the temporary will generate.when we run out application temporary files not generated.could you share the path where it will generate.


#7

Hi @Malyadri

Thank you. Can i run this command through Terminal?

Yes, as long as your terminal application has hexdump on the PATH environment variable.


#8

Hi @Usharani

The temporary files will be generated within the same directory the database file exists within. As the are temporary, you will not always see them, however inserting data into the database within a transaction will create a temporary journal file until the transaction is completed.


After encrypting the Db using the SQLCipher, every time password is required to open the database?
#9

Thank you.

  1. What is the best database page size?
  2. Is SQLCipher Performance same for Xamarin.Android like Xamarin.IOS.

#10

Hi @Usharani

This question was recently answered here:

The performance between iOS and Android will vary depending on many factors including the hardware which is different. I recently pointed @Malyadri to our general SQLCipher Performance guidance, I would recommend you review.


#11

The default algorithm is 256-bit AES in CBC mode (cipher and mode can be changed at run time via PRAGMA cipher, though only when using a cryptography provider that supports multiple ciphers, i.e. OpenSSL).
Could you please explain above point clearly


#12

Each database page is encrypted and decrypted individually. The default page size is 1024 bytes but this can be adjusted at runtime to improve performance for certain query types.

This also Could please explain above point clearly.


#13

Hi @Usharani

SQLCipher uses crypto providers to provide cryptographic primitives within the library. The default cipher used by the library across all commercial and enterprise platforms in currently AES-256 in CBC mode). Please note that we have deprecated the PRAGMA cipher command which allows runtime adjustment of the cipher used, this feature will be going away in a future SQLCipher release. You can read more about the AES cipher here.


#14

Hi @Usharani

The database page is the unit of encryption that occurs within SQLCipher. We provide a PRAGMA that allows this page size to be adjusted. You can read more about this setting here.