SQLCipher 4.21.0 and 5.0.0-rc Release

2026-12-01 07:00:00 -0500

We’re pleased to announce the following releases:

  • SQLCipher 4.21.0, which is a maintenance release for SQLCipher 4
  • SQLCipher 5.0.0-rc, which is a release candidate for SQLCipher 5

We anticipate that 4.21.0 will likely be the final release of SQLCipher 4, so developers should begin evaluating SQLCipher 5 if they haven’t done so already.

SQLCipher 4.21.0

The following important changes are included with SQLCipher 4.21.0:

  • Fixes a rare cache corruption where rollback of a schema change could cause statements to fail with SQLITE_CORRUPT even though the database is intact
  • Allows initialization using the SQLITE_EXTRA_INIT_MUTEXED macro to avoid a race condition between concurrent connections
  • Blocks when there is a page size mismatch between a plaintext header and the current SQLCipher context
  • Blocks PRAGMA cipher_migrate when the main database is read-only
  • Keeps URI parameters when cipher_migrate reopens the main database
  • Skips automatic cleanup when keyed connections remain open at process exit
  • When using VFS database file preallocation, SQLCipher generates the random salt when the first page is encrypted, prior to a read operation
  • Raises the minimum watchOS version to 9.0 for Xcode 27 compatibility

SQLCipher for Android Changes

  • Adds WAL mode configuration to the SQLCipherDriver constructor. The new enableWriteAheadLogging argument allows opening a WAL mode database directly, without switching to DELETE mode first.
  • Rolls back transactions when a COMMIT fails before the connection is returned to the connection pool
  • Limits use of the primary connections for read operations once secondary connections are opened in WAL mode
  • Fixes beginTransactionReadOnly() to use BEGIN DEFFERRED instead of BEGIN EXCLUSIVE

SQLCipher Commercial & Enterprise

SQLCipher Commercial and Enterprise packages include the following enhancements:

  • Takes advantage of new mutexed initialization
  • Updates SQLCipher for JDBC to upstream sqlite-jdbc release 3.54.1.0

Cryptographic Provider Matrix

The table below summarizes the cryptographic providers used across packages and platforms:

Edition Platform Cryptographic Provider
Community (non-FIPS) Android based on LibTomCrypt 1.18.2
Community (non-FIPS) Apple Common Crypto (version varies by OS)
Commercial & Enterprise (non-FIPS) Apple Common Crypto (version varies by OS)
Commercial & Enterprise (non-FIPS) Other Platforms OpenSSL 3.5.9 LTS
Enterprise FIPS All Platforms SQLCipher Cryptographic Module
Based on OpenSSL 3.5.9 LTS

SQLCipher 5.0.0-rc

WARNING: This should only be used for testing at this time, not in production. It includes major functional, API, and behavioral changes that are NOT COMPATIBLE with SQLCipher 4 and earlier by default.

To recap, SQLCipher 5 includes AEAD encryption (AES-256-GCM), an 8192 byte default page size, and expanded PRAGMA rekey support for converting plaintext databases to encrypted, and vice versa. See the SQLCipher 5.0.0-beta announcement and SQLCipher 5.0.0-beta.1 announcement for additional details.

Changes Between 5.0.0-beta.1 and 5.0.0-rc

SQLCipher 5.0.0-rc includes all the changes from SQLCipher 4.21.0, plus the following:

  • Refuses keying operations in an active transaction and places the database into a permanent error state
  • Normalizes errors returned by sqlcipher_process_page to satisfy pager requirements
  • Adjusts the error reported when the first page fails to decrypt after the key has already been used, reporting SQLITE_CORRUPT instead of SQLITE_NOTADB
  • Fixes plaintext-to-encrypted rekey so it works when other databases are attached

IMPORTANT NOTE: This release contains API, ABI, and library behavioral changes. Library integrators that manage SONAME are advised to update the version at build time using -soname or ./configure --soname for this release.

SQLCipher Commercial & Enterprise

SQLCipher Commercial and Enterprise packages for 5.0.0-rc include the following enhancements, in addition to the 4.21.0 changes:

  • Modernizes all .NET packages to use .NET 10 LTS
  • Drops legacy Xamarin support for iOS .NET and Android .NET packages (now using net10.0-ios15.0 / net10.0-android21.0)

Compatibility and Migration

The default v5 database settings are not backwards-compatible with SQLCipher 4 databases. Application code changes are required to take advantage of the new defaults. To open or migrate existing databases, see the 5.0.0-beta.1 announcement for the full list of options, including PRAGMA cipher_migrate, PRAGMA cipher_compatibility, PRAGMA cipher_default_compatibility, and PRAGMA rekey.

Upgrading and Availability

SQLCipher 4.21.0

SQLCipher 4.21.0 is available now. As always, please test your applications thoroughly with the new version before deploying to production.

Commercial and Enterprise - On-demand access to new releases of SQLCipher packages are available to all licensees with an active subscription from the Customer Downloads fulfillment site. Subscribers will also receive a separate email notification regarding the update and can contact us at any time for private support directly from the SQLCipher development team. Commercial and Enterprise edition upgrades require a new license code from the SQLCipher fulfillment site for each version. Don’t forget to change the license code in your application(s) when you upgrade.

Community Edition - SQLCipher Community Edition source code is available on GitHub, via AAR packaging for Android, and Swift Package Manager for Apple platforms.

SQLCipher 5.0.0-rc

SQLCipher 5.0.0-rc is available for download starting today, separate from the existing SQLCipher 4 releases, so you can test in parallel with your current deployment.

Commercial and Enterprise - Your organization will find the new release candidate packages on the “Prerelease” tab of the Customer Downloads fulfillment site. Don’t forget to update the license code in your application(s) when you upgrade!

Community Edition - Source for SQLCipher 5.0.0-rc is available at the main repository tag on GitHub. SQLCipher for Apple is available from the SQLCipher.swift tag. SQLCipher for Android is available as source or a downloadable AAR package from the SQLCipher Android tag.

We recommend testing this release candidate thoroughly to prepare applications and identify potential upgrade issues. For the time being, please direct feedback and questions regarding 5.0.0-rc to support@zetetic.net so all issues are reported in one place.

For feedback and questions, please visit our Community Forum or private support channels. Thank you for using SQLCipher!