1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
[]
= "chio-kernel-core"
= "Portable (no_std + alloc) Chio kernel core: pure verdict evaluation, capability verification, and receipt signing"
= true
= true
= true
= true
= true
= "README.md"
= ["crates-io"]
[]
= "chio_kernel_core"
# This crate contains the pure-compute subset of Chio kernel evaluation:
# capability verification, scope matching, guard pipeline evaluation, and
# receipt signing. It is a `no_std + alloc` crate by source, which means
# the crate itself never imports from `std`. The in-repo portability proof is
# `scripts/check-portable-kernel.sh`, which builds `chio-kernel-core` both for
# the host and for `wasm32-unknown-unknown` with `--no-default-features`.
# See docs/protocols/PORTABLE-KERNEL-ARCHITECTURE.md.
[]
# Depend on `chio-core-types` with `default-features = false` and forward the
# `std` feature through our own feature flag so downstream consumers can
# select between the hosted `std` build and the portable `no_std + alloc`
# build used by the scripted host + wasm proof.
= { = "=0.1.2", = "../../core/chio-core-types", = false }
= { = "1", = false, = ["derive", "alloc"] }
= { = "1", = false, = ["alloc"] }
# `arbitrary` is gated behind the `fuzz` feature so production builds stay
# free of fuzz instrumentation. Pulled in by
# `fuzz/fuzz_targets/receipt_log_replay.rs` via
# `chio-kernel-core = { features = ["fuzz"] }`.
= { = "1", = ["derive"], = true }
# `arc-swap` powers the `RevocationView` read-only cache: the gossip
# task swaps a fresh snapshot in atomically while dispatch readers hold
# a no-lock reference. Requires `std` at link time so it is only pulled
# in via the `revocation-view` feature, which itself implies `std`. The
# portable `no_std + alloc` proof never observes this surface.
= { = true, = true }
# `dudect-bencher` is gated behind the `dudect` feature so default builds
# never pull it in. Used by the timing-leak harnesses at
# `tests/dudect/{mac_eq,scope_subset}.rs`, wired as `harness = false` test
# binaries below. The harnesses statistically detect data-dependent timing
# in (a) `Signature` byte equality (the kernel-core's MAC-eq surface during
# signature verification) and (b) `NormalizedScope::is_subset_of` (the
# capability-algebra subset check).
= { = "0.7", = true }
[]
= ["std", "revocation-view"]
= ["chio-core-types/std", "serde/std", "serde_json/std"]
# Enables the `revocation_view` module: an arc-swap-backed read-only
# snapshot of the revocation oracle's most recent signed epoch root that
# dispatch consults on every call. Implies `std` because `arc-swap`
# itself requires std; the portable no_std + alloc proof leaves the
# module out and falls back to a denylist-only path. The `revocation-view`
# feature is on by default for hosted builds and explicitly disabled by
# the wasm portable proof via `--no-default-features`.
= ["dep:arc-swap", "std"]
# Enables `chio_kernel_core::fuzz`, the libFuzzer entry-point module for the
# receipt-log replay verifier. Implies `std` because libFuzzer itself only
# runs in a hosted environment, so the `no_std + alloc` portable proof never
# observes this surface. Off by default; turned on only by the `chio-fuzz`
# standalone workspace at `../../fuzz`.
= ["dep:arbitrary", "std"]
# Enables the dudect timing-leak harnesses at `tests/dudect/{mac_eq,
# scope_subset}.rs`. Implies `std` because dudect-bencher is a hosted-only
# tool (clap, ctrlc, OS time syscalls) that never runs in the portable
# `no_std + alloc` proof. Off by default; opt in via
# `cargo test -p chio-kernel-core --features dudect --release {mac_eq|scope_subset}`.
# CI lane: `.github/workflows/dudect.yml`.
= ["dep:dudect-bencher", "std"]
[]
= { = "../../core/chio-adversarial-suite" }
= { = true }
# Timing-leak dudect harnesses. `harness = false` so each test binary's
# `main` is provided by `dudect_bencher::ctbench_main!`. Gated behind the
# `dudect` feature so default `cargo test` does not try to compile them
# (the sources are `#![cfg(feature = "dudect")]`).
[[]]
= "dudect_mac_eq"
= "tests/dudect/mac_eq.rs"
= false
= ["dudect"]
[[]]
= "dudect_scope_subset"
= "tests/dudect/scope_subset.rs"
= false
= ["dudect"]
[]
= "deny"
= "deny"
[]
= { = "warn", = ["cfg(kani)"] }