Skip to main content

Module snp

Module snp 

Source
Expand description

Support for creating SNP ID blocks

Enumsยง

Error

Constantsยง

SNP_ECC_COMPONENT_SIZE_BYTES ๐Ÿ”’
SNP_ECC_KEY_SIZE_BYTES ๐Ÿ”’
SNP_ECDSA_CURVE_P384 ๐Ÿ”’
SNP_ID_KEY_ALGORITHM_ECDSA_P384_SHA384 ๐Ÿ”’

Functionsยง

generate_snp_measurement
Iterate through all headers, creating a launch digest which is then signed, returning the launch digest. Also emits a temporarily-signed [IgvmDirectiveHeader::SnpIdBlock] directive (the presence of this directive signals the IGVM loader to set id_block_en = 1 at launch time).
padded_le_component ๐Ÿ”’
Zero-pads and reverses a big-endian ECC component into a 72-byte little-endian array as required by the PSP ID block format.
sign_id_block_with_temp_key ๐Ÿ”’
Generate a temporary ECDSA P-384 key pair using the selected crypto backend, sign the SHA-384 hash of the ID block, and return the signature