pub struct WitnessRecord {
pub sequence: u64,
pub timestamp_ns: u64,
pub action_kind: u8,
pub proof_tier: u8,
pub flags: u8,
pub actor_partition_id: u32,
pub target_object_id: u64,
pub capability_hash: u32,
pub payload: [u8; 8],
pub prev_hash: u32,
pub record_hash: u32,
pub aux: [u8; 8],
/* private fields */
}Expand description
A single witness record. Exactly 64 bytes, cache-line aligned.
All fields are little-endian. The record is #[repr(C, align(64))] to
guarantee layout and alignment on all target architectures (AArch64,
RISC-V, x86-64).
§Layout
| Offset | Size | Field | Description |
|---|---|---|---|
| 0 | 8 | sequence | Monotonic sequence number |
| 8 | 8 | timestamp_ns | Nanosecond timestamp |
| 16 | 1 | action_kind | Privileged action discriminant |
| 17 | 1 | proof_tier | Proof tier (1, 2, or 3) |
| 18 | 1 | flags | Action-specific flags |
| 19 | 1 | _reserved | Reserved (must be zero) |
| 20 | 4 | actor_partition_id | Actor partition |
| 24 | 8 | target_object_id | Target object |
| 32 | 4 | capability_hash | Truncated cap hash |
| 36 | 8 | payload | Action-specific data |
| 44 | 4 | prev_hash | FNV-1a chain link |
| 48 | 4 | record_hash | FNV-1a self-integrity |
| 52 | 8 | aux | Secondary payload / TEE sig |
| 60 | 4 | _pad | Padding to 64 bytes |
Fields§
§sequence: u64Monotonic sequence number. Provides global ordering of all privileged actions.
timestamp_ns: u64Nanosecond timestamp from the system timer (CNTVCT_EL0 / rdtsc).
action_kind: u8Which privileged action was performed (see ActionKind).
proof_tier: u8Which proof tier authorized this action (1 = P1, 2 = P2, 3 = P3).
flags: u8Action-specific flags (interpretation varies by action_kind).
actor_partition_id: u32Partition that performed the action.
target_object_id: u64Object acted upon: partition, region, capability, etc.
capability_hash: u32Truncated FNV-1a hash of the capability used (not the full token).
payload: [u8; 8]Action-specific data, packed by kind.
Examples:
PartitionSplit:new_id_ain bytes [0..4],new_id_bin bytes [4..8].RegionTransfer:from_partitionin bytes [0..4],to_partitionin bytes [4..8].
prev_hash: u32FNV-1a hash of the previous record (chain link for tamper evidence).
record_hash: u32FNV-1a hash of bytes [0..44] of this record (self-integrity).
aux: [u8; 8]Secondary payload or TEE signature fragment.
Implementations§
Source§impl WitnessRecord
impl WitnessRecord
Trait Implementations§
Source§impl Clone for WitnessRecord
impl Clone for WitnessRecord
Source§fn clone(&self) -> WitnessRecord
fn clone(&self) -> WitnessRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more