SQLCipher Evaluation Checklist

Prospective users often ask how SQLCipher compares to other SQLite encryption extensions. Rather than publish head-to-head claims, we provide this checklist so that anyone evaluating an encrypted database can ask the same questions of every vendor they consider, including us. SQLCipher was implemented as a clean-room design, and we do not have first-hand experience with competing products.

Vendor Evaluation Checklist

Use the questions below to assess the maturity, security, and support depth of any encrypted SQLite solution. The right-hand column documents where SQLCipher stands today, as a reference point for what a thorough answer looks like. Take the same questions to any alternative you evaluate and compare the answers side by side.

Question SQLCipher (Zetetic)
Maturity and Adoption  
How long has the product been around? More than 15 years with continuous releases and a public changelog
How widely is it deployed? Hundreds of millions of installs across thousands of organizations, approaching billions
How often are new releases made available? 3-6 releases each year with new features, upstream changes, and clear release notes
Are new releases validated against upstream SQLite? Yes, every release is validated against upstream changes
Is performance an implementation priority or an afterthought? Performance is a core priority with tuning, profiling, and benchmarks in each release
Trust and Quality  
Is the product supported by a company or a single person? SQLCipher is supported by Zetetic, by the actual developers of SQLCipher
How many other companies use and trust the solution? Thousands of organizations across every industry, ranging from small development shops to large regulated companies and government agencies
Does the product have a test suite that verifies published features? Yes, SQLCipher has an extensive unit test suite and automated platform-specific test suites
Has the product been peer reviewed by security researchers? Yes, SQLCipher has an open source core with long-term community and customer scrutiny by trusted security researchers
Packages and Platforms  
Are prebuilt packages provided or do you have to compile everything yourself? Zetetic supplies prebuilt, fully supported packages for all listed platforms
Is the product actually tested on every supported platform? Yes, platform-specific binaries are built and tested for every supported deployment target and architecture
Does the vendor have development experience on the platforms you use? Yes, Zetetic specializes in native development across mobile, desktop, and .NET platforms
Security and Compliance  
Are FIPS 140-3 versions available? Yes, Enterprise FIPS packages are available with a validated cryptographic module to support US Government Agencies and FedRAMP requirements
Does the implementation use well-established encryption standards? Yes, SQLCipher uses AES-256-CBC, HMAC, PBKDF2, random salts, and authenticated encryption by default
Does the product perform key derivation to prevent brute force attacks? Yes, PBKDF2 by default with tuning and raw-key options when appropriate
Does the product use random salts to secure against dictionary attacks? Yes, per-database salts by default
Does the product allow customization of security features to match your threat model? Yes, via PRAGMA statements for HMAC, KDF iterations, page size, secure delete, memory security, and more
Are memory protections in place? Memory locking, shielding of sensitive data, wiping after use, optional full memory security
Support and Procurement  
Does licensing include high-priority commercial support? Commercial includes priority support, Enterprise adds SLA-backed response times
Can the vendor handle your legal and procurement processes? The Enterprise program supports POs, custom terms, multi-year, and co-termed agreements
Do packages come with sensible example applications? Yes, each package includes reference apps

Take this list to every vendor under consideration and ask them to answer with evidence. SQLCipher covers each of these areas today, and you should expect the same from any alternative you evaluate.

Fair Performance Testing Checklist

Benchmarks can mislead buyers because different encryption products enable different security features by default. Before concluding that one product is faster than another, make sure you are measuring the same work. SQLCipher enables several security features by default that other implementations may not; when running a benchmark, either disable these features in SQLCipher to match, or enable equivalent protection in the other product, so that both are tested under equivalent conditions.

  • Key Derivation: Use PRAGMA key = "x'...'"; (RAW key) to skip PBKDF2 when the other implementation does not perform key derivation
  • HMAC Validation: Use PRAGMA cipher_use_hmac = OFF; when the other implementation does not protect pages against tampering
  • Secure Delete: Use PRAGMA secure_delete = OFF; when the other implementation does not enable secure delete by default
  • Page Size: Use PRAGMA cipher_page_size = N; to match the page size of the other implementation

Detailed explanations of each factor follow.

Key Derivation

SQLCipher uses an expensive key derivation process (PBKDF2) to derive the actual encryption key from the provided key material and a random per-database salt. This security feature hardens SQLCipher databases against brute force, dictionary, and pre-computation attacks. However, this key derivation process is deliberately very slow, and it occurs on the first access of the database after the key is set. When benchmarking against an implementation that does not perform key derivation, it will appear faster than SQLCipher simply because it is skipping this work. To isolate key derivation from the comparison, set a test key using the RAW key semantics, e.g. PRAGMA key = "x'2DD29CA851E7B56E4697B0E1F08507293D761A05CE4D1B628663F411A8086D99'";, so SQLCipher skips key derivation. Make sure to disable key derivation before benchmarking against implementations that do not offer this security feature.

Page Data Validation (MAC)

SQLCipher implements an additional security feature where each page’s data is protected by an HMAC “signature”, such that if any page data is modified externally or resequenced SQLCipher will detect the invalid change when the page is read back. This validation involves additional processing overhead whenever pages are read or written. For testing purposes you can disable HMAC for a SQLCipher database using PRAGMA cipher_use_hmac = OFF; after setting the key, but before using the database. Disable HMAC to match implementations that do not provide page data validation or tamper evidence.

Secure Delete

SQLCipher enables secure delete by default as a security feature. Secure delete reduces the chance of forensic recovery of deleted data, but it is time consuming because it requires every deleted page to be written to disk. Standard SQLite and many other encryption implementations have secure delete disabled by default. For testing purposes you can disable secure delete using PRAGMA secure_delete = OFF; after setting the key, but before using the database. Disable secure delete to match implementations that don’t enable this feature by default.

Page Size

SQLCipher uses a default page size of 4096 bytes for encrypted databases. Depending on the structure of a database, page size can have a significant effect on performance, particularly if another product is using a different page size. SQLCipher allows you to change the page size via PRAGMA cipher_page_size. A smaller page size typically performs well for operations that affect a small amount of data, because less information must be encrypted or decrypted to satisfy a statement. A larger page size can be more efficient when statements operate on large amounts of data, due to a lower number of overall operations. Determining the best page size for production is an application-specific tuning exercise, but when benchmarking, make sure the same page size is used by every implementation under test. Match page sizes across implementations to ensure an accurate comparison.

FIPS Validation

Many encrypted SQLite solutions, including all versions of SQLCipher, use FIPS-approved algorithms such as AES-256, SHA-256, and HMAC-SHA-256. However, using FIPS-approved algorithms is not the same as FIPS validation. FIPS validation requires a cryptographic module to undergo rigorous testing and formal validation by an accredited laboratory under the Cryptographic Module Validation Program (CMVP). If FIPS 140-3 compliance is a requirement in your environment, confirm that each vendor under consideration ships a validated cryptographic module, not only that they use approved algorithms. For more information about SQLCipher’s FIPS offering, see the SQLCipher FIPS page.

Understanding SQLCipher’s Encryption Model

SQLCipher encrypts and decrypts the database on a per page basis, but only as needed. If only a few pages are needed to execute a statement, only those pages are in scope. You can see more details on the design page.

When you set a key using PRAGMA key, it does not immediately encrypt or decrypt the entire database file. The key provides the password to be used within PBKDF2 to derive your encryption key (unless you provide a raw key format). Encryption and decryption is deferred until the execution of a SQL command.

Learn More

  • SQLCipher Design - Learn about SQLCipher’s design, security features, and how encryption / decryption works
  • SQLCipher API - Detailed information about the SQLCipher Pragmas and C / C++ API
  • SQLCipher Performance Optimization - Learn how to get blazing-fast speed from SQLCipher and minimize the impact of encryption