Skip to main content

Module offline_device

Module offline_device 

Source
Expand description

Single-device offline profile (SPEC-v2 §7.13), TEST ONLY. Mirrors Go v2reference/offline_device.go.

DeviceComponentTestOnly models the independent component the profile requires on one device: an independently programmed secure element or TPM-backed module with its own key. It holds the anchored complete-state digest of the primary (DevicePrimaryTestOnly), which the primary advances before every durable security-state change takes effect, and it records, for every receipt-log entry, the entry hash and the complete-state digest it acknowledged, advances monotonically, and signs each acknowledgement. Nothing here is durable or independent; it exists so the shared profile scenarios can exercise power loss, primary rollback with and without a changed receipt prefix, digest mismatch, full storage, clock regression, and offline recovery against exact semantics.

Structs§

DeviceAcknowledgementTestOnly
One signed component record (Go DeviceAcknowledgementTestOnly).
DeviceCheckpointTestOnly
The primary’s view of the component (Go DeviceCheckpointTestOnly). It implements V2ReceiptCheckpoint: every acknowledgement it returns carries a component signature verified under the pinned key.
DeviceComponentTestOnly
The independent monotonic authenticated component (Go DeviceComponentTestOnly). Its clock is the device’s configured security-clock source.
DeviceUplinkTestOnly
The outbox upload after reconnection (Go DeviceUplinkTestOnly). It uploads signed receipts only from the component-acknowledged prefix, in log order, once each. Upload is an outbox operation: it never releases a decision, changes a release record, or makes a withheld result actionable.

Enums§

DeviceErrorTestOnly
The failures of the device component and checkpoint (Go ErrDevicePowerLoss, ErrDeviceStorageFull, ErrDeviceStateMismatch, ErrDeviceFrozen, and ErrNotAcknowledged), plus a store or clock failure passed through.
DevicePowerLoss
Where the next submission loses power (Go DevicePowerLoss).
DeviceStartupStatus
The result of the primary’s startup comparison with the component head (Go DeviceStartupStatus).

Functions§

verify_device_acknowledgement_test_only
Go VerifyDeviceAcknowledgementTestOnly: check a record under the pinned component public key.