From c827a0ed12951f8353a7ca07af08aed6850964a4 Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 28 Oct 2025 18:50:09 +0800 Subject: [PATCH] add swap key slot --- libs/bao1x-api/src/offsets/baosec.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/bao1x-api/src/offsets/baosec.rs b/libs/bao1x-api/src/offsets/baosec.rs index f273141a1..f09f44dce 100644 --- a/libs/bao1x-api/src/offsets/baosec.rs +++ b/libs/bao1x-api/src/offsets/baosec.rs @@ -61,6 +61,9 @@ pub const RMA_KEY: SlotIndex = SlotIndex::Key(257, PartitionAccess::Fw0, RwPerms /// to developer mode. pub const CP_COOKIE: SlotIndex = SlotIndex::Key(258, PartitionAccess::Fw0, RwPerms::ReadWrite); +/// The swap encryption key. Used to protect swap images beyond the signing key, if we so desire. +pub const SWAP_KEY: SlotIndex = SlotIndex::Key(259, PartitionAccess::Fw0, RwPerms::ReadOnly); + /// `NUISANCE_KEYS` are hashed together with `ROOT_SEED` to derive the core secret. /// Their primary purpose is to annoy microscopists trying to read the secret key by /// directly imaging the RRAM array. They also exist to reduce power side channels