Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 60 additions & 24 deletions docs/plans/2026-11-14-move-vitaminc-aead-into-the-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ define the value types, how each is encoded, and how a value is sealed.
## Summary

Three crates move from `cipherstash/vitaminc` into this repository:
`vitaminc-aead`, `vitaminc-aead-frame` and `vitaminc-aead-derive`. They are
published from here. `vitaminc-aead` and `vitaminc-aead-derive` keep their
names. The frame crate is renamed `recipher-frame` in step 2.4.
`vitaminc-aead`, `vitaminc-aead-frame` and `vitaminc-aead-derive`. The frame
crate is renamed `recipher-frame` in step 2.4. `vitaminc-aead` is not
published again under that name: it is renamed `recipher-aead`. They are
published from here with `recipher`, the new name of `stack-encrypt`, and
not before (see "Publishing, with `recipher`"). What becomes of
`vitaminc-aead-derive` is open question 2.

vitaminc's two Go packages, `vcffi` and `vcvalue`, move into the Go module in
a third stage.
Expand Down Expand Up @@ -155,13 +158,18 @@ copy of `vitaminc-aead-napi` 0.10.0, and depends only on `vitaminc-aead` and
The engine passes AEAD types into all four. So the engine and these four must
build against the same `vitaminc-aead`. Two consequences:

- **`vitaminc-aead` and `vitaminc-aead-derive` keep their names.** Under a
new name, Cargo would build two crates with two sets of types, and the
engine's calls into the four would not compile. The frame crate is not
bound this way: none of the four depends on it, and only `stack-encrypt`
and `stack-guest-abi` do, both by path. So it could be renamed without
breaking anything outside this repository, and step 2.4 renames it
`recipher-frame`.
- **`vitaminc-aead` cannot be renamed while the four depend on it.** Under
a new name, Cargo would build two crates with two sets of types, and the
engine's calls into the four would not compile. So before it becomes
`recipher-aead`, each of the four moves here or is released against
`recipher-aead`. The same holds for the other crates on crates.io that
depend on it: the `vitaminc` umbrella crate, `clww-ore` and `ore-rs`
(see the `[patch.crates-io]` table in the root `Cargo.toml`).
Comment on lines +163 to +167

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

major This order cannot be followed. A dependent cannot be "released against recipher-aead" before the rename, because recipher-aead is published only in step 3, "and not before" (lines 252-254). Releasing it after step 3 leaves a gap in which the engine uses recipher-aead while crates.io's vitaminc-ore, -prf and the others still use vitaminc-aead. Say that only "moves here" can come first, or allow recipher-aead to publish before recipher. Step 1, lines 256-259, offers the same option.

Source: code-review · claude-opus-5-5


Generated by Claude Code


The frame crate is not bound this way: none of the four depends on it,
and only `stack-encrypt` and `stack-guest-abi` do, both by path. So it
could be renamed without breaking anything outside this repository, and
step 2.4 renames it `recipher-frame`.
- **A breaking change to `vitaminc-aead` needs new releases of all four**,
and then of `clww-ore` and `ore-rs`, which the root `Cargo.toml` pins with
`=`. A change that only adds a type, a method or a `Logical` variant does
Expand Down Expand Up @@ -223,27 +231,40 @@ While the crates are unpublished:
- **A release from this repository builds against crates.io's copy.**
`cargo publish` drops `[patch]` tables, so a published `stack-encrypt`,
`stack-kms` or `stack-auth` depends on crates.io's `vitaminc-aead` 0.10.x,
not on the copy here. A release that needs a change made in the copies
waits until the copies are published (see "Before the next
`stack-encrypt` release").
not on the copy here. Stage 2 changed the copies, so there is no further
`stack-encrypt` release: the next release is `recipher`, with the renamed
crates (see "Publishing, with `recipher`").
- **The Go and TypeScript SDKs are not affected.** Both build the engine by
path from the tree.
- **`eql-bindings` can be published until step 2.4.** Its `stack-encrypt`
feature is compiled against the `stack-encrypt` on crates.io when it is
published. Stage 1 changes no API, so that still compiles. Step 2.4 changes
the API that `eql-bindings` uses, and from then an EQL release waits for a
`stack-encrypt` release.
the API that `eql-bindings` uses, and from then an EQL release with that
feature waits for the first release of `recipher`.
Comment on lines 239 to +243

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor Step 2.4 is done (#1955, line 342), so "can be published until step 2.4" describes a time that has passed. Also, packages/eql/release-plz.toml:51 sets publish_all_features = true and eql-bindings names stack-encrypt 0.3.0, which is not on crates.io. So every eql-bindings release waits for recipher, not only one "with that feature". Write the bullet in the present tense, to say this.

Source: code-review · claude-opus-5-5


Generated by Claude Code

- **vitaminc stops changing these three crates as soon as the copy is
taken**, or the two copies diverge. The crates stay in vitaminc, unchanged,
until everything in this plan is settled, so that the move can be backed
out. They are deleted from vitaminc only then.

### Before the next `stack-encrypt` release
### Publishing, with `recipher`

Publish the three crates from this repository, under the same names. That
needs the crates.io owners and trusted publishing moved here. If stage 2 has
made a breaking change by then, the four crates that depend on
`vitaminc-aead` need a release against it first, or must have moved.
Decided on 2 December 2026, in place of publishing the crates under their
vitaminc names: `vitaminc-aead` is not published again. `stack-encrypt` is
renamed `recipher`, and the AEAD crates are published with it, under new
names, and not before. In order:

1. For each crate on crates.io that depends on `vitaminc-aead` (the four
above, the `vitaminc` umbrella crate, `clww-ore` and `ore-rs`), decide
whether it moves here or is released against `recipher-aead`. The
Comment on lines +256 to +258

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor clww-ore and ore-rs do not depend on vitaminc-aead directly. In Cargo.lock they depend on vitaminc-ore and vitaminc-prf, and line 147 says they stay in cipherstash/ore.rs, so "moves here" does not apply to them. List only the direct dependents here, and add that clww-ore and ore-rs are then released against the new vitaminc-ore and vitaminc-prf. Lines 165-167 need the same change.

Source: mattpocock-skills:code-review · claude-opus-5-5


Generated by Claude Code

rename cannot happen before that is done.
2. Rename `vitaminc-aead` to `recipher-aead`, and `stack-encrypt` to
`recipher`. Settle `vitaminc-aead-derive` (open question 2).
Comment on lines +260 to +261

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minor The plan never mentions stack-encrypt-jsonpath. It is in the stack-encrypt version group (release-plz.toml:16-19), stack-encrypt depends on it at ^0.3.0, and it is not on crates.io. As step 3 stands, recipher cannot be published. Say whether it is renamed, and list it in step 3 as a new name that also needs a first publish by hand.

Source: mattpocock-skills:code-review · claude-opus-5-5


Generated by Claude Code

3. Publish `recipher` with `recipher-aead`, `recipher-frame`, and the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

major recipher is not a new name on crates.io: it is the old name of zerokms-keyset, versions 0.1.0 to 0.3.3 plus a yanked 0.34.0, from cipherstash/cipherstash-suite (root Cargo.toml:90-91). Publishing stack-encrypt 0.3.0 as recipher fails because 0.3.0 is taken, and existing recipher = "0.3" users would get unrelated code. Say that the name is taken over, choose a first version above 0.34.0, and move the existing trusted publisher from cipherstash-suite.

Source: code-review · claude-opus-5-5


Generated by Claude Code

derive crate or crates that open question 2 leaves. The names are new
on crates.io, so this needs trusted publishing set up for them here.
Comment on lines +263 to +264

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

major crates.io lets an owner add a trusted publisher only to a crate that already exists. So recipher-aead, recipher-frame and any new derive crate need a first publish by hand with an owner's token (AGENTS.md:93 says the same of stack-encrypt-jsonpath). Add that step before the release-plz trusted-publishing publish.

Source: code-review · claude-opus-5-5


Generated by Claude Code


Until then, the three crates keep `publish = false` and their
`release = false` entries in `release-plz.toml`.

## Stage 2: consolidate

Expand Down Expand Up @@ -513,7 +534,7 @@ The work:

### Done

Items 1 to 4 are done, on the branch `refactor/go-frame-codec-in-module`:
Items 1 to 4 are done, in #2003:

- The two packages moved, and stay two packages. `vcffi` is now
`languages/golang/encrypt/frame`: the codec and the storage profile.
Expand All @@ -539,10 +560,11 @@ Items 1 to 4 are done, on the branch `refactor/go-frame-codec-in-module`:

Two things are still to do:

- Item 5, in vitaminc.
- Item 5, in vitaminc: cipherstash/vitaminc#646 deletes `bindings/go`
(`vcffi`, `vcvalue` and `vcencrypt` with its guest).
- The differential fuzzers that compared the Go codec with a Rust guest, in
vitaminc's `vcencrypt`. Those fuzzers could run against
`languages/golang/encrypt/guest`.
vitaminc's `vcencrypt`, are to run against
`languages/golang/encrypt/guest` (#2004).

## What waits on this plan

Expand Down Expand Up @@ -579,6 +601,20 @@ Pull requests may change the three crates.
1. **What is a frame called?** Resolved in step 2.4: "frame" stays the
name of the encoding, and the crate that holds its codec is
`recipher-frame`. The owned value is `OwnedFrame`.
2. **What becomes of `vitaminc-aead-derive`?** The current intent is to
remove it, and to move its derives, changed as needed, into
`recipher-derive`. Today there are two derive crates:
- `vitaminc-aead-derive` derives `Encrypt` and `Decrypt` (attribute
`aead`). `vitaminc-aead` depends on it and re-exports the derives.
- `stack-encrypt-derive` derives `EncryptTarget` and `DecryptSource`
(attribute `stash`).

To decide:
- whether `recipher-derive` is `stack-encrypt-derive` renamed, with the
AEAD derives added, or a new crate;
- whether `recipher-aead` still offers `Encrypt` and `Decrypt`, and so
depends on `recipher-derive`, or whether only `recipher` does;
- what changes in the derives and their `aead` attribute when they move.

## Rules this changes

Expand Down
Loading