Repository navigation
Conversation
Index terms become a sink, and normalization becomes its own crate. The per-scalar equality encoders behind vitaminc-aead-value's canonical feature move here and become public, under the same frozen domain labels, plus a domain of its own for a uuid over its sixteen raw bytes. A date, a timestamp, a decimal and a uuid are separate from the physical value they are stored as, so a date's day count never matches the integer it equals; every other logical type has no term. Terms produces one term per scalar that has a domain, with the path to it, and runs beside encryption as Tee(EncryptSink, Terms), so a caller holds every term before any cipher is called and, with an async cipher, before the first await. A null, a boolean or an undefined produces no term and does not stop the walk, since those are ordinary things to find in a document; a logical type this crate does not know stops it, since encrypting a value from a newer client with no term and no error would leave an index silently incomplete. The crate has no cryptography in it and never imports PAE, though it builds on vitaminc-aead and inherits that crate's dependencies. It takes rust_decimal for the decimal term only, whose constant-time encoding it does not want a second copy of. SourceError::inner is now 'static so a caller can downcast the NormalizeError a terms walk reports. Refs cipherstash/vitaminc#410 Claude-Session: https://claude.ai/code/session_4caef6c7-64a1-4cf8-b491-2026ed98c2a9
`Normalized` and `Term` derived std `Debug`, so the only thing keeping
normalized plaintext out of a `{:?}` was that the bytes happen to sit in
a `Protected`; the fields are public and a later change to them would
have printed the bytes with no test failing. Both now derive
`OpaqueDebug`, showing the domain label and the path, which are
structure, and masking the term, and a test checks the output never
holds the plaintext.
`NormalizeError` derives its `Display` and `Error` impls with
`thiserror`, as the workspace's other error types do, with the same
messages. `domain::ALL` becomes a slice, so a domain added later does
not change the type of a public constant.
Claude-Session: https://claude.ai/code/session_012zHhtTEo968WazExKxA5oT
…romise Several documented guarantees had no test that fails when they change. A value `Terms` refuses must reach no cipher through `encrypt_with_terms`, and the async future must return the refusal on its first poll. `Terms` used alone, without `EncryptSink` in front, must itself refuse a value invalid for its logical type, and a root scalar has an empty path. With both sinks, `EncryptSink` runs first, so such a value is a shape error. The timestamp encoder must refuse one nanosecond past either end of chrono's range, the integer and timestamp encoders must never grow their buffer (a grown `Vec` frees an unwiped copy), and a date, timestamp or decimal term must be the same at every integer width. Claude-Session: https://claude.ai/code/session_012zHhtTEo968WazExKxA5oT
A refusal from Terms used to carry only a NormalizeError, so a caller could not tell which field of a document had no equality term. It now carries a TermError: the NormalizeError and the Path to the scalar. The downcast target for a refusal beside encryption is TermError. Step and Path come from vitaminc_aead::plaintext, so a Term's path and both crates' refusals use one type. Term::path is now a Path. As in vitaminc-aead, Display shows only the reason and Debug masks map keys, because they can be user data. Claude-Session: https://claude.ai/code/session_012zHhtTEo968WazExKxA5oT
Running Terms alone did not infer an error type (E0282), so a caller that wanted terms without ciphertext had to name an unrelated error such as EncryptError<()>, or call plan_with_terms and build a pending leaf per scalar as well. terms(value) runs Terms on its own and fails with TermsError, a thin wrapper over the SourceError a source reports through. TermsError::term recovers the TermError when Terms refused a scalar, and returns None when the source failed on its own. Claude-Session: https://claude.ai/code/session_012zHhtTEo968WazExKxA5oT
Tests and callers had to match on a path's steps with guards to check where a value was refused or where a term sits. A map key in a path is not secret from the ciphertext, which carries it in the clear, so Step and Path now derive PartialEq and Eq. Debug still masks every key, so an assertion that fails does not print one into a log. Claude-Session: https://claude.ai/code/session_012zHhtTEo968WazExKxA5oT
The normalize tests carried a second copy of render, because the aead copy was cfg(test) and so unreachable from another crate. The copy in vitaminc-aead is now also built under a test-support feature, hidden from the docs, and the normalize tests turn it on through their path-only dev-dependency. That is the smallest surface that shares it: no published build has the feature, and nothing public shows a key. A Display adapter on Path was the other option, but it would offer an unmasked rendering to every caller, which is what the masking is there to avoid. Claude-Session: https://claude.ai/code/session_012zHhtTEo968WazExKxA5oT
TermError held its NormalizeError without naming it as its source, so a reporter that walks source() never reached the reason, and code written against the earlier docs, which downcast the chain to NormalizeError, silently found nothing. The reason is now TermError's source(). TermError stays the documented downcast target, and the docs say the NormalizeError is reachable through the chain. Claude-Session: https://claude.ai/code/session_012zHhtTEo968WazExKxA5oT
A public tuple field fixed TermsError's shape: it could not become an enum, or carry anything else, without breaking every caller that read .0. The field is private now and source_error() returns it, beside term() as before. Claude-Session: https://claude.ai/code/session_012zHhtTEo968WazExKxA5oT
Terms kept an owned Vec<Step> per container, cloned from its parent's, and copied every map key as the walk entered it, so a document paid for paths whether or not any field had a term. Its docs said a child that produced no term cost nothing, which was not true. Terms now uses parent links, as EncryptSink does: each child sink holds a link to its container's place and its own index, or the position of its key in one buffer of the keys on the path being walked. The walk shares that buffer and each container truncates it to where its own keys begin, so it holds only the current path's keys. A path is built from the links only when a term is pushed or a refusal is built. Beside encryption, a walk with no terms now allocates that one buffer and nothing else; a test with a counting allocator pins it (one allocation for the document it walks, where there were 116). Claude-Session: https://claude.ai/code/session_012zHhtTEo968WazExKxA5oT
terms ran Terms without EncryptSink, so it skipped every shape rule encryption keeps and returned terms for values encryption refuses: a map that gave k twice produced two .k terms, while encrypt_with_terms failed with a duplicate key. An index fed from terms could then hold entries for a value that can never be stored. Terms now keeps the shape rules itself, through vitaminc-aead's shape module, the code EncryptSink keeps them with: depth, a valid logical value, a framable passthrough, no repeated key, no child sink dropped without a value, and something sealed in every container with children. That last rule is about sealing, and a terms-only walk seals nothing, but a value that breaks it cannot be encrypted, so terms refuses it too: the rule is that terms accepts a value exactly when encrypt_with_terms does, and refuses it for the same reason at the same path. A passthrough is framed, as encryption frames it, to check that it can be. A shape refusal is the same Refusal EncryptSink builds, from the same kind of parent-link chain, and TermsError::refusal recovers it. A scalar invalid for its logical type is now such a refusal, InvalidValue, rather than NormalizeError::Invalid, as it already was beside encryption. plan_with_terms and the functions built on it tee EncryptSink with a Terms that leaves the rules to it, so they are kept, and paid for, once. A test runs every rule both ways and checks that the two agree. Claude-Session: https://claude.ai/code/session_012zHhtTEo968WazExKxA5oT
…ms-error-path feat(aead,normalize)!: say where a value was refused, and collect terms on their own
…he transport `vitaminc-aead-value` becomes `vitaminc-aead-frame` and holds only the transport (ADR 0001 section 8): the ciphertext codec, carrying a `CipherText<Leaf, PassthroughFrame>` as bytes and back, and re-exports of the frame types that live in `vitaminc-aead` next to the leaf codec. The codec never writes the retired `CT_NONE` marker and refuses it when read, since a `None` is a null leaf now. `Value`, `ValueKind`, the `tagged` module, `encode_value`/`decode_value`, the `canonical` feature and the `FfiValue` alias are deleted: hosts implement `Plaintext` and `Sink` instead of converting to a parallel value type, and the equality encoders live in `vitaminc-normalize`. Two tests change hands rather than disappear. The normalize known-answer test compared every term with the `canonical` encoders; its vectors are now pinned as literals captured from those encoders, so a change to a frozen domain is a visible diff. The `Value`-path interop test is replaced by `legacy_fixture.rs`, which opens the Go binding's pre-ADR cross-language fixture through the ciphertext codec and the new decryption path and gets the frame it was sealed from, byte for byte, pinning the leaf format, the AAD derivations and the container rules against what shipped. The conformance test runs the shared corpus against the frame, from its own walk and from an independently built scalar. The Go guest depends on the renamed crate and its wasm is rebuilt; the Go tests that fail by design since cipherstash/vitaminc#413 are unchanged. Closes cipherstash/vitaminc#409. Closes cipherstash/vitaminc#348, superseded: `Value` no longer exists. Claude-Session: https://claude.ai/code/session_4caef6c7-64a1-4cf8-b491-2026ed98c2a9
…d-remove-legacy-traits feat(aead)!: remove Encrypt, Decipher, DecipherVisitor, SeqAccess and MapAccess
The Plaintext/Sink stack named the source trait for what a value is and the target trait for the operation. The pair now reads Encrypt and Decrypt: the traits say how a type is encrypted and decrypted, while the cipher does the cryptography. The same walk still feeds sinks that are not ciphers (equality terms, the transport frame); that is accepted. BREAKING CHANGE: `vitaminc_aead::Plaintext` and `#[derive(Plaintext)]` are renamed to `Encrypt` and `#[derive(Encrypt)]`. The `Encrypt` name now means the sink-based source trait (`fn visit<S: Sink>(self, sink: S)`), not 0.5's visitor-based `Encrypt` that drove a cipher directly. The `vitaminc_aead::plaintext` module keeps its name. Refs cipherstash/vitaminc#449
…rable-bytes vitaminc-normalize was the one crate reaching into the ore.rs workspace, through a git pin on orderable-bytes for the 14-byte decimal encoding. ADR 0002 puts vitaminc at the bottom of the stack: ore-rs and cllw-ore will depend on vitaminc-ore, so nothing in vitaminc can depend on their workspace, and orderable-bytes is frozen for cipherstash-client's stored terms rather than being part of the target design. The encoding is ported as it is, constant-time arithmetic included, and the frozen 0.2.0 release becomes a dev-dependency so the tests check every value against it byte for byte; the pinned known answers for the decimal domain are unchanged. rust_decimal leaves the dependencies too, since the encoder works from the mantissa and scale a leaf carries. The workspace lockfile no longer has a git source.
…t of range itself The encoder used to take a rust_decimal, which could not hold an out-of-range value. Since it takes a plain i128 and the range check lived only in its caller, a later caller that forgot the check would get bytes with the top bits dropped: the stored term of another value. orderable now checks the range, returns None outside it and takes the scale as the u8 the leaf carries. Tests pin the 96-bit boundary at both levels, sweep every digit count, scale and sign against orderable-bytes 0.2.0 (random mantissas almost all have 28 or 29 digits), and check strip_trailing_zeros from short significands so every case reaches the comparison.
…mal function The README pointed at the private decimal module, which docs.rs does not show, so an auditor or a port to another language could not find the 14-byte layout of stored terms.
…ller's own Terms did the walking and the equality encoding in one place, so an index of another kind had to copy the path and shape-rule bookkeeping to collect its terms. The sink is now generic over a Normalize, which names its own term type, with Equality and Normalized as the defaults, so Terms::new and terms are unchanged and Terms::by and terms_by run the same walk under another encoder. An order index seals its term, so only a scheme can read it; that is why the term type is the normalizer's to choose. The order index in vitaminc-ore is the first such encoder.
…ality With Terms generic over its normalizer, a scalar the order normalizer refused was still reported as having no equality term. Normalize now declares the index it serves (INDEX), TermError carries and displays it, and NoDomain's own message no longer names equality, since both normalizers report it. The equality messages are unchanged.
…that does not fit an index's type Terms copies its normalizer into every child sink, but only the Sink impls asked for Copy, so a normalizer with state built a Terms and failed later at visit with a missing Sink impl. Copy is now a supertrait, checked where a normalizer is defined. NormalizeError gains Mismatch and OutOfRange for a normalizer that declares a type, as the order index's target does. The equality normalizer declares none and never reports them.
…-crate feat(ore): add vitaminc-ore, the sealed order encoding per kind and the scheme trait
… 0.5.1 The generated sections were the commit subjects. Each breaking entry now says what breaks and what to change, and the wire-format entries say plainly what still opens: 0.6.0 ciphertext does not open under 0.5.x, leaves from 0.5's Encrypt path do not open under 0.6.0, and leaves from the tagged 0.5 Value path (aead-value, aead-napi, Go) open through Aes256Cipher::opening_version_1. Equality terms stored with 0.5.1 still match. The cross-width integer and float change applies only to the new normalize terms, which did not exist in 0.5.1: the 0.5.1 prf encodings and domains are unchanged (encoding.rs, impls.rs and traits.rs do not differ from the tag), so nothing needs regenerating. prf says so in a compatibility note rather than a Breaking entry. Security fixes to code that shipped in 0.5.1 get their own section, most of them in aead-napi. Fixes to code new in this release, CI, lint, lockfile and review churn, and entries that surfaced only because a shared commit touched a crate are gone. normalize and ore are first releases and describe what they provide. The MSRV entry says which crates declared one before.
…plz-2026-10-09T23-18-59Z chore: release v0.6.0
…plz-2026-10-18T23-49-25Z chore: release v0.6.1
…no caller can pass one that is not decimal::orderable used to write into an array its caller supplied, which put the duty to wipe it on the caller. It now makes and returns its own protected vector, as orderable_f64 does. fixed() writes straight into the returned vector instead of copying from a protected stack array. No encoded byte changes. The capacity test now covers every fixed-width encoder, and the touched tests compare protected bytes with zip_ref instead of risky_ref.
…p and what they leave behind Decomposition keeps a character's trailing marks in the same four-slot buffer as the next character, so four marks followed by any character already spill it, and a spilled buffer stays on the heap for the rest of the string. Documents ZA-0006 (tracked in cipherstash/vitaminc#488) in fold.rs and on vitaminc_normalize::text.
…opying it Generic code that holds `&T` had no bound it could use. `for<'a> &'a T: Encrypt` overflowed the trait solver (E0275) wherever `T` was still being inferred: the container impls bounded their element on `&'a T: Encrypt`, so with `T` unknown the solver tried `&Option<U>`, `&Option<Option<U>>`, and so on without end. The only bound left was `T: Encrypt`, by value, so a consumer holding a borrow had to clone it, and every plaintext had to be `Clone`. - Add `EncryptRef`, implemented for every `T` whose borrow is a source, with `visit_ref`, `lend` and the borrow's `REF_DEPTH` and `REF_FIXED`, and `Lent`, the borrowed plaintext as an `Encrypt` source. - Bound the container impls (`&Option<T>`, `&Vec<T>`, `&[T]`, the maps, `Protected<T>`, `ProtectedRef`, `&&T`) on `T: EncryptRef`. The solver now stops at a bare type variable and waits, so the higher-ranked bound holds under inference too. - `Sink::passthrough` lends its subtree (`&P` with `P: ?Sized + EncryptRef`) instead of taking it by value with `Clone`. A `Tee` lends the same subtree to each side, so a passthrough is never copied. BREAKING CHANGE: `Sink::passthrough` takes `&P` where `P: ?Sized + EncryptRef`; a sink walks it with `visit_ref` and a caller passes a reference. A passthrough type implements `Encrypt` for `&T` and need not be `Clone`. Refs cipherstash/vitaminc#614
…p for decimals The mutants gate found the wipeable `Decimal`'s hand-written normalization under-tested, and it duplicated `strip_trailing_zeros`, which vitaminc-normalize's decimal encoder already has: division-free (a shift and a multiply by the inverse of five), constant time, tested and gated. `strip_trailing_zeros` moves to `vitaminc_aead::plaintext::kinds`, below both crates, with its test; the encoder imports it. `Decimal`'s equality is built on it: two decimals are equal when both are zero, or when their signs, stripped significands and powers of ten all are. The hand-written division and selects are gone. The pairwise test now includes values that differ only above the low 32 or 64 bits, and `From` both ways is checked. Refs cipherstash/vitaminc#461
…d-protected-date-decimal-uuid feat(aead, ore)!: wipeable Date, Decimal and Uuid, and OwnTarget renamed Orderable without bytes
…arrower date range means for stored data The generated entries were commit subjects. They also listed walk_legacy_range, which was added and removed again in this release, and the addon's dependency bumps, which do not ship. Each crate's section now says what changed for a caller of that crate, and what to do to upgrade. hmac and kms have no user-visible change, so their sections are empty.
Import the vitaminc-normalize crate from cipherstash/vitaminc with its history, at vitaminc commit f1fc9ae74882d2b97f3d418607fb4ec91315961b. The tag vitaminc-normalize-v0.10.0 names that commit, and the crates.io 0.10.0 crate was packaged from it. git filter-repo kept packages/normalize and renamed it to packages/vitaminc-normalize. Commit messages name vitaminc PRs as cipherstash/vitaminc#NNN. The export's head is 1270f27. This merge adds files and changes no existing file. Every fix is a separate commit on top.
The manifest took its version, licence, edition and thiserror from vitaminc's workspace. That workspace is not here. The manifest now states each field: version 0.10.0, the MIT licence, edition 2021 and rust-version 1.89.0. Only repository changes, to name this repository. thiserror keeps vitaminc's requirement, written out: thiserror 2, not this workspace's thiserror 1. vitaminc-aead stays a path dependency under its directory name here. vitaminc-protected did not move. It comes from crates.io at 0.10.0. The crate is publish = false for now, and release-plz.toml lists it with release = false, so release-plz neither bumps nor publishes it. This is how the AEAD crates were set up when they moved.
… crate In vitaminc the licence file is at the repository root. The import did not bring it. The crate now has a copy of it. The AEAD crates and the stack-* crates each have one too.
vitaminc-normalize joins the root workspace's members. The workspace dependency on it names it by path. The [patch.crates-io] table now lists it too. vitaminc-prf (with its normalize feature) and vitaminc-ore come from crates.io and depend on vitaminc-normalize 0.10. With the patch they build against the copy here. So the build has one vitaminc-normalize 0.10: the path crate. The comment on the patch table now lists, for each patched crate, the crates from crates.io that depend on it. It no longer names vitaminc-encrypt: this workspace resolves no vitaminc-encrypt 0.10. Cargo.lock: vitaminc-normalize changes from a registry entry to a path entry. Its entry now lists the crate's dev-dependencies. The one package it adds is orderable-bytes 0.2.1, a dev-dependency that the tests compare the decimal and float encodings with. No package changes version.
a_refusal_names_the_field_only_on_request failed once the crate built against the vitaminc-aead in this repository. The test expected the Debug of EncryptError::Source to show the term error inside it. Since 8f823d9, SourceError's Debug in vitaminc-aead shows SourceError(..) in place of the inner error. The published 0.10.0 test was written against crates.io's vitaminc-aead 0.10.0. That version showed the text. The test still checks that neither Debug shows a key. It now reads the reason (UnassignedCodePoint) and the position (Index(1)) from the term error's Debug only. The crate's code does not change.
…c-normalize Five other workspaces resolve vitaminc-normalize 0.10 on their own: - the TypeScript SDK (recipher-js); - the Go encrypt guest; - EQL's workspace; - EQL's block ORE timing generator; - the stack-encrypt fuzz crate. Each already had a [patch.crates-io] table for the AEAD crates. Each table now points vitaminc-normalize at the copy here too, by relative path, as the root workspace does. In each, cargo metadata --locked passes and cargo tree finds one vitaminc-normalize 0.10: the path crate. Each Cargo.lock changes only from a registry entry to a path entry for vitaminc-normalize (2 lines removed). Four workspaces with a patch table for the AEAD crates do not resolve vitaminc-normalize. They are not changed: - the Go auth guest; - the value bridge's test workspace (value-napi/tests/addon); - the stack-auth and stack-kms fuzz crates. The root manifest's header now says that EQL patches vitaminc-normalize too.
As a root workspace member, the crate is already in tests-crates.yml's fmt, clippy, nextest and doctest runs, with every feature on. Its own tasks.toml gives it a doc:vitaminc-normalize task. So the root doc task builds its rustdoc with warnings as errors, public items and then private items. The crate has no optional features, so it needs no feature task. The workflows that compile the crate now start when it changes. Each one already starts on a change to the AEAD crates: - tests-crates, tests-golang, tests-recipher-js and udeps; - fuzz: the stack-encrypt fuzz crate links it; - test-eql and bench-eql: EQL's encryption tests link it. tests.yml's live jobs skip a change to it, as they skip stack-encrypt. Nothing they build links it. crates-ci.test.mjs lists the new task file and task. The mise.toml header and a test-eql.yml comment name the crate too.
vitaminc gated the crate with cargo-mutants --in-diff. mutants.yml now starts when the crate changes. The pull request run passes -p vitaminc-normalize. A manual dispatch sweeps the crate in its own job. The excludes are the three that vitaminc carried for this crate. Each is an equivalent mutant: - the swap of | for ^ in widen_f32; - the same swap in the decimal encoder's orderable; - null's body replaced with Protected::new(vec![0]) or Protected::from(vec![0]). A cargo-mutants 27.1.0 run over those functions found exactly these 11 mutants missed. It caught the other 6 and found 4 unviable. With the excludes, cargo mutants --list no longer lists the 11.
….md and CODEOWNERS AGENTS.md: the repository layout lists the crate. The entry says: - what the crate does; - that it keeps its crates.io name and is not published from here yet; - that every workspace that resolves it patches it to the copy here; - that supply-chain-vitaminc-aead.yml does not check it as a crate of its own yet. Working on the Rust crates now names it with the AEAD crates. It says how to check that a workspace has one vitaminc-normalize 0.10. The Fuzzing, Miri and Mutation testing sections name it too. SECURITY.md lists it as in scope, under MIT. CODEOWNERS names its directory.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
The plan said the move was an unchanged copy of the published crate, followed by the crate's changes. The move in #2052 follows the vitaminc-aead move: the crate comes with its git history, at the code of its 0.10.0 release. The crate's own changes follow from the vitaminc-aead changes in step 1.4, so they go there. The supply-chain store does not cover the crate yet, and the plan now says what that needs.
coderdan
left a comment
There was a problem hiding this comment.
Code review at 927e9ab, medium effort. One important finding and four minor ones. The review found no defect in the crate's code, the patch tables, the lock files, the workflow path filters or the mutation-testing exclusions.
The cargo vet check fails on this pull request with the same three crates as on its base, #2044.
…es.io crate vitaminc-normalize is now a member of the root workspace at 0.10.0, and crates.io has a 0.10.0 too. Without --locked, cargo vet stops on that before it checks anything, and asks for an audit-as-crates-io policy. The locked run in CI does not make this check, so CI did not show it. The step that names the kind of a cargo vet failure runs without --locked, as does the README's repair command, and both would have failed. The store now has the policy entry, as it has for vitaminc-aead. The entry names no criteria: whether the store checks this crate's own dependency graph is a separate decision. The safe-to-run exemption for vitaminc-normalize 0.10.0 is removed. It covered the crates.io copy, which is no longer in the graph.
…e member SECURITY.md said every build that uses vitaminc-normalize 0.10 uses the copy here. That holds for builds made from this repository. cargo publish drops patch tables, so a stack-encrypt from crates.io uses the crates.io release. The Repository Layout in AGENTS.md listed the members of the root Cargo workspace without the crate. The plan for the vitaminc-aead move listed it among the crates that stay in cipherstash/vitaminc.
…nto feat/vitaminc-normalize-move
…nto feat/vitaminc-normalize-move
The root lock had tinyvec 1.10.0, which the vitaminc-aead store exempts only at safe-to-run. vitaminc-normalize reaches it at runtime, through unicode-normalization, so the store needs safe-to-deploy once it checks vitaminc-normalize. Imported audits already cover 1.13.3. The move also drops tinyvec_macros, which 1.13 no longer uses.
vitaminc-normalize depends on unicode-general-category 1.1.0. Its build script reads the Unicode table compiled into the crate and writes a lookup table to OUT_DIR. It reads only the OUT_DIR variable and starts no process. cipherstash/vitaminc's deny.toml allowed it.
…able-bytes orderable-bytes is a CipherStash crate, published from the cipherstash/ore.rs repository by crates.io trusted publishing. vitaminc-normalize uses it only in tests, to check its decimal encoding against it, so the store needs safe-to-run. cipherstash/vitaminc exempted it. A trust entry covers later versions from the same repository without a new exemption each time.
cipherstash/vitaminc ran both tools on vitaminc-normalize. Now that the crate is here, the vitaminc-aead store checks it with the other three: the cargo vet filter keeps it, its policy asks safe-to-deploy of its dependencies, and the workflow runs cargo deny on it and starts when it changes.
…ze-move # Conflicts: # AGENTS.md
Summary
This pull request moves the Rust crate
vitaminc-normalizefromcipherstash/vitamincinto this repository, aspackages/vitaminc-normalize. The crate turns a value into the bytes that an equality search term is derived from. Stack Encrypt is its main user.The move changes no behaviour and no API. The crate's code is the code of its crates.io 0.10.0 release, and its version stays 0.10.0. After the move, a change to the crate and to its users can be made in one pull request.
This is the third pull request of the groundwork in #2040. It stacks on #2044.
Changes
The import
cipherstash/vitaminc, joined by one merge commit. This is howvitaminc-aeadwas moved (docs/plans/2026-11-14-move-vitaminc-aead-into-the-stack.md).cipherstash/vitaminc#N, so they do not link to issues here.Cargo.tomlstates its own fields, because it can no longer inherit vitaminc's workspace. The crate ispublish = false, andrelease-plz.tomlleaves it out.LICENSEis a copy of vitaminc's MIT licence.One test change
a_refusal_names_the_field_only_on_requestintests/known_answers.rsfailed against thevitaminc-aeadin this repository. It read the inner error from the Debug output ofEncryptError::Source. That output isSourceError(..)here. The test now reads the reason from the term error. It still checks that neither output shows a key.Builds
vitaminc-normalize0.10. Each has a[patch.crates-io]entry, so that the crates.io crates above it (vitaminc-prfandvitaminc-ore) build against the copy here. The six are the root, EQL, the Go encrypt guest, recipher-js, the stack-encrypt fuzz crate and one EQL timing generator.CI
vitaminc-aead's do.tests.ymlthe entry leaves the crate out of the live jobs, as for stack-encrypt.Supply chain
cargo denyandcargo vetcheckvitaminc-normalizewith the other three crates, as vitaminc did. The store's filter keeps it, its policy askssafe-to-deployof its dependencies, and the workflow runscargo denyon it.vitaminc-normalizehere is not the crates.io crate. Its exemption for the crates.io copy is removed.deny.tomlallows the build script ofunicode-general-category1.1.0. It writes a lookup table toOUT_DIRand starts no process.tinyvecmoves from 1.10.0 to 1.13.3 in the root lock. Imported audits cover 1.13.3.cipherstash/ore.rspublisher atsafe-to-runfororderable-bytes. It is our own crate, andvitaminc-normalizeuses it only in tests.Docs
AGENTS.md,SECURITY.mdandCODEOWNERSsay where the crate is now.vitaminc-aeadmove no longer lists this crate among the crates that stay.Verification
On a Mac, with Rust 1.94.1.
src/andtests/at the merge commit are identical to the published 0.10.0 (diff -ragainst the crates.io source).-D warnings.#[ignore].-D warnings.cargo metadata --locked. In each of the six that resolve the crate,cargo tree -i [email protected]shows one copy, the path crate.go testpass.cargo metadata --lockedandcargo treeran there.cargo vet: passes with and without--locked.cargo deny: passes for the four crates.tinyvecmove: the tests of vitaminc-normalize and stack-kms pass, 232 with 1 skipped. stack-auth builds.Related
Review notes
git log --first-parentshows the merge and the eight commits on top of it.cargo publishdrops[patch]tables, so a publishedstack-encryptstill depends on the crates.iovitaminc-normalize. A change to the copy here reaches a published crate only once this crate is published from here.wasm32-wasip1test job, because vitaminc did not test it there. Its tests pass on that target under wasmtime 50.0.3.orderable-bytes0.2.0 where the manifest pins 0.2.1, and the README still points atcipherstash/vitamincin three places. Both are the release's text. The review threads have the detail.vitaminc-aeadmove added none.