Link Search Menu Expand Document (external link)

System.Data.SQLite: RC4

This cipher is included with System.Data.SQLite, an ADO.NET provider for SQLite. It provides a 128 bit RC4 encryption. This encryption scheme had been added to wxSQLite3 in early 2020 to allow cross-platform access to databases created with System.Data.SQLite based applications. SQLite3 Multiple Ciphers continues to support this cipher for compatibility reasons only.

The encryption key is derived from the passphrase using an SHA1 hash function.

The cipher does not use a Hash Message Authentication Code (HMAC), and requires therefore no reserved bytes per database page.

The following table lists all parameters related to this cipher that can be set before activating database encryption.

ParameterDefaultMinMaxDescription
legacy111Boolean flag whether the legacy mode should be used
legacy_page_size0065536Page size to use in legacy mode, 0 = default SQLite page size

Notes

  • Currently only the legacy mode is implemented; it is not intended to implement a non-legacy mode in the future, because RC4 encryption has known weaknesses (for example, the use of RC4 in TLS was prohibited by RFC 7465 published in February 2015).
  • The use of this cipher scheme for new applications is strongly discouraged.

Copyright © 2020-2023 Ulrich Telle. Distributed under an MIT license.