PackageTrack
Sign in Get early access

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 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 41
  1. v4.10.0 05 Mar 2026
    Release notes

    What's Changed

    Full Changelog: v4.9.0...v4.10.0

    Open source →
  2. v4.9.0 25 Oct 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v4.8.0...v4.9.0

    Open source →
  3. v4.8.0 17 Jun 2025
    Release notes

    New Feature: If you use a StaticBlindIndexKeyProvider interface 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 with EncryptedRow and EncryptedMultiRows.

    What's Changed

    New Contributors

    Full Changelog: v4.7.0...v4.8.0

    Open source →
  4. v4.7.0 11 May 2024
    Release notes

    Enhanced AAD

    • Added a new AAD class, 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.
    • EncryptedFile now 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, table2 is cryptographically bound to its primary key (id). This has two consequences:

    1. You cannot copy ciphertexts between rows and decrypt successfully. This is a good thing.
    2. 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.

    Open source →
  5. v4.6.1 08 May 2024
    Release notes
    • Allow constant_time_encoding v3
    Open source →
  6. v4.6.0 19 Apr 2024
    Release notes

    What's Changed

    Full Changelog: v4.5.1...v4.6.0

    Open source →
  7. v4.5.1 28 Oct 2023
    Release notes

    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) -> null
    

    Booleans are the weird ones, though.

    Encrypt:
      TYPE_TEXT + (null) -> TypeError
      TYPE_OPTIONAL_TEXT + (null) -> null
    
    Decrypt:
      TYPE_TEXT + (null) -> TypeError
      TYPE_OPTIONAL_BOOLEAN + (null) -> null
    

    Every other type doesn't tolerate null implicitly. This behavior is because of a very early design decision with boolean types.

    Open source →
  8. v4.5.0 28 Jul 2023
    Release notes

    What's Changed

    • #92 Explicit support for optional field types
    • #88 Support json field map templating

    Full Changelog: v4.4.0...v4.5.0

    Open source →
  9. v4.4.0 26 Apr 2023
    Release notes

    What's Changed

    • Feature: Extension Keys in #86

    Full Changelog: v4.3.0...v4.4.0

    Open source →
  10. v4.3.0 31 Mar 2023

    Nothing published for this version

  11. v4.2.0 15 Jan 2023

    Nothing published for this version

  12. v4.1.0 14 Nov 2022

    Nothing published for this version

  13. v4.0.2 28 Sep 2022

    Nothing published for this version

  14. v4.0.1 02 Jun 2022

    Nothing published for this version

  15. v4.0.0 21 May 2022

    Nothing published for this version

  16. v3.4.1 19 Apr 2024
    Release notes

    What's Changed

    Full Changelog: v3.4.0...v3.4.1

    Open source →
  17. v3.4.0 15 Jan 2023

    Nothing published for this version

  18. v3.3.0 14 Nov 2022

    Nothing published for this version

  19. v3.2.1 21 May 2022

    Nothing published for this version

  20. v3.2.0 21 May 2022

    Nothing published for this version

  21. v3.1.0 04 May 2022

    Nothing published for this version

  22. v3.0.1 07 Jul 2021

    Nothing published for this version

  23. v3.0.0 20 Jun 2021

    Nothing published for this version

  24. v2.0.3 13 Nov 2020

    Nothing published for this version

  25. v2.0.2 16 Oct 2020

    Nothing published for this version

  26. v2.0.1 12 Sep 2019

    Nothing published for this version

  27. v2.0.0 22 Apr 2019

    Nothing published for this version

  28. v1.10.0 21 Apr 2019

    Nothing published for this version

  29. v1.9.0 14 Feb 2019

    Nothing published for this version

  30. v1.8.0 31 Jan 2019

    Nothing published for this version

  31. v1.7.1 03 Jan 2019

    Nothing published for this version

  32. v1.7.0 30 Nov 2018

    Nothing published for this version

  33. v1.6.0 18 Nov 2018

    Nothing published for this version

  34. v1.5.0 13 Oct 2018

    Nothing published for this version

  35. v1.4.0 10 Oct 2018

    Nothing published for this version

  36. v1.3.0 16 Sep 2018

    Nothing published for this version

  37. v1.2.0 21 Jun 2018

    Nothing published for this version

  38. v1.1.0 14 May 2018

    Nothing published for this version

  39. v1.0.0 09 May 2018

    Nothing published for this version

  40. v0.2.0 02 May 2018

    Nothing published for this version

  41. v0.1.0 01 May 2018

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive