From 3216f4ac148e73d07156eb171a3aa8ead466a102 Mon Sep 17 00:00:00 2001 From: Stephen Lombardo Date: Wed, 9 Sep 2026 11:54:15 -0400 Subject: [PATCH 1/9] Update LibTomCrypt to use v2026.09.09 tag --- sqlcipher/src/main/jni/libtomcrypt/Android.mk | 197 +++++++++++++++--- sqlcipher/src/main/jni/libtomcrypt/src | 2 +- 2 files changed, 172 insertions(+), 27 deletions(-) diff --git a/sqlcipher/src/main/jni/libtomcrypt/Android.mk b/sqlcipher/src/main/jni/libtomcrypt/Android.mk index 52c9a88..dadfbd7 100644 --- a/sqlcipher/src/main/jni/libtomcrypt/Android.mk +++ b/sqlcipher/src/main/jni/libtomcrypt/Android.mk @@ -15,12 +15,16 @@ src/notes/rsa-testvectors/pkcs1v15crypt-vectors.c \ src/notes/rsa-testvectors/pkcs1v15sign-vectors.c \ src/notes/rsa-testvectors/pss-vect.c \ src/src/ciphers/aes/aes.c \ +src/src/ciphers/aes/aes_desc.c \ +src/src/ciphers/aes/aesni.c \ src/src/ciphers/aes/aes_tab.c \ src/src/ciphers/anubis.c \ +src/src/ciphers/aria.c \ src/src/ciphers/blowfish.c \ src/src/ciphers/camellia.c \ src/src/ciphers/cast5.c \ src/src/ciphers/des.c \ +src/src/ciphers/idea.c \ src/src/ciphers/kasumi.c \ src/src/ciphers/khazad.c \ src/src/ciphers/kseed.c \ @@ -32,7 +36,10 @@ src/src/ciphers/rc6.c \ src/src/ciphers/safer/safer.c \ src/src/ciphers/safer/saferp.c \ src/src/ciphers/safer/safer_tab.c \ +src/src/ciphers/serpent.c \ src/src/ciphers/skipjack.c \ +src/src/ciphers/sm4.c \ +src/src/ciphers/tea.c \ src/src/ciphers/twofish/twofish.c \ src/src/ciphers/twofish/twofish_tab.c \ src/src/ciphers/xtea.c \ @@ -71,6 +78,8 @@ src/src/encauth/gcm/gcm_mult_h.c \ src/src/encauth/gcm/gcm_process.c \ src/src/encauth/gcm/gcm_reset.c \ src/src/encauth/gcm/gcm_test.c \ +src/src/encauth/gcm_siv/gcm_siv.c \ +src/src/encauth/gcm_siv/gcm_siv_test.c \ src/src/encauth/ocb3/ocb3_add_aad.c \ src/src/encauth/ocb3/ocb3_decrypt.c \ src/src/encauth/ocb3/ocb3_decrypt_last.c \ @@ -83,19 +92,10 @@ src/src/encauth/ocb3/ocb3_init.c \ src/src/encauth/ocb3/ocb3_int_ntz.c \ src/src/encauth/ocb3/ocb3_int_xor_blocks.c \ src/src/encauth/ocb3/ocb3_test.c \ -src/src/encauth/ocb/ocb_decrypt.c \ -src/src/encauth/ocb/ocb_decrypt_verify_memory.c \ -src/src/encauth/ocb/ocb_done_decrypt.c \ -src/src/encauth/ocb/ocb_done_encrypt.c \ -src/src/encauth/ocb/ocb_encrypt_authenticate_memory.c \ -src/src/encauth/ocb/ocb_encrypt.c \ -src/src/encauth/ocb/ocb_init.c \ -src/src/encauth/ocb/ocb_ntz.c \ -src/src/encauth/ocb/ocb_shift_xor.c \ -src/src/encauth/ocb/ocb_test.c \ -src/src/encauth/ocb/s_ocb_done.c \ +src/src/encauth/siv/siv.c \ src/src/hashes/blake2b.c \ src/src/hashes/blake2s.c \ +src/src/hashes/blake3.c \ src/src/hashes/chc/chc.c \ src/src/hashes/helper/hash_file.c \ src/src/hashes/helper/hash_filehandle.c \ @@ -109,14 +109,29 @@ src/src/hashes/rmd160.c \ src/src/hashes/rmd256.c \ src/src/hashes/rmd320.c \ src/src/hashes/sha1.c \ +src/src/hashes/sha1_desc.c \ +src/src/hashes/sha1_x86.c \ src/src/hashes/sha2/sha224.c \ +src/src/hashes/sha2/sha224_desc.c \ +src/src/hashes/sha2/sha224_x86.c \ src/src/hashes/sha2/sha256.c \ +src/src/hashes/sha2/sha256_desc.c \ +src/src/hashes/sha2/sha256_x86.c \ src/src/hashes/sha2/sha384.c \ +src/src/hashes/sha2/sha384_desc.c \ +src/src/hashes/sha2/sha384_x86.c \ src/src/hashes/sha2/sha512_224.c \ +src/src/hashes/sha2/sha512_224_desc.c \ +src/src/hashes/sha2/sha512_224_x86.c \ src/src/hashes/sha2/sha512_256.c \ +src/src/hashes/sha2/sha512_256_desc.c \ +src/src/hashes/sha2/sha512_256_x86.c \ src/src/hashes/sha2/sha512.c \ +src/src/hashes/sha2/sha512_desc.c \ +src/src/hashes/sha2/sha512_x86.c \ src/src/hashes/sha3.c \ src/src/hashes/sha3_test.c \ +src/src/hashes/sm3.c \ src/src/hashes/tiger.c \ src/src/hashes/whirl/whirl.c \ src/src/hashes/whirl/whirltab.c \ @@ -144,6 +159,11 @@ src/src/mac/hmac/hmac_memory.c \ src/src/mac/hmac/hmac_memory_multi.c \ src/src/mac/hmac/hmac_process.c \ src/src/mac/hmac/hmac_test.c \ +src/src/mac/kmac/kmac.c \ +src/src/mac/kmac/kmac_file.c \ +src/src/mac/kmac/kmac_memory.c \ +src/src/mac/kmac/kmac_memory_multi.c \ +src/src/mac/kmac/kmac_test.c \ src/src/mac/omac/omac_done.c \ src/src/mac/omac/omac_file.c \ src/src/mac/omac/omac_init.c \ @@ -184,10 +204,18 @@ src/src/math/rand_bn.c \ src/src/math/rand_prime.c \ src/src/math/tfm_desc.c \ src/src/misc/adler32.c \ +src/src/misc/algname_match.c \ +src/src/misc/argon2/argon2.c \ +src/src/misc/base16/base16_decode.c \ +src/src/misc/base16/base16_encode.c \ +src/src/misc/base32/base32_decode.c \ +src/src/misc/base32/base32_encode.c \ src/src/misc/base64/base64_decode.c \ src/src/misc/base64/base64_encode.c \ +src/src/misc/bcrypt/bcrypt.c \ src/src/misc/burn_stack.c \ src/src/misc/compare_testvector.c \ +src/src/misc/copy_or_zeromem.c \ src/src/misc/crc32.c \ src/src/misc/crypt/crypt_argchk.c \ src/src/misc/crypt/crypt.c \ @@ -220,14 +248,29 @@ src/src/misc/crypt/crypt_sizes.c \ src/src/misc/crypt/crypt_unregister_cipher.c \ src/src/misc/crypt/crypt_unregister_hash.c \ src/src/misc/crypt/crypt_unregister_prng.c \ +src/src/misc/deprecated.c \ src/src/misc/error_to_string.c \ src/src/misc/hkdf/hkdf.c \ src/src/misc/hkdf/hkdf_test.c \ src/src/misc/mem_neq.c \ +src/src/misc/padding/padding_depad.c \ +src/src/misc/padding/padding_pad.c \ +src/src/misc/password_free.c \ +src/src/misc/pbes/pbes1.c \ +src/src/misc/pbes/pbes2.c \ +src/src/misc/pbes/pbes.c \ +src/src/misc/pem/pem.c \ +src/src/misc/pem/pem_pkcs.c \ +src/src/misc/pem/pem_read.c \ +src/src/misc/pem/pem_ssh.c \ +src/src/misc/pkcs12/pkcs12_kdf.c \ +src/src/misc/pkcs12/pkcs12_utf8_to_utf16.c \ src/src/misc/pkcs5/pkcs_5_1.c \ src/src/misc/pkcs5/pkcs_5_2.c \ src/src/misc/pkcs5/pkcs_5_test.c \ -src/src/misc/pk_get_oid.c \ +src/src/misc/scrypt/scrypt.c \ +src/src/misc/ssh/ssh_decode_sequence_multi.c \ +src/src/misc/ssh/ssh_encode_sequence_multi.c \ src/src/misc/zeromem.c \ src/src/modes/cbc/cbc_decrypt.c \ src/src/modes/cbc/cbc_done.c \ @@ -288,6 +331,16 @@ src/src/pk/asn1/der/boolean/der_decode_boolean.c \ src/src/pk/asn1/der/boolean/der_encode_boolean.c \ src/src/pk/asn1/der/boolean/der_length_boolean.c \ src/src/pk/asn1/der/choice/der_decode_choice.c \ +src/src/pk/asn1/der/custom_type/der_decode_custom_type.c \ +src/src/pk/asn1/der/custom_type/der_encode_custom_type.c \ +src/src/pk/asn1/der/custom_type/der_length_custom_type.c \ +src/src/pk/asn1/der/general/der_asn1_maps.c \ +src/src/pk/asn1/der/general/der_decode_asn1_identifier.c \ +src/src/pk/asn1/der/general/der_decode_asn1_length.c \ +src/src/pk/asn1/der/general/der_encode_asn1_identifier.c \ +src/src/pk/asn1/der/general/der_encode_asn1_length.c \ +src/src/pk/asn1/der/general/der_length_asn1_identifier.c \ +src/src/pk/asn1/der/general/der_length_asn1_length.c \ src/src/pk/asn1/der/generalizedtime/der_decode_generalizedtime.c \ src/src/pk/asn1/der/generalizedtime/der_encode_generalizedtime.c \ src/src/pk/asn1/der/generalizedtime/der_length_generalizedtime.c \ @@ -309,10 +362,9 @@ src/src/pk/asn1/der/printable_string/der_length_printable_string.c \ src/src/pk/asn1/der/sequence/der_decode_sequence_ex.c \ src/src/pk/asn1/der/sequence/der_decode_sequence_flexi.c \ src/src/pk/asn1/der/sequence/der_decode_sequence_multi.c \ -src/src/pk/asn1/der/sequence/der_decode_subject_public_key_info.c \ src/src/pk/asn1/der/sequence/der_encode_sequence_ex.c \ src/src/pk/asn1/der/sequence/der_encode_sequence_multi.c \ -src/src/pk/asn1/der/sequence/der_encode_subject_public_key_info.c \ +src/src/pk/asn1/der/sequence/der_flexi_sequence_cmp.c \ src/src/pk/asn1/der/sequence/der_length_sequence.c \ src/src/pk/asn1/der/sequence/der_sequence_free.c \ src/src/pk/asn1/der/sequence/der_sequence_shrink.c \ @@ -329,6 +381,17 @@ src/src/pk/asn1/der/utctime/der_length_utctime.c \ src/src/pk/asn1/der/utf8/der_decode_utf8_string.c \ src/src/pk/asn1/der/utf8/der_encode_utf8_string.c \ src/src/pk/asn1/der/utf8/der_length_utf8_string.c \ +src/src/pk/asn1/oid/pk_get.c \ +src/src/pk/asn1/oid/pk_oid_cmp.c \ +src/src/pk/asn1/oid/pk_oid_str.c \ +src/src/pk/asn1/pkcs8/pkcs8_decode_flexi.c \ +src/src/pk/asn1/pkcs8/pkcs8_get.c \ +src/src/pk/asn1/x509/x509_decode_public_key_from_certificate.c \ +src/src/pk/asn1/x509/x509_decode_spki.c \ +src/src/pk/asn1/x509/x509_decode_subject_public_key_info.c \ +src/src/pk/asn1/x509/x509_encode_subject_public_key_info.c \ +src/src/pk/asn1/x509/x509_get_pka.c \ +src/src/pk/asn1/x509/x509_import_spki.c \ src/src/pk/dh/dh.c \ src/src/pk/dh/dh_check_pubkey.c \ src/src/pk/dh/dh_export.c \ @@ -336,6 +399,7 @@ src/src/pk/dh/dh_export_key.c \ src/src/pk/dh/dh_free.c \ src/src/pk/dh/dh_generate_key.c \ src/src/pk/dh/dh_import.c \ +src/src/pk/dh/dh_import_pkcs8.c \ src/src/pk/dh/dh_set.c \ src/src/pk/dh/dh_set_pg_dhparam.c \ src/src/pk/dh/dh_shared_secret.c \ @@ -346,6 +410,8 @@ src/src/pk/dsa/dsa_free.c \ src/src/pk/dsa/dsa_generate_key.c \ src/src/pk/dsa/dsa_generate_pqg.c \ src/src/pk/dsa/dsa_import.c \ +src/src/pk/dsa/dsa_import_pkcs8.c \ +src/src/pk/dsa/dsa_init.c \ src/src/pk/dsa/dsa_make_key.c \ src/src/pk/dsa/dsa_set.c \ src/src/pk/dsa/dsa_set_pqg_dsaparam.c \ @@ -353,22 +419,55 @@ src/src/pk/dsa/dsa_shared_secret.c \ src/src/pk/dsa/dsa_sign_hash.c \ src/src/pk/dsa/dsa_verify_hash.c \ src/src/pk/dsa/dsa_verify_key.c \ +src/src/pk/ec25519/ec25519_crypto_ctx.c \ +src/src/pk/ec25519/ec25519_export.c \ +src/src/pk/ec25519/ec25519_import_pkcs8.c \ +src/src/pk/ec25519/tweetnacl.c \ +src/src/pk/ec448/ec448_common.c \ +src/src/pk/ec448/ec448_crypto_ctx.c \ +src/src/pk/ec448/ec448_export.c \ +src/src/pk/ec448/ec448_import_pkcs8.c \ src/src/pk/ecc/ecc_ansi_x963_export.c \ src/src/pk/ecc/ecc_ansi_x963_import.c \ src/src/pk/ecc/ecc.c \ src/src/pk/ecc/ecc_decrypt_key.c \ src/src/pk/ecc/ecc_encrypt_key.c \ src/src/pk/ecc/ecc_export.c \ +src/src/pk/ecc/ecc_export_openssl.c \ +src/src/pk/ecc/ecc_find_curve.c \ src/src/pk/ecc/ecc_free.c \ +src/src/pk/ecc/ecc_get_key.c \ +src/src/pk/ecc/ecc_get_oid_str.c \ src/src/pk/ecc/ecc_get_size.c \ src/src/pk/ecc/ecc_import.c \ +src/src/pk/ecc/ecc_import_openssl.c \ +src/src/pk/ecc/ecc_import_pkcs8.c \ +src/src/pk/ecc/ecc_import_x509.c \ src/src/pk/ecc/ecc_make_key.c \ +src/src/pk/ecc/ecc_recover_key.c \ +src/src/pk/ecc/ecc_rfc6979_key.c \ +src/src/pk/ecc/ecc_set_curve.c \ +src/src/pk/ecc/ecc_set_curve_internal.c \ +src/src/pk/ecc/ecc_set_key.c \ src/src/pk/ecc/ecc_shared_secret.c \ src/src/pk/ecc/ecc_sign_hash.c \ +src/src/pk/ecc/ecc_sign_hash_eth27.c \ +src/src/pk/ecc/ecc_sign_hash_internal.c \ +src/src/pk/ecc/ecc_sign_hash_rfc5656.c \ +src/src/pk/ecc/ecc_sign_hash_rfc7518.c \ +src/src/pk/ecc/ecc_sign_hash_x962.c \ src/src/pk/ecc/ecc_sizes.c \ -src/src/pk/ecc/ecc_test.c \ +src/src/pk/ecc/ecc_ssh_ecdsa_encode_name.c \ src/src/pk/ecc/ecc_verify_hash.c \ -src/src/pk/ecc/ltc_ecc_is_valid_idx.c \ +src/src/pk/ecc/ecc_verify_hash_eth27.c \ +src/src/pk/ecc/ecc_verify_hash_internal.c \ +src/src/pk/ecc/ecc_verify_hash_rfc5656.c \ +src/src/pk/ecc/ecc_verify_hash_rfc7518.c \ +src/src/pk/ecc/ecc_verify_hash_x962.c \ +src/src/pk/ecc/ltc_ecc_export_point.c \ +src/src/pk/ecc/ltc_ecc_import_point.c \ +src/src/pk/ecc/ltc_ecc_is_point_at_infinity.c \ +src/src/pk/ecc/ltc_ecc_is_point.c \ src/src/pk/ecc/ltc_ecc_map.c \ src/src/pk/ecc/ltc_ecc_mul2add.c \ src/src/pk/ecc/ltc_ecc_mulmod.c \ @@ -376,13 +475,24 @@ src/src/pk/ecc/ltc_ecc_mulmod_timing.c \ src/src/pk/ecc/ltc_ecc_points.c \ src/src/pk/ecc/ltc_ecc_projective_add_point.c \ src/src/pk/ecc/ltc_ecc_projective_dbl_point.c \ -src/src/pk/katja/katja_decrypt_key.c \ -src/src/pk/katja/katja_encrypt_key.c \ -src/src/pk/katja/katja_export.c \ -src/src/pk/katja/katja_exptmod.c \ -src/src/pk/katja/katja_free.c \ -src/src/pk/katja/katja_import.c \ -src/src/pk/katja/katja_make_key.c \ +src/src/pk/ecc/ltc_ecc_verify_key.c \ +src/src/pk/ed25519/ed25519_export.c \ +src/src/pk/ed25519/ed25519_import.c \ +src/src/pk/ed25519/ed25519_import_pkcs8.c \ +src/src/pk/ed25519/ed25519_import_raw.c \ +src/src/pk/ed25519/ed25519_import_x509.c \ +src/src/pk/ed25519/ed25519_make_key.c \ +src/src/pk/ed25519/ed25519_sign.c \ +src/src/pk/ed25519/ed25519_verify.c \ +src/src/pk/ed448/ed448_export.c \ +src/src/pk/ed448/ed448_import.c \ +src/src/pk/ed448/ed448_import_pkcs8.c \ +src/src/pk/ed448/ed448_import_raw.c \ +src/src/pk/ed448/ed448_import_x509.c \ +src/src/pk/ed448/ed448_make_key.c \ +src/src/pk/ed448/ed448_sign.c \ +src/src/pk/ed448/ed448_verify.c \ +src/src/pk/pka_key.c \ src/src/pk/pkcs1/pkcs_1_i2osp.c \ src/src/pk/pkcs1/pkcs_1_mgf1.c \ src/src/pk/pkcs1/pkcs_1_oaep_decode.c \ @@ -396,16 +506,30 @@ src/src/pk/rsa/rsa_decrypt_key.c \ src/src/pk/rsa/rsa_encrypt_key.c \ src/src/pk/rsa/rsa_export.c \ src/src/pk/rsa/rsa_exptmod.c \ -src/src/pk/rsa/rsa_free.c \ src/src/pk/rsa/rsa_get_size.c \ src/src/pk/rsa/rsa_import.c \ src/src/pk/rsa/rsa_import_pkcs8.c \ src/src/pk/rsa/rsa_import_x509.c \ +src/src/pk/rsa/rsa_key.c \ src/src/pk/rsa/rsa_make_key.c \ src/src/pk/rsa/rsa_set.c \ src/src/pk/rsa/rsa_sign_hash.c \ src/src/pk/rsa/rsa_sign_saltlen_get.c \ src/src/pk/rsa/rsa_verify_hash.c \ +src/src/pk/x25519/x25519_export.c \ +src/src/pk/x25519/x25519_import.c \ +src/src/pk/x25519/x25519_import_pkcs8.c \ +src/src/pk/x25519/x25519_import_raw.c \ +src/src/pk/x25519/x25519_import_x509.c \ +src/src/pk/x25519/x25519_make_key.c \ +src/src/pk/x25519/x25519_shared_secret.c \ +src/src/pk/x448/x448_export.c \ +src/src/pk/x448/x448_import.c \ +src/src/pk/x448/x448_import_pkcs8.c \ +src/src/pk/x448/x448_import_raw.c \ +src/src/pk/x448/x448_import_x509.c \ +src/src/pk/x448/x448_make_key.c \ +src/src/pk/x448/x448_shared_secret.c \ src/src/prngs/chacha20.c \ src/src/prngs/fortuna.c \ src/src/prngs/rc4.c \ @@ -419,14 +543,35 @@ src/src/stream/chacha/chacha_done.c \ src/src/stream/chacha/chacha_ivctr32.c \ src/src/stream/chacha/chacha_ivctr64.c \ src/src/stream/chacha/chacha_keystream.c \ +src/src/stream/chacha/chacha_memory.c \ src/src/stream/chacha/chacha_setup.c \ src/src/stream/chacha/chacha_test.c \ +src/src/stream/chacha/xchacha20_memory.c \ +src/src/stream/chacha/xchacha20_setup.c \ +src/src/stream/chacha/xchacha20_test.c \ +src/src/stream/rabbit/rabbit.c \ +src/src/stream/rabbit/rabbit_memory.c \ src/src/stream/rc4/rc4_stream.c \ +src/src/stream/rc4/rc4_stream_memory.c \ src/src/stream/rc4/rc4_test.c \ +src/src/stream/salsa20/salsa20_crypt.c \ +src/src/stream/salsa20/salsa20_done.c \ +src/src/stream/salsa20/salsa20_ivctr64.c \ +src/src/stream/salsa20/salsa20_keystream.c \ +src/src/stream/salsa20/salsa20_memory.c \ +src/src/stream/salsa20/salsa20_setup.c \ +src/src/stream/salsa20/salsa20_test.c \ +src/src/stream/salsa20/xsalsa20_memory.c \ +src/src/stream/salsa20/xsalsa20_setup.c \ +src/src/stream/salsa20/xsalsa20_test.c \ src/src/stream/sober128/sober128_stream.c \ +src/src/stream/sober128/sober128_stream_memory.c \ src/src/stream/sober128/sober128tab.c \ -src/src/stream/sober128/sober128_test.c - +src/src/stream/sober128/sober128_test.c \ +src/src/stream/sosemanuk/sosemanuk.c \ +src/src/stream/sosemanuk/sosemanuk_memory.c \ +src/src/stream/sosemanuk/sosemanuk_test.c + LOCAL_C_INCLUDES := $(LOCAL_PATH)/src/src/headers LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/src/src/headers diff --git a/sqlcipher/src/main/jni/libtomcrypt/src b/sqlcipher/src/main/jni/libtomcrypt/src index 476a957..6c6d510 160000 --- a/sqlcipher/src/main/jni/libtomcrypt/src +++ b/sqlcipher/src/main/jni/libtomcrypt/src @@ -1 +1 @@ -Subproject commit 476a9579ae94f32b9ea9e2747bfb04b302370259 +Subproject commit 6c6d5104de66f3ca0dfd7b68540ef86869982b07 From 95ee95d9a803be8008f44e47450e3959989e9a35 Mon Sep 17 00:00:00 2001 From: Stephen Lombardo Date: Wed, 9 Sep 2026 12:08:56 -0400 Subject: [PATCH 2/9] Add required -DSQLITE_DIRECT_OVERFLOW_READ=0 macro for SQLCipher beta build --- sqlcipher/src/main/jni/sqlcipher/Android.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sqlcipher/src/main/jni/sqlcipher/Android.mk b/sqlcipher/src/main/jni/sqlcipher/Android.mk index ced979f..4b037ab 100644 --- a/sqlcipher/src/main/jni/sqlcipher/Android.mk +++ b/sqlcipher/src/main/jni/sqlcipher/Android.mk @@ -34,6 +34,7 @@ LOCAL_CFLAGS += \ -DSQLITE_ENABLE_DBSTAT_VTAB \ -DSQLITE_ENABLE_SNAPSHOT \ -DSQLITE_USE_URI \ + -DSQLITE_DIRECT_OVERFLOW_READ=0 \ -DSQLITE_EXTRA_INIT=sqlcipher_extra_init \ -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown endif @@ -82,4 +83,4 @@ else include $(CLEAR_VARS) include $(LOCAL_PATH)/../libtomcrypt/Android.mk include $(CLEAR_VARS) -endif \ No newline at end of file +endif From e7f715ee0822121fa42d6e51e47c6aed42b9e100 Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Tue, 15 Sep 2026 10:02:18 -0500 Subject: [PATCH 3/9] Update SQLCipher core to use v5.0.0-beta tag --- sqlcipher/src/main/jni/sqlcipher/src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlcipher/src/main/jni/sqlcipher/src b/sqlcipher/src/main/jni/sqlcipher/src index c4b275a..02051d3 160000 --- a/sqlcipher/src/main/jni/sqlcipher/src +++ b/sqlcipher/src/main/jni/sqlcipher/src @@ -1 +1 @@ -Subproject commit c4b275a47932888216bade83aff2bbc73df0ff85 +Subproject commit 02051d3d35b1e8d084670a7566c92f037e21399e From 3aeece6b3bfacabd9b2f132c6ec8a8559b06ef23 Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Tue, 15 Sep 2026 10:54:53 -0500 Subject: [PATCH 4/9] Update library version to 5.0.0-beta --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d80cf9e..3fdabbf 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,7 @@ project.ext { if(project.hasProperty('sqlcipherAndroidVersion') && "${sqlcipherAndroidVersion}") { libraryVersion = "${sqlcipherAndroidVersion}" } else { - libraryVersion = "4.19.1" + libraryVersion = "5.0.0-beta" } minSdkVersion = 23 androidXSQLiteVersion = "2.7.0" From 73ea06a876ab476857aeb5b8c8f8e01c442b4e05 Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Tue, 15 Sep 2026 11:25:30 -0500 Subject: [PATCH 5/9] Update README for beta --- README.md | 19 ++++++++++++------- README.md.template | 17 +++++++++++------ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4a3a3a8..704ca91 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,16 @@ SQLCipher for Android provides a library replacement for `android.database.sqlite` on the Android platform for use on [SQLCipher](https://github.com/sqlcipher/sqlcipher) databases. This library is based on the upstream [Android Bindings](https://www.sqlite.org/android/doc/trunk/www/index.wiki) project and aims to be a long-term replacement for the original [SQLCipher for Android](https://github.com/sqlcipher/android-database-sqlcipher) library. +> [!CAUTION] +> ## SQLCipher 5.0.0-beta details +> Summary: +> - Changes architecture to use VFS shims +> - Uses AEAD Encryption with AES-256-GCM +> - Increases KDF iteration increase to 512K +> - Increase default page size to 8192 bytes +> - Adds encryption and decryption support to PRAGMA rekey +> - **BREAKING CHANGES** - see [CHANGELOG.md](https://github.com/sqlcipher/sqlcipher/blob/v5.0.0-beta/CHANGELOG.md#500-beta----2026---500-beta-changes) and [release announcement](https://www.zetetic.net/blog/2026/09/15/sqlcipher-5.0.0-beta/) + ### Compatibility SQLCipher for Android supports Android API 23 and up on `armeabi-v7a`, `x86`, `x86_64`, and `arm64-v8a` architectures. @@ -16,16 +26,11 @@ We welcome contributions, to contribute to SQLCipher for Android, a [contributor Add a local reference to the local library and dependency: ```groovy -implementation files('libs/sqlcipher-android-4.19.0-release.aar') +implementation files('libs/sqlcipher-android-5.0.0-beta-release.aar') implementation 'androidx.sqlite:sqlite:2.7.0' ``` -or source a Community edition build from Maven Central: - -```groovy -implementation 'net.zetetic:sqlcipher-android:4.19.0@aar' -implementation 'androidx.sqlite:sqlite:2.7.0' -``` +Beta builds are not distributed via Maven Central, but rather through [GitHub Releases](https://github.com/sqlcipher/sqlcipher-android/releases). ```java import net.zetetic.database.sqlcipher.SQLiteDatabase; diff --git a/README.md.template b/README.md.template index c3732b2..fa36fba 100644 --- a/README.md.template +++ b/README.md.template @@ -2,6 +2,16 @@ SQLCipher for Android provides a library replacement for `android.database.sqlite` on the Android platform for use on [SQLCipher](https://github.com/sqlcipher/sqlcipher) databases. This library is based on the upstream [Android Bindings](https://www.sqlite.org/android/doc/trunk/www/index.wiki) project and aims to be a long-term replacement for the original [SQLCipher for Android](https://github.com/sqlcipher/android-database-sqlcipher) library. +> [!CAUTION] +> ## SQLCipher 5.0.0-beta details +> Summary: +> - Changes architecture to use VFS shims +> - Uses AEAD Encryption with AES-256-GCM +> - Increases KDF iteration increase to 512K +> - Increase default page size to 8192 bytes +> - Adds encryption and decryption support to PRAGMA rekey +> - **BREAKING CHANGES** - see [CHANGELOG.md](https://github.com/sqlcipher/sqlcipher/blob/v5.0.0-beta/CHANGELOG.md#500-beta----2026---500-beta-changes) and [release announcement](https://www.zetetic.net/blog/2026/09/15/sqlcipher-5.0.0-beta/) + ### Compatibility SQLCipher for Android supports Android API <%=minSdkVersion%> and up on `armeabi-v7a`, `x86`, `x86_64`, and `arm64-v8a` architectures. @@ -20,12 +30,7 @@ implementation files('libs/sqlcipher-android-<%=libraryVersion%>-release.aar') implementation 'androidx.sqlite:sqlite:<%=androidXSQLiteVersion%>' ``` -or source a Community edition build from Maven Central: - -```groovy -implementation 'net.zetetic:sqlcipher-android:<%=libraryVersion%>@aar' -implementation 'androidx.sqlite:sqlite:<%=androidXSQLiteVersion%>' -``` +Beta builds are not distributed via Maven Central, but rather through [GitHub Releases](https://github.com/sqlcipher/sqlcipher-android/releases). ```java import net.zetetic.database.sqlcipher.SQLiteDatabase; From a2acfe2ce5458bb6678b8606ddd9152431b827dd Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Thu, 22 Oct 2026 12:20:32 -0500 Subject: [PATCH 6/9] Use SQLCipher core v5.0.0-beta.1 tag --- sqlcipher/src/main/jni/sqlcipher/src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlcipher/src/main/jni/sqlcipher/src b/sqlcipher/src/main/jni/sqlcipher/src index 02051d3..6570336 160000 --- a/sqlcipher/src/main/jni/sqlcipher/src +++ b/sqlcipher/src/main/jni/sqlcipher/src @@ -1 +1 @@ -Subproject commit 02051d3d35b1e8d084670a7566c92f037e21399e +Subproject commit 65703364430f1cd90b6ce4233279ace5d429a9c8 From 92ebdcbaddd3a18398dc19f7e0d891d89ba46867 Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Thu, 22 Oct 2026 13:21:52 -0500 Subject: [PATCH 7/9] Update README for 5.0.0-beta.1 --- README.md | 19 +++++++++++-------- README.md.template | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 704ca91..5e39e57 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,17 @@ SQLCipher for Android provides a library replacement for `android.database.sqlite` on the Android platform for use on [SQLCipher](https://github.com/sqlcipher/sqlcipher) databases. This library is based on the upstream [Android Bindings](https://www.sqlite.org/android/doc/trunk/www/index.wiki) project and aims to be a long-term replacement for the original [SQLCipher for Android](https://github.com/sqlcipher/android-database-sqlcipher) library. > [!CAUTION] -> ## SQLCipher 5.0.0-beta details +> ## SQLCipher 5.0.0-beta.1 details > Summary: -> - Changes architecture to use VFS shims -> - Uses AEAD Encryption with AES-256-GCM -> - Increases KDF iteration increase to 512K -> - Increase default page size to 8192 bytes -> - Adds encryption and decryption support to PRAGMA rekey -> - **BREAKING CHANGES** - see [CHANGELOG.md](https://github.com/sqlcipher/sqlcipher/blob/v5.0.0-beta/CHANGELOG.md#500-beta----2026---500-beta-changes) and [release announcement](https://www.zetetic.net/blog/2026/09/15/sqlcipher-5.0.0-beta/) +> - Changes architecture to use codec +> - Adjusts KDF iteration back to 256K +> - Rekey support for databases in WAL mode with concurrent connections +> - Journal spill behavior is now locked down to prevent plaintext writes +> - Fixed a bug where cipher_hmac_fast_kdf could write the page HMAC past the reserved area +> - Improved error handling and reporting for rekey failures +> - Fixed shared cache connections for encrypted databases +> - Added PRAGMA cipher_selftest for verifying internal implementations +> - **BREAKING CHANGES** - see [CHANGELOG.md](https://github.com/sqlcipher/sqlcipher/blob/beta/CHANGELOG.md#500-beta1---oct-2026---500-beta1-changes) and [release announcement](https://www.zetetic.net/blog/2026/10/22/sqlcipher-5.0.0-beta.1/) ### Compatibility @@ -129,7 +132,7 @@ There are two different compile-specific options available to alter the logging To manage the logging produced from SQLCipher core, please review the runtime configurations: [`PRAGMA cipher_log`](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_log), [`PRAGMA cipher_log_level`](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_log_level), and [`PRAGMA cipher_log_source`](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_log_source). -### Building +### Building This project and it's dependencies can be built directly within Android Studio. Currently, SQLCipher for Android uses NDK version "25.2.9519653". The repository includes a submodule for SQLCipher core, and LibTomCrypt as external dependencies. When cloning the repository, please execute the following command at the root of the project (the build phase will check for this on your behalf): diff --git a/README.md.template b/README.md.template index fa36fba..7b7788a 100644 --- a/README.md.template +++ b/README.md.template @@ -3,14 +3,17 @@ SQLCipher for Android provides a library replacement for `android.database.sqlite` on the Android platform for use on [SQLCipher](https://github.com/sqlcipher/sqlcipher) databases. This library is based on the upstream [Android Bindings](https://www.sqlite.org/android/doc/trunk/www/index.wiki) project and aims to be a long-term replacement for the original [SQLCipher for Android](https://github.com/sqlcipher/android-database-sqlcipher) library. > [!CAUTION] -> ## SQLCipher 5.0.0-beta details +> ## SQLCipher 5.0.0-beta.1 details > Summary: -> - Changes architecture to use VFS shims -> - Uses AEAD Encryption with AES-256-GCM -> - Increases KDF iteration increase to 512K -> - Increase default page size to 8192 bytes -> - Adds encryption and decryption support to PRAGMA rekey -> - **BREAKING CHANGES** - see [CHANGELOG.md](https://github.com/sqlcipher/sqlcipher/blob/v5.0.0-beta/CHANGELOG.md#500-beta----2026---500-beta-changes) and [release announcement](https://www.zetetic.net/blog/2026/09/15/sqlcipher-5.0.0-beta/) +> - Changes architecture to use codec +> - Adjusts KDF iteration back to 256K +> - Rekey support for databases in WAL mode with concurrent connections +> - Journal spill behavior is now locked down to prevent plaintext writes +> - Fixed a bug where cipher_hmac_fast_kdf could write the page HMAC past the reserved area +> - Improved error handling and reporting for rekey failures +> - Fixed shared cache connections for encrypted databases +> - Added PRAGMA cipher_selftest for verifying internal implementations +> - **BREAKING CHANGES** - see [CHANGELOG.md](https://github.com/sqlcipher/sqlcipher/blob/beta/CHANGELOG.md#500-beta1---oct-2026---500-beta1-changes) and [release announcement](https://www.zetetic.net/blog/2026/10/22/sqlcipher-5.0.0-beta.1/) ### Compatibility @@ -129,7 +132,7 @@ There are two different compile-specific options available to alter the logging To manage the logging produced from SQLCipher core, please review the runtime configurations: [`PRAGMA cipher_log`](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_log), [`PRAGMA cipher_log_level`](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_log_level), and [`PRAGMA cipher_log_source`](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_log_source). -### Building +### Building This project and it's dependencies can be built directly within Android Studio. Currently, SQLCipher for Android uses NDK version "<%=androidNdkVersion%>". The repository includes a submodule for SQLCipher core, and LibTomCrypt as external dependencies. When cloning the repository, please execute the following command at the root of the project (the build phase will check for this on your behalf): From e05f1e21c242c0b6f80a48ffb3aee60c70b789ec Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Thu, 22 Oct 2026 13:23:38 -0500 Subject: [PATCH 8/9] Bump version to 5.0.0-beta.1 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3fdabbf..4974c20 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,7 @@ project.ext { if(project.hasProperty('sqlcipherAndroidVersion') && "${sqlcipherAndroidVersion}") { libraryVersion = "${sqlcipherAndroidVersion}" } else { - libraryVersion = "5.0.0-beta" + libraryVersion = "5.0.0-beta.1" } minSdkVersion = 23 androidXSQLiteVersion = "2.7.0" From b980c7b72aae349ddf4c529f3fabbb4f9d6cf65d Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Thu, 22 Oct 2026 13:54:52 -0500 Subject: [PATCH 9/9] Checkout LTC to v2026.09.09 --- sqlcipher/src/main/jni/libtomcrypt/src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlcipher/src/main/jni/libtomcrypt/src b/sqlcipher/src/main/jni/libtomcrypt/src index 476a957..6c6d510 160000 --- a/sqlcipher/src/main/jni/libtomcrypt/src +++ b/sqlcipher/src/main/jni/libtomcrypt/src @@ -1 +1 @@ -Subproject commit 476a9579ae94f32b9ea9e2747bfb04b302370259 +Subproject commit 6c6d5104de66f3ca0dfd7b68540ef86869982b07