Skip to content

Commit 67f3bb8

Browse files
committed
Finalize release notes and change log for 2.7.0
1 parent 328b720 commit 67f3bb8

3 files changed

Lines changed: 64 additions & 17 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- _VLE_: `sqlite3mc_vle_version(value)`: returns the format version of a VLE value (NULL if the argument is not a VLE value).
1313
- _VLE_: Option `legacy=0|1` for `sqlite3mc_vle_key()` (default 1): when 0, values in format version 1 are rejected on decryption.
1414
- _VLE_: INTEGER values are accepted as scope (equivalent to `CAST(scope AS TEXT)`).
15+
- Added compile-time symbol `SQLITE3MC_WASM_USE_GETENTROPY` to select `getentropy()` instead of `__wasi_random_get()` for random number generation on WASI targets.
1516

1617
### Changed
1718

1819
- Based on SQLite version 3.54.1
1920
- Updated several SQLite extensions
20-
- Added return type to function `sqlite3mcRekeySetFinalCipher`
2121
- Added various missing OOM checks
2222
- Removed unused function from AEGIS cipher implementation
2323
- _Argon2_ parameters are now validated:
@@ -36,16 +36,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3636
- hexadecimal string if it consists of hexadecimal characters only
3737
- binary string if it contains at least 1 non-hexadecimal character
3838
In all cases the input length (excluding the prefix) must match the expected length:
39-
- hexadecimal: 2*keyLength or 2*(keyLength+saltLength)
40-
- binary: keyLength or (keyLength+saltLength)
39+
- hexadecimal: `2*keyLength` or `2*(keyLength+saltLength)`
40+
- binary: `keyLength` or `(keyLength+saltLength)`
4141
An invalid input length or an invalid encoding will be reported as an error.
42+
For the SQLCipher notation the behaviour is the same as in the original: any value that does not exactly match the raw key format is treated as a normal passphrase.
4243
- Improved cipher configuration
43-
- The SQL function sqlite3mc_config did not fully check for valid parameter values (like valid page sizes). This has been fixed. In case of invalid parameter values error messages are now returned instead of NULL values.
44-
- Integer URI and VLE parameters are now handled as 64-bit values to avoid automatic conversion to 32-bit values. This allows improved range checks.
44+
- The SQL function `sqlite3mc_config` did not fully check for valid parameter values (like valid page sizes). This has been fixed. In case of invalid parameter values error messages are now returned instead of NULL values.
45+
- Integer parameters (including URI and VLE parameters) are now read as 64-bit values and checked against the valid 32-bit range. Oversized values are rejected instead of being silently converted (previously they could wrap to small, accepted values).
4546
- Key specification in ATTACH statements is now checked properly to prevent silently ignoring encryption if the VFS of the attached database doesn't support encryption.
47+
- Cipher parameter tables exist per connection. The global parameter tables cannot be changed through a connection.
48+
- Cipher _aes256cbc_ now obeys a change of the parameter `kdf_iter`. Previously the parameter was accepted, but always 4001 iterations were used.
4649
- Removed support for WAL legacy mode
4750
- Prevent ChaCha20 counter overflow
4851
A counter overflow is handled differently in the hardware-accelerated ChaCha20 implementations than in the scalar implementation. A counter overflow is now prevented, so that all ChaCha20 implementations deliver the same encryption.
52+
- Options `SQLITE_ENABLE_ATOMIC_WRITE` and `SQLITE_ENABLE_BATCH_ATOMIC_WRITE` are now disabled (also removed from the Android build), as atomic-write journal handling is not supported by the encryption layer
53+
- Functions `sqlite3mc_config` and `sqlite3mc_codec_data` are now registered as direct-only (they can no longer be used in triggers, views, etc.)
54+
- The maximum length of cipher names (custom cipher registration) was increased to 64, as documented (names up to 63 characters)
55+
- Restructured rekey operation
56+
- Improved initialization sequence and error handling (mainly VFS)
4957

5058
### Fixed
5159

@@ -60,18 +68,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6068
- Do not change salt on rekeying, unless explicitly requested (pragma rekey_salt)
6169
- Added checks to identify encrypted database and hot journal to prevent removing a valid journal
6270
- Fixed issue [#280](../../issues/#280) - Check in backup procedure corrected
71+
- Fixed issue [#286](../../issues/286) - Issues compiling versions 2.6.0 and 2.6.1 to WebAssembly
72+
- Defining the symbol `SQLITE3MC_WASM_USE_GETENTROPY` restores the behaviour of versions < 2.6.0 (use of `getentropy()` instead of `__wasi_random_get()`)
73+
- The order of checks in `sqlite3mcSecureZeroMemory` was changed, so that `explicit_bzero` is used on WASI targets even if the compiler defaults to C23 (`memset_explicit` is not available in wasi libc)
74+
- Fixed _wxSQLite3_ issue [#134](https://github.com/utelle/wxsqlite3/issues/134) - Build fails if `memset_s` is unavailable (for example, on PowerPC macOS). The selection of the secure zeroing function via preprocessor macros was adjusted (this also fixes the function selection for NetBSD).
75+
- Errors occurring during key setup via URI parameters are now passed up (previously a database could silently be left unencrypted)
6376
- Fixed bugs in VLE feature and improved error handling
6477
- **Argon2: return code of key derivation is now checked.**
6578
Previously, _SQLite3 Multiple Ciphers_ did not evaluate the return value of the _Argon2_ key derivation function. If _Argon2_ rejected the parameters (e.g. `mcost < 8 * pcost`) or failed internally (e.g. memory allocation failure), the error was silently ignored and the cipher continued with a key that had not been derived from the passphrase. Such failures are now detected and reported as an error, e.g. by `PRAGMA key`, `PRAGMA rekey`, `sqlite3_key`, `sqlite3_rekey` and when opening a database.
6679
- _VLE_: Missing check of the return value of `sqlite3_set_clientdata` in the VLE context setup (potential use after free on out-of-memory).
6780
- _VLE_: Plaintext remained in the buffer after a failed authentication; temporary buffers are now wiped.
6881
- _VLE_: Corrupt decrypted values led to a silent NULL result instead of an error.
69-
- Fixed various mutex issues
82+
- Fixed encryption of temporary files; stale counter data behind the end of a temporary file is now cleared
83+
- Fixed deadlock caused by sorter worker threads
84+
- Fixed various mutex issues; access to global state variables (including cached CPU and AES hardware features) is now thread-safe
7085
- Fixed codec use in sqlite3_deserialize
86+
- Cloning a cipher no longer invalidates the source cipher
87+
- The secure memory allocator is no longer wrapped twice
88+
- Errors on adjusting the page size while setting the key are now reported (previously ignored)
89+
- `PRAGMA cipher_salt`: an allocation failure no longer deletes the pending salt
90+
- `sqlite3mc_cipher_name_copy`: the size of the result buffer is now checked (previously a zero-size buffer could be written to)
91+
- Cipher schemes _aes128cbc_ and _aes256cbc_: fixed signed integer overflow (undefined behaviour) in the IV derivation at page number 2^31-1
92+
- Fixed order of two entry pairs in the core dispatch table (`preupdate_old/new`, `win32_set_directory8/16`)
93+
- Fixed opening of `/dev/random` (now with `O_CLOEXEC`)
7194

7295
### Compatibility note
7396

74-
Applications that used _Argon2_ parameter combinations rejected by the _Argon2_ library will now receive an error instead of continuing silently.
97+
- Applications that used _Argon2_ parameter combinations rejected by the _Argon2_ library will now receive an error instead of continuing silently.
98+
- Databases created with _aes256cbc_ and a non-default `kdf_iter` value were actually encrypted with 4001 iterations. To open such databases, set `kdf_iter` to 4001.
99+
- Applications must enable encryption (i.e. specify the key) before using a temporary database. Temporary files opened while encryption was not yet enabled are not encrypted.
100+
- For legacy _SQLCipher_ databases setting `legacy` != 0 is mandatory. The compile-time defaults are only valid for non-legacy databases.
101+
- WAL legacy mode is no longer supported.
75102

76103
### VLE Migration
77104

@@ -92,6 +119,7 @@ disable legacy reading:
92119
- Values encrypted with `sqlite3mc_vle_encrypt()` under one scope could be decrypted successfully under another scope using the same VLE key (ASCON128: scope had no effect at all; ChaCha20: weak derivation; both: non-TEXT/BLOB scopes silently mapped to the default scope).
93120
- New values are written in format version 2, in which the scope is cryptographically bound via a derived subkey.
94121
- Existing values (format version 1) remain readable but keep the old weakness until they are re-encrypted.
122+
- Errors during key setup via URI parameters and key specifications in `ATTACH` statements (including attached databases using a different VFS) can no longer silently result in an unencrypted database.
95123

96124
## [2.6.1] - 2026-10-12
97125

‎packaging/release-notes.md.in‎

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
11
## Changes since previous release
22

3-
This release includes a number of minor and major improvements and fixes a number of bugs that have been discovered since the last release.
3+
This release focuses on robustness and security hardening.
44

5-
- Based on SQLite version 3.54.1
6-
- Improved handling of failures (like OOM)
7-
- Improved handling of raw key and salt
8-
- Fixed problems with the _ChaCha20_ hardware acceleration introduced in version 2.6.0
9-
- Fixed several issues in the VLE feature
10-
- Fixed many other issues
5+
**An update is strongly recommended.**
116

127
Details can be found in the [change log](https://github.com/utelle/SQLite3MultipleCiphers/blob/main/CHANGELOG.md) and the [commit history](https://github.com/utelle/SQLite3MultipleCiphers/commits/main/).
138

14-
**An update is strongly recommended.**
9+
### Security
10+
11+
- Key setup errors (URI parameters, `ATTACH`, also with another VFS) can no longer silently result in an unencrypted database
12+
- VLE: the scope is now cryptographically bound to encrypted values (new value format version 2). Existing values stay readable until re-encrypted, see the CHANGELOG for the migration.
13+
- Argon2: the result of the key derivation is now checked; invalid parameters are rejected
14+
15+
### Fixes
16+
17+
- Backup API could deliver corrupted databases (#280)
18+
- Reworked rekey handling, hot-journal detection and handling of partial page reads (#291–#294)
19+
- ChaCha20 counter overflow prevented, so that all implementations deliver identical results
20+
- Many mutex/thread-safety and out-of-memory fixes, including a deadlock with sorter worker threads
21+
- Build fixes for WebAssembly/WASI (#286, new option `SQLITE3MC_WASM_USE_GETENTROPY`) and for platforms without `memset_s` (wxSQLite3 #134)
22+
23+
### New
24+
25+
- VLE: `sqlite3mc_vle_version()`, option `legacy=0|1`, INTEGER scopes
26+
- Raw keys/salts can be specified unambiguously with the prefixes `raw:hex:` and `raw:bin:`
27+
28+
### Compatibility notes
29+
- WAL legacy mode is no longer supported
30+
- `aes256cbc` now obeys `kdf_iter`; `sqlite3mc_config` returns the actually active value and is, like `sqlite3mc_codec_data`, direct-only
31+
- VLE passphrase/salt in UTF-16 databases are now interpreted as UTF-8
32+
- Encryption for temporary files must be enabled before a temporary database is used
33+
34+
## Release Summary
1535

1636
> [!IMPORTANT]
1737
> :pushpin: The _amalgamation source package_ including `configure` is _still_ **experimental**. :pushpin:

‎readme.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ The code was mainly developed under Windows, but was tested under Linux as well.
1212

1313
- 2.7.0 - *November 2026*
1414
- Based on SQLite version 3.54.1
15-
- Improved handling of failures (like OOM)
16-
- Improved handling of raw key and salt
15+
- Focuses on robustness and security hardening.
1716
- Fixed problems with the _ChaCha20_ hardware acceleration introduced in version 2.6.0
1817
- Fixed several issues in the VLE feature
1918
- Fixed many other issues

0 commit comments

Comments
 (0)