Skip to content

v2.5.0

Choose a tag to compare

@yuriizee yuriizee released this 16 Oct 13:08
· 3 commits to main since this release
v2.5.0
2fa14a5

Added (opt-in)

  • EncryptedCast(keyring: ...) with the EncryptionKeyring contract turns on a new ciphertext format, v2:<key id>:… (XChaCha20-Poly1305-IETF):
    • the key ID is stored in the value, so keys rotate without downtime;
    • the value is bound to its class and field (or to context:), so a ciphertext copied into another field is rejected;
    • the plaintext is padded to 32-byte blocks, hiding card-number length;
    • keys must be 32 random bytes, raw or base64.
  • With a legacy key next to the keyring, both formats are read and only the new one is written.
  • EncryptedCast::needsReencryption() and forField() for rotation and migration scripts.
  • Support\BlindIndex: a keyed HMAC-SHA256 to search encrypted columns.
  • Contracts\BindsToField: casts implementing it learn their class and field when metadata is built.

Fully backward compatible with 2.4.x: without keyring: the cast and its ciphertext format are unchanged.