paragonie/ciphersweet
Searchable field-level encryption library for relational databases
v4.10.0
1.5M downloads/mo
#2870 most downloaded on Packagist
paragonie/ciphersweet
What this package is like to depend on
Last release 5 months ago
05 Mar 2026
Release timing varies
gaps range from 3 weeks to 1.1 years
Rarely documented
notes for 10 of 41 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
41 releases · first in 2018
2 releases in the last 12 months
see the full history below
Release timeline
41 releases · May 2018 to Mar 2026Releases
latest 41-
v4.10.005 Mar 2026Release notes
Open source →What's Changed
- Update CI by @paragonie-security in #114
- Add enum support by @paragonie-security in #116
- Update phpunit versions by @paragonie-security in #117
Full Changelog: v4.9.0...v4.10.0
-
v4.9.025 Oct 2025Release notes
Open source →What's Changed
- Ignore tests, workflows with
export-ignoreby @erikn69 in #111 - EncryptedRow: Allow inherited classes to decide field key from row context by @paragonie-security in #112
New Contributors
Full Changelog: v4.8.0...v4.9.0
- Ignore tests, workflows with
-
v4.8.017 Jun 2025Release notes
Open source →New Feature: If you use a
StaticBlindIndexKeyProviderinterface for your Key Providers, you can now designate a specific "tenant" identifier to be static and used for Blind Index root key derivation. This works withEncryptedRowandEncryptedMultiRows.What's Changed
- fix(issue-107): explicit nullable type by @GErpeldinger in #108
- Allow multi-tenant providers to use static blind index keys by @paragonie-security in #110
New Contributors
- @GErpeldinger made their first contribution in #108
Full Changelog: v4.7.0...v4.8.0
-
v4.7.011 May 2024Release notes
Open source →Enhanced AAD
- Added a new
AADclass, which allows users to bind an encrypted field to the contents of multiple plaintext fields. This class can be used in the same place where a field name or literal value was used previously. EncryptedFilenow accepts an optional AAD param, which binds the file's contents to the AAD value.- Improved test coverage.
- EncryptedRow now allows you to automatically bind fields to their context (i.e. primary key).
- EncryptedMultiRows now allows you to enable auto-binding mode, which ensures that all fields are explicitly bound (via the AAD parameter) to, at minimum, the database row primary key, table name, and field name.
Here's a quick example of the old API, then a diff to use the new AAD features:
<?php use ParagonIE\CipherSweet\CipherSweet; use ParagonIE\CipherSweet\EncryptedMultiRows; /** @var CipherSweet $engine */ $multiRowEncryptor = new EncryptedMultiRows($engine); $multiRowEncryptor ->addTextField('table1', 'field1') ->addIntegerField('table1', 'field2') ->addFloatField('table1', 'field3') ->addOptionalBooleanField('table1', 'field4') ->addTextField('table2', 'foo') ->addTextField('table3', 'bar'); $encrypted = $multiRowEncryptor->encryptManyRows([ 'table1' => ['field1' => 'hello world', 'field2' => 42, 'field3' => 3.1416], 'table2' => ['id' => 3, 'foo' => 'joy'], 'table3' => ['foo' => 'coy'], ]);
And here's how to easily enable to new features:
$multiRowEncryptor = new EncryptedMultiRows($engine); $multiRowEncryptor + ->setAutoBindContext(true) + ->setPrimaryKeyColumn('table2', 'id') ->addTextField('table1', 'field1')
With this change, every encrypted field is explicitly cryptographically bound to its context (table name, field name) with no further action needed from the developer.
Additionally,
table2is cryptographically bound to its primary key (id). This has two consequences:- You cannot copy ciphertexts between rows and decrypt successfully. This is a good thing.
- However, you must know the primary key when inserting new records, in order to provide it to CipherSweet.
That second point is the main reason why we are not enabling it by default. (Also, we'd kind of need to know your primary key naming convention, which we cannot know for everyone that uses this library.)
We will update the documentation as soon as possible.
- Added a new
-
v4.6.108 May 2024 -
v4.6.019 Apr 2024Release notes
Open source →What's Changed
- Update CI configuration by @paragonie-security in #100
Full Changelog: v4.5.1...v4.6.0
-
v4.5.128 Oct 2023Release notes
Open source →More helpful exception message on NULL values. See #95, #92, #93.
If you do not declare a field optional, it generally will not accept NULL as a value on encrypt. Boolean is the exception to this rule (for backwards compat).
However, non-optional fields (even booleans) must have a ciphertext on the decrypt path.
Encrypt: TYPE_BOOLEAN + (null) -> ciphertext TYPE_OPTIONAL_BOOLEAN + (null) -> ciphertext Decrypt: TYPE_BOOLEAN + (null) -> TypeError TYPE_OPTIONAL_BOOLEAN + (null) -> nullBooleans are the weird ones, though.
Encrypt: TYPE_TEXT + (null) -> TypeError TYPE_OPTIONAL_TEXT + (null) -> null Decrypt: TYPE_TEXT + (null) -> TypeError TYPE_OPTIONAL_BOOLEAN + (null) -> nullEvery other type doesn't tolerate null implicitly. This behavior is because of a very early design decision with boolean types.
-
v4.5.028 Jul 2023 -
v4.4.026 Apr 2023Release notes
Open source → -
v4.3.031 Mar 2023Nothing published for this version
-
v4.2.015 Jan 2023Nothing published for this version
-
v4.1.014 Nov 2022Nothing published for this version
-
v4.0.228 Sep 2022Nothing published for this version
-
v4.0.102 Jun 2022Nothing published for this version
-
v4.0.021 May 2022Nothing published for this version
-
v3.4.119 Apr 2024Release notes
Open source →What's Changed
- [v3.x] Update CI configuration, dependencies by @paragonie-security in #101
Full Changelog: v3.4.0...v3.4.1
-
v3.4.015 Jan 2023Nothing published for this version
-
v3.3.014 Nov 2022Nothing published for this version
-
v3.2.121 May 2022Nothing published for this version
-
v3.2.021 May 2022Nothing published for this version
-
v3.1.004 May 2022Nothing published for this version
-
v3.0.107 Jul 2021Nothing published for this version
-
v3.0.020 Jun 2021Nothing published for this version
-
v2.0.313 Nov 2020Nothing published for this version
-
v2.0.216 Oct 2020Nothing published for this version
-
v2.0.112 Sep 2019Nothing published for this version
-
v2.0.022 Apr 2019Nothing published for this version
-
v1.10.021 Apr 2019Nothing published for this version
-
v1.9.014 Feb 2019Nothing published for this version
-
v1.8.031 Jan 2019Nothing published for this version
-
v1.7.103 Jan 2019Nothing published for this version
-
v1.7.030 Nov 2018Nothing published for this version
-
v1.6.018 Nov 2018Nothing published for this version
-
v1.5.013 Oct 2018Nothing published for this version
-
v1.4.010 Oct 2018Nothing published for this version
-
v1.3.016 Sep 2018Nothing published for this version
-
v1.2.021 Jun 2018Nothing published for this version
-
v1.1.014 May 2018Nothing published for this version
-
v1.0.009 May 2018Nothing published for this version
-
v0.2.002 May 2018Nothing published for this version
-
v0.1.001 May 2018Nothing published for this version