+On **iOS** there exists an issue with encrypted databases, if they are stored in a shared container. **iOS** identifies SQLite database files by inspecting certain bytes in the database header. However, several cipher schemes, namely [ChaCha20]({{ site.baseurl }}{% link docs/ciphers/cipher_chacha20.md %}), [SQLCipher]({{ site.baseurl }}{% link docs/ciphers/cipher_sqlcipher.md %}), [Ascon]({{ site.baseurl }}{% link docs/ciphers/cipher_ascon.md %}), and [AEGIS]({{ site.baseurl }}{% link docs/ciphers/cipher_aegis.md %}), save a cipher salt value used in the key derivation process in the first 16 bytes of the database header, and usually encrypt the database header, too. This prevents **iOS** from identifying, and therefore **iOS** will kill the application process when it tries to maintain a file lock on the database while it is in the background.
0 commit comments