Skip to content

Add supports for generating identity signing key (IDK_S)#828

Open
sangho2 wants to merge 5 commits into
mainfrom
sanghle/lvbs/idk
Open

Add supports for generating identity signing key (IDK_S)#828
sangho2 wants to merge 5 commits into
mainfrom
sanghle/lvbs/idk

Conversation

@sangho2
Copy link
Copy Markdown
Contributor

@sangho2 sangho2 commented May 4, 2026

This PR adds supports for generating identity signing key (IDK_S) to the OP-TEE shim. A new function, generate_identity_signing_key generates an IDK_S key pair based on the platform root key and writes the public portion of it to the VTL0-side buffer. Currently, it returns an uncompressed SEC1 P-384 public key (97 bytes).

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new LVBS VSM call for deriving an identity signing key pair (IDK_S) from the platform root key and returning the public key to VTL0. It extends the LVBS VSM surface, adds supporting error/host plumbing, and brings in the crypto dependencies needed for P-384 key derivation.

Changes:

  • Add GenerateIdentitySigningKey VSM function ID and dispatcher support.
  • Implement IDK_S derivation/export logic in mshv::vsm, plus a unit test for the derivation helper.
  • Expose PRK retrieval, add new VSM errors, and update dependency/ratchet metadata.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
litebox_platform_lvbs/src/mshv/vsm.rs Adds IDK_S derivation, public-key export, dispatcher wiring, and a unit test.
litebox_platform_lvbs/src/mshv/mod.rs Defines the new VSM function ID and enum entry.
litebox_platform_lvbs/src/mshv/error.rs Adds PRK/IDK_S error variants and errno mappings.
litebox_platform_lvbs/src/host/mod.rs Re-exports PRK getter for internal use.
litebox_platform_lvbs/src/host/lvbs_impl.rs Adds PRK getter implementation.
litebox_platform_lvbs/Cargo.toml Adds hkdf and p384 dependencies.
dev_tests/src/ratchet.rs Updates the static-count ratchet for LVBS.
Cargo.lock Locks the newly added crypto dependency graph.

Comment thread litebox_platform_lvbs/Cargo.toml Outdated
Comment thread litebox_platform_lvbs/src/mshv/vsm.rs Outdated
Comment thread litebox_platform_lvbs/src/mshv/vsm.rs Outdated
@sangho2 sangho2 force-pushed the sanghle/lvbs/idk branch from 3079fff to ab3058c Compare May 5, 2026 00:34
@sangho2 sangho2 force-pushed the sanghle/lvbs/idk branch from ab3058c to 7c4de61 Compare May 5, 2026 00:42
@sangho2 sangho2 marked this pull request as ready for review May 5, 2026 00:43
@sangho2 sangho2 force-pushed the sanghle/lvbs/idk branch from 7c4de61 to 47835ef Compare May 5, 2026 03:22
@sangho2 sangho2 mentioned this pull request May 5, 2026
@sangho2 sangho2 force-pushed the sanghle/lvbs/idk branch from 8cabb64 to 23bb491 Compare May 14, 2026 16:09
@sangho2 sangho2 added discussion Open questions must-not-merge:undergoing-restructuring Known deeper set of changes are happening on this PR before it is mergeable again must-not-merge:prototype An experimental/proof-of-concept PR that must not be merged. and removed must-not-merge:undergoing-restructuring Known deeper set of changes are happening on this PR before it is mergeable again labels May 14, 2026
@sangho2
Copy link
Copy Markdown
Contributor Author

sangho2 commented May 14, 2026

VTL Call ABI for generating or getting IDK_S is straightforward. The main question is which layer should own IDK_S (LVBS platform/runner vs OP-TEE shim). If IDK_S is used only for OP-TEE scenarios, better to manage it in the OP-TEE Shim/PTA. Otherwise, if IDK_S is for a more general attestation service, better to maintain it in the platform/runner. This PR currently maintains IDK_S stuffs in the platform for simplicity (no cross-layer call is needed).

@sangho2 sangho2 removed the must-not-merge:prototype An experimental/proof-of-concept PR that must not be merged. label May 14, 2026
Comment thread litebox_platform_lvbs/src/mshv/mod.rs Outdated
@sangho2 sangho2 added the must-not-merge:undergoing-restructuring Known deeper set of changes are happening on this PR before it is mergeable again label May 18, 2026
@sangho2 sangho2 force-pushed the sanghle/lvbs/idk branch 2 times, most recently from a518676 to 23bb491 Compare May 18, 2026 18:05
@sangho2 sangho2 force-pushed the sanghle/lvbs/idk branch 2 times, most recently from 8ed190a to f060dee Compare May 18, 2026 21:52
@sangho2 sangho2 removed the must-not-merge:undergoing-restructuring Known deeper set of changes are happening on this PR before it is mergeable again label May 19, 2026
@sangho2 sangho2 force-pushed the sanghle/lvbs/idk branch from f060dee to bb2e955 Compare May 19, 2026 02:04
@github-actions
Copy link
Copy Markdown

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/enum_variant_added.ron

Failed in:
  variant VsmFunction:GenerateIdentitySigningKey in /home/runner/work/litebox/litebox/litebox_platform_lvbs/src/mshv/mod.rs:160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discussion Open questions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants