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
//! Capability system for the RVM coherence-native microhypervisor.
//!
//! Implements the three-layer proof system specified in ADR-135:
//!
//! | Layer | Name | Budget | v1 Status |
//! |-------|------|--------|-----------|
//! | **P1** | Capability Check | < 1 us | Ship |
//! | **P2** | Policy Validation | < 100 us | Ship |
//! | **P3** | Deep Proof | < 10 ms | Deferred |
//!
//! # Core Concepts
//!
//! - **Capability**: Unforgeable kernel-managed token with rights bitmap.
//! - **Derivation Tree**: Parent-child relationships with monotonic attenuation.
//! - **Delegation Depth**: Max 8 levels to prevent unbounded chains.
//! - **Epoch-based revocation**: Stale handles detected via epoch counter.
//!
//! # Design Principles (ADR-135)
//!
//! 1. A partition can only grant capabilities it holds
//! 2. Granted rights must be equal or fewer than held rights
//! 3. Revocation propagates through the derivation tree
//! 4. `GRANT_ONCE` provides non-transitive delegation
//! 5. Epoch-based invalidation detects stale handles
extern crate alloc;
extern crate std;
pub use ;
pub use ;
pub use GrantPolicy;
pub use ;
pub use ;
pub use ;
pub use ProofVerifier;
// Re-export commonly used types from rvm-types.
pub use ;
/// Default maximum delegation depth (ADR-135 Section: Capability Derivation Tree).
pub const DEFAULT_MAX_DELEGATION_DEPTH: u8 = 8;
/// Default capability table capacity per partition.
pub const DEFAULT_CAP_TABLE_CAPACITY: usize = 256;