Skip to main content

verify_cmod_signature

Function verify_cmod_signature 

Source
pub fn verify_cmod_signature(
    header_bytes: &[u8],
    key_id_offset: usize,
    sig_offset: usize,
    payload: &[u8],
) -> VerifyResult
Expand description

Verify a CMOD module’s signature.

Extracts key_id and signature from the raw header, then verifies the signature over payload (which must be code+data, NOT the header).

§Arguments

  • header_bytes - The raw CMOD header
  • key_id_offset - Byte offset of key_id in header
  • sig_offset - Byte offset of signature in header
  • payload - The data that was signed (code + data sections)