Skip to content

Populate SEV-CORE - #420

Open
DGonzalezVillal wants to merge 5 commits into
virtee:snp-refactorfrom
DGonzalezVillal:sev-core
Open

DGonzalezVillal wants to merge 5 commits into
virtee:snp-refactorfrom
DGonzalezVillal:sev-core

Conversation

@DGonzalezVillal

Copy link
Copy Markdown
Member

Adds the sev-core crate from the workspace refactor proposal (docs/design/workspace-crates.md). Crate version is 0.1.0.

What's in it

  • parser: Cursor over &[u8], Decoder<P> and Encoder<P>, ByteParser (from_bytes/to_bytes), ByteWrite for Vec<u8>, and ParseError. Skips are zero-checked (skip_bytes) or return the original region (skip_bytes_lax).
  • Authenticate: a key or certificate that checks whether a signature belongs to it.
  • Verifiable<Root>: an artifact that verifys against a root. verify calls root.authenticate and returns an associated Output.
  • Attestable: produces an attestation token from a verified artifact.
    No crypto, no ABI types, and no role-crate impls. Those belong in sev-types, sev-endorser, and sev-verifier.

Testing

  • cargo test -p sev-core: 25 unit tests, 5 doc tests
  • cargo clippy -p sev-core --all-targets -- -D clippy::all -D unused_imports -D warnings -D clippy::style
  • cargo fmt --all -- --check

Open questions

  • Authenticate::authenticate takes only the signature. A signature check on a report also needs the signed body, so the report impl of Verifiable is not included here.

We will start the versioning for all crates from the start.

Signed-off-by: DGonzalezVillal <[email protected]>
Signed-off-by: DGonzalezVillal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant