You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stack-encrypt: delete dynamic::Value and Scalar, derive terms through vitaminc, add block ORE, drop Bool order terms #1140
stack-encrypt's dynamic module is the path bindings use: values arrive as
vitaminc Values whose type is known only at runtime.
Problem
Two types restate vitaminc's vocabulary.dynamic::Value wraps FfiValue only to add Clone. dynamic::term::Scalar (term.rs:196)
mirrors FfiValue's variants one for one, to pick a Rust type for the term
crates, and copies text out of Protected to do it.
Bool has order terms (term.rs:444, 467; allowed by kind.rs:62-68).
With two possible values, an order term tells anyone with the column which
rows are true.
TextEq doesn't normalise text, so café written in two Unicode forms
gives two different hashes.
Proposal
Bump the vitaminc pins to 0.6.0:
in the root Cargo.toml, both Go guests, eql-bindings and packages/eql/tests/encryption;
follow the Value rename;
follow the transport tag move in stack-guest-abi and the guests.
Delete dynamic::Value and Scalar. dynamic::term takes &Value and
calls vitaminc-prf and vitaminc-ore. admits keeps only rules that
belong to stack, such as Match taking text only.
Remove Bool order terms. Add a block ORE term kind beside CLLW ORE and
OPE. Remove the direct cllw-ore dependency.
Normalise TextEq to NFC. No stored data depends on the old form.
Background
stack-encrypt's
dynamicmodule is the path bindings use: values arrive asvitaminc
Values whose type is known only at runtime.Problem
dynamic::ValuewrapsFfiValueonly to addClone.dynamic::term::Scalar(term.rs:196)mirrors
FfiValue's variants one for one, to pick a Rust type for the termcrates, and copies text out of
Protectedto do it.Boolhas order terms (term.rs:444, 467; allowed bykind.rs:62-68).With two possible values, an order term tells anyone with the column which
rows are
true.TextOrdOreandTextSearchOrestay refused (stashgen refuses TextOrdOre and TextSearchOre — EQL stores block ORE terms and the engine derives CLLW ORE #1132).TextEqdoesn't normalise text, socaféwritten in two Unicode formsgives two different hashes.
Proposal
Cargo.toml, both Go guests,eql-bindingsandpackages/eql/tests/encryption;Valuerename;stack-guest-abiand the guests.dynamic::ValueandScalar.dynamic::termtakes&Valueandcalls
vitaminc-prfandvitaminc-ore.admitskeeps only rules thatbelong to stack, such as
Matchtaking text only.Boolorder terms. Add a block ORE term kind beside CLLW ORE andOPE. Remove the direct cllw-ore dependency.
TextEqto NFC. No stored data depends on the old form.!commit and a CHANGELOG Unreleased entry, then publish tocrates.io before
@cipherstash/eql4.0: ship the v3 and v4 bundles together and move Stack Encrypt's targets to v4 #1142 uses the new API (cargo publishbuildseql-bindingsagainst the registry).Needs vitaminc 0.6.0. Decided in ADR-0002 (#1139). Related: #1063, #1132.