Skip to content

stack-encrypt: turn on vitaminc's uuid feature so Rust can encrypt a UUID #1833

Done

Description

@coderdan

Background

Stack Encrypt (the Rust crate stack-encrypt) seals a value of any type that vitaminc, CipherStash's cryptography library, can encode. vitaminc's vitaminc-aead crate has a UUID type, vitaminc_aead::Uuid, behind its uuid feature, with its own sealed form, a sealed null and an equality term. stack-encrypt turns on vitaminc's jiff and rust_decimal features by default, for dates, timestamps and decimals, but not uuid.

Problem

A Rust user cannot encrypt a UUID as a UUID. They have to encrypt its text, which stores a different value, decrypts as a string, and will not match a UUID encrypted by any SDK once the SDKs support one (#1821). A UUID is a common column type, such as a user ID or an external reference.

Proposal

  1. Add a uuid feature to stack-encrypt that turns on vitaminc-aead/uuid, on by default like jiff and rust_decimal.
  2. Do not turn on vitaminc-ore/uuid. An order index takes no UUID.
  3. Re-export the type beside Date, Timestamp and Decimal in stack_encrypt::value.
  4. Pin the sealed bytes of a UUID and its sealed null with the stage 0 tests.

The dynamic path, which the Go and TypeScript SDKs use, still refuses a UUID until #1821.

Activity

  1. added
    enhancement
    Rust
    on Nov 26, 2026
  2. self-assigned this
    on Nov 26, 2026
  3. added 3 commits that reference this issue on Nov 26, 2026
    c95b6cd
    2502cfb
    cfed74a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

RustSDKenhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions