Skip to content

chore: update to cipherstash-client 0.32.0#58

Merged
tobyhede merged 16 commits intomainfrom
chore/cipherstash-client-update
Jan 13, 2026
Merged

chore: update to cipherstash-client 0.32.0#58
tobyhede merged 16 commits intomainfrom
chore/cipherstash-client-update

Conversation

@tobyhede
Copy link
Copy Markdown
Contributor

@tobyhede tobyhede commented Jan 8, 2026

  • Migrate encrypt/decrypt to use new EQL API (encrypt_eql)
  • Update SteVec format to match EQL ciphertext structure
  • Add per-payload lock_context support in encrypt_bulk
  • Group payloads by lock_context for batch processing
  • Update TypeScript types for new SteVec format
  • Temporarily disable Windows builds in CI

- Migrate encrypt/decrypt to use new EQL API (encrypt_eql)
- Update SteVec format to match EQL ciphertext structure
- Add per-payload lock_context support in encrypt_bulk
- Group payloads by lock_context for batch processing
- Update TypeScript types for new SteVec format
- Temporarily disable Windows builds in CI
…, and blake3

Tests verify that SteVec automatically generates:
- ocf (ORE fixed) for numeric values
- ocv (ORE variable) for string values
- b3 (blake3) hash for both string and numeric values
- selector (s) field for entries
- array flag (a) for array elements
- Remove local Encrypted enum and SteVecEntry struct
- Add type alias: pub type Encrypted = EqlCiphertext
- Remove eql_ciphertext_to_encrypted conversion function
- Update encrypt/encrypt_bulk to return EqlCiphertext directly
- Update encrypted_record_from_mp_base85 to extract ciphertext from body
- Update is_encrypted to validate against EqlCiphertext structure
- Update unit tests for new structure

BREAKING CHANGE: Encrypted type no longer uses 'k' discriminant tag.
The structure is now unified with all fields at the top level.
- Replace discriminated union with unified structure
- Add EqlCiphertextBody type for recursive SteVec entries
- Deprecate SteVecEntry (alias to EqlCiphertextBody)
- Remove 'k' discriminant field

BREAKING CHANGE: Encrypted type no longer has 'k' field for variant discrimination.
- Remove all ciphertext.k discriminant checks (8 occurrences)
- Use sv field presence to identify SteVec payloads
- Update type assertions to use unified Encrypted type
- Add TypeScript documentation explaining Rust type hierarchy relationship
- Clarify why old format rejection test exists (migration detection)
- Add biome-ignore directives for intentional any casts in isEncrypted validation tests
- Replace non-null assertions (!) with optional chaining (?.) in SEM field and JSON tests
- Add tests verifying old format data with "k" discriminant can be decrypted
- Add tests verifying new encrypted output does not contain "k" field
- Update Rust tests to verify "k" field is silently ignored by serde
- Remove misleading test that claimed to reject "k" field (actually failed on invalid "c" data)

The old format used "k": "ct" or "k": "sv" as a serde discriminant tag.
The new EqlCiphertext format ignores unknown fields, so old data remains decryptable.
Also re-enable Windows CI builds with OpenSSL support
Copy link
Copy Markdown
Contributor

@coderdan coderdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@tobyhede tobyhede merged commit 20ff425 into main Jan 13, 2026
5 of 6 checks passed
@tobyhede tobyhede deleted the chore/cipherstash-client-update branch January 13, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants