Skip to main content

AttestationReport

Struct AttestationReport 

Source
#[repr(C)]
pub struct AttestationReport {
Show 29 fields pub version: u32, pub guest_svn: u32, pub policy: GuestPolicy, pub family_id: [u8; 16], pub image_id: [u8; 16], pub vmpl: u32, pub sig_algo: u32, pub current_tcb: TcbVersion, pub plat_info: PlatformInfo, pub key_info: KeyInfo, pub report_data: [u8; 64], pub measurement: [u8; 48], pub host_data: [u8; 32], pub id_key_digest: [u8; 48], pub author_key_digest: [u8; 48], pub report_id: [u8; 32], pub report_id_ma: [u8; 32], pub reported_tcb: TcbVersion, pub cpuid_fam_id: Option<u8>, pub cpuid_mod_id: Option<u8>, pub cpuid_step: Option<u8>, pub chip_id: [u8; 64], pub committed_tcb: TcbVersion, pub current: Version, pub committed: Version, pub launch_tcb: TcbVersion, pub launch_mit_vector: Option<u64>, pub current_mit_vector: Option<u64>, pub signature: Signature,
}
Expand description

Attestation Report for SEV-SNP guests. These are all the possible fields in the attestation report. Optional fields are set to none or a value depending on the version the system has. Added in version 3: The CPUID Family, Model and Stepping fields The Alias_Check_Complete field in the PlatformInfo field Added in version 5: The launch_mit_vector and current_mit_vector fields The page_swap_disabled field in the GuestPolicy field The SEV-TIO field in the PlatformInfo field

§Compatibility notice

This legacy eager-parsing model will be replaced in the next breaking release by a two-stage attestation report API that separates unverified report framing from verified report-body parsing.

Code that depends directly on AttestationReport should expect to migrate in the next breaking release.

Fields§

§version: u32

Version number of this attestation report. Set to 2h for this specification.

§guest_svn: u32

The guest SVN.

§policy: GuestPolicy

The guest policy.

§family_id: [u8; 16]

The family ID provided at launch.

§image_id: [u8; 16]

The image ID provided at launch.

§vmpl: u32

The request VMPL for the attestation report.

§sig_algo: u32

The signature algorithm used to sign this report.

§current_tcb: TcbVersion

Current TCB. See SNPTcbVersion

§plat_info: PlatformInfo

Information about the platform. See PlatformInfo

§key_info: KeyInfo

Information related to signing keys in the report. See KeyInfo

§report_data: [u8; 64]

Guest-provided 512 Bits of Data

§measurement: [u8; 48]

The measurement calculated at launch.

§host_data: [u8; 32]

Data provided by the hypervisor at launch.

§id_key_digest: [u8; 48]

SHA-384 digest of the ID public key that signed the ID block provided in SNP_LANUNCH_FINISH.

§author_key_digest: [u8; 48]

SHA-384 digest of the Author public key that certified the ID key, if provided in SNP_LAUNCH_FINSIH. Zeroes if AUTHOR_KEY_EN is 1.

§report_id: [u8; 32]

Report ID of this guest.

§report_id_ma: [u8; 32]

Report ID of this guest’s migration agent (if applicable).

§reported_tcb: TcbVersion

Reported TCB version used to derive the VCEK that signed this report.

§cpuid_fam_id: Option<u8>

CPUID Familiy ID (Combined Extended Family ID and Family ID)

§cpuid_mod_id: Option<u8>

CPUID Model (Combined Extended Model and Model fields)

§cpuid_step: Option<u8>

CPUID Stepping

§chip_id: [u8; 64]

If MaskChipId is set to 0, Identifier unique to the chip. Otherwise set to 0h.

§committed_tcb: TcbVersion

CommittedTCB

§current: Version

The build number of CurrentVersion

§committed: Version

The build number of CommittedVersion

§launch_tcb: TcbVersion

The CurrentTcb at the time the guest was launched or imported.

§launch_mit_vector: Option<u64>

The verified mitigation vecor value at the time the guest was launched (LaunchMitVector).

§current_mit_vector: Option<u64>

Value is set to the current verified mitigation vectore value (CurrentMitVector).

§signature: Signature

Signature of bytes 0 to 0x29F inclusive of this report. The format of the signature is found within Signature.

Trait Implementations§

Source§

impl ByteParser<()> for AttestationReport

Source§

const EXPECTED_LEN: Option<usize>

Expected size of the byte container
Source§

type Bytes = [u8; 1184]

Byte container definition Must be constructible and mutable as bytes for encoding,
Source§

fn from_bytes_with(bytes: &[u8], params: P) -> Result<Self, Error>
where Self: Sized + Decoder<P>,

Decode from an owned byte container with params.
Source§

fn to_bytes_with(&self, params: P) -> Result<Self::Bytes, Error>
where Self: Encoder<P>, Self::Bytes: TryFrom<Vec<u8>>,

Encode into an owned byte container with params.
Source§

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
where Self: Sized + Decoder<()>,

Helper from_bytes Function in case no parameters are needed
Source§

fn to_bytes(&self) -> Result<Self::Bytes, Error>
where Self: Encoder<()>, Self::Bytes: TryFrom<Vec<u8>>,

Helper to_bytes function in case no parameters are needed
Source§

impl Clone for AttestationReport

Source§

fn clone(&self) -> AttestationReport

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for AttestationReport

Source§

impl Debug for AttestationReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Decoder<()> for AttestationReport

Source§

fn decode(reader: &mut impl Read, _: ()) -> Result<AttestationReport, Error>

Decodes from the reader with the given parameters.
Source§

impl Default for AttestationReport

Source§

fn default() -> AttestationReport

Returns the “default value” for a type. Read more
Source§

impl Display for AttestationReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Encoder<()> for AttestationReport

Source§

fn encode(&self, writer: &mut impl Write, _: ()) -> Result<(), Error>

Encodes the object to raw bytes.
Source§

impl Eq for AttestationReport

Source§

impl Ord for AttestationReport

Source§

fn cmp(&self, other: &AttestationReport) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for AttestationReport

Source§

fn eq(&self, other: &AttestationReport) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for AttestationReport

Source§

fn partial_cmp(&self, other: &AttestationReport) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for AttestationReport

Source§

impl TryFrom<&AttestationReport> for ReportSignature

Source§

type Error = SignatureError

The type returned in the event of a conversion error.
Source§

fn try_from(report: &AttestationReport) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V