-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
The modified rsi kernel modules canbe found at https://github.com/islet-project/realm-manager/tree/dev/m.szaknis/key_sealing/realm/linux-rsi |
lib/rust-rsi/src/ioctl/kernel.rs
Outdated
pub(super) realm_sealing_key: [u8; 32] | ||
} | ||
|
||
impl RsiSealingKey { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!!!
lib/rust-rsi/src/ioctl/kernel.rs
Outdated
|
||
nix::ioctl_read!(abi_version, b'x', 190u8, u64); | ||
nix::ioctl_readwrite_buf!(measurement_read, b'x', 192u8, RsiMeasurement); | ||
nix::ioctl_write_buf!(measurement_extend, b'x', 193u8, RsiMeasurement); | ||
nix::ioctl_readwrite_buf!(attestation_token, b'x', 194u8, RsiAttestation); | ||
nix::ioctl_readwrite_buf!(sealing_key, b'x', 195u8, RsiSealingKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those numbers were take from somewhere, SMCC? They were not random, hence 191 is unused here. Maybe don't use 195, but something higher? Might be wise to find where did I take it from ;-)
tools/rsictl/src/subcmds.rs
Outdated
@@ -154,3 +154,34 @@ pub(crate) fn verify_platform(args: &VerifyPlatformArgs) -> GenericResult | |||
tools::verify_print_platform(&token, &key)?; | |||
Ok(()) | |||
} | |||
|
|||
#[derive(ValueEnum, Debug, Copy, Clone)] | |||
pub(crate) enum SealingKeyFlags { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!!!
tools/rsictl/src/tools.rs
Outdated
@@ -49,3 +52,26 @@ pub(crate) fn verify_print_platform(token: &[u8], key: &[u8]) -> Result<(), rust | |||
rust_rsi::print_token_platform(&token); | |||
Ok(()) | |||
} | |||
|
|||
impl From<&SealingKeyFlags> for u64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!!!
Signed-off-by: Michał Szaknis <m.szaknis@samsung.com>
This add support for reading key material used in sealing keys derivation.