Skip to content

Commit

Permalink
runtime/src/consensus/registry: Add runtime encryption key (REK)
Browse files Browse the repository at this point in the history
  • Loading branch information
peternose committed Jan 16, 2023
1 parent e00b0ac commit c2843b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .changelog/5137.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
runtime/src/consensus/registry: Add runtime encryption key (REK)

Added REK to the node TEE capability descriptor to ensure old enclaves won't
panic when new ones register with a non-nil REK.
5 changes: 5 additions & 0 deletions runtime/src/consensus/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ pub struct CapabilityTEE {
/// Runtime attestation key.
pub rak: PublicKey,

/// Runtime encryption key.
#[cbor(optional)]
pub rek: Option<[u8; 32]>,

/// Attestation.
pub attestation: Vec<u8>,
}
Expand Down Expand Up @@ -894,6 +898,7 @@ mod tests {
hardware: TEEHardware::TEEHardwareIntelSGX,
rak: PublicKey::from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8"),
attestation: vec![0, 1,2,3,4,5],
..Default::default()
}),
},
extra_info: Some(vec![5,3,2,1]),
Expand Down
1 change: 1 addition & 0 deletions runtime/src/consensus/state/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ mod test {
hardware: TEEHardware::TEEHardwareIntelSGX,
rak: PublicKey::from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8"),
attestation: vec![0, 1,2,3,4,5],
..Default::default()
}),
},
extra_info: Some(vec![5,3,2,1]),
Expand Down

0 comments on commit c2843b0

Please sign in to comment.