Repository navigation
Commit f915cf5
committed
feat(stack-encrypt)!: encrypt order terms through cllw-ore's vitaminc schemes
cllw-ore 0.5.2-rc.1 implements vitaminc-ore's `OrderScheme` behind its
`vitaminc` feature, so Stack Encrypt no longer encodes anything for
ordering itself. An ORE or OPE term is now cllw-ore's `vitaminc::Ore` or
`vitaminc::Ope` encryption of the value: the engine names the value's
order target through the new sealed `sem::Orderable` (integers at their
own width, `f32`/`f64` as `F64`, text as `Text`, bytes as `Bytes`) and
passes the value straight through; cllw-ore encodes it with vitaminc-ore,
text by the system ADR-0002's fold. That replaces the earlier workaround,
which built text's order key here and handed the folded bytes to
cllw-ore 0.5 through `Any` downcasts: `OrderSource`, `text_order_key`
and the downcasts are gone.
The per-index key derivation is kept: the PRF block keys the scheme
inside the visitor and is wiped there, and the column is opened with the
value's target and the empty context, since the key is already the
index's own. The key labels move to `/v2` because every order term
changes bytes (new column salt, cllw-ore's marker byte for text and
bytes). Nothing was deployed (ADR-0002); the pins and both fixtures are
re-recorded.
Every source type's term is now one ciphertext type
(`OreCllw8VariableV1`, `OpeCllw8VariableV1`); `OreTerm<T>`/`OpeTerm<T>`
keep `T` as a marker so typed callers compile unchanged. `Between`
judges an inverted range in the order the stored terms compare, by
encrypting both bounds with OPE under a fixed comparison key and
comparing the bytes, on the typed and the data-plan path alike.
Claude-Session: https://claude.ai/code/session_01BZhkvKLpNtKuzj3HCfMXoL1 parent 300d307 commit f915cf5
23 files changed
Lines changed: 465 additions & 422 deletions
File tree
- languages/golang/encrypt/guest
- tests
- packages
- eql
- stack-encrypt
- docs/adr
- fuzz
- src
- dynamic
- op
- sem
- target
- tests
- fixtures
- ui/pass
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
| 331 | + | |
331 | 332 | | |
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
338 | | - | |
| 339 | + | |
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
175 | 186 | | |
176 | 187 | | |
177 | 188 | | |
| |||
215 | 226 | | |
216 | 227 | | |
217 | 228 | | |
218 | | - | |
219 | | - | |
220 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
221 | 232 | | |
222 | 233 | | |
223 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
582 | 583 | | |
583 | 584 | | |
584 | 585 | | |
585 | | - | |
| 586 | + | |
586 | 587 | | |
587 | 588 | | |
588 | 589 | | |
| |||
602 | 603 | | |
603 | 604 | | |
604 | 605 | | |
605 | | - | |
606 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
607 | 609 | | |
608 | 610 | | |
609 | 611 | | |
610 | 612 | | |
611 | 613 | | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
| 614 | + | |
617 | 615 | | |
618 | 616 | | |
619 | 617 | | |
| |||
0 commit comments