Skip to main content

verify_message

Function verify_message 

Source
pub fn verify_message(
    request: &SNVerifyRequest,
    backend: &EcdsaBackend,
    cert_library: &mut CertificateLibrary,
) -> (SNVerifyConfirm, Vec<VerifyEvent>)
Expand description

Stateless verification (ETSI TS 103 097 V2.2.1 clauses 5 and 7; IEEE Std 1609.2-2016 clauses 5.2.3.2.2 and 5.3.1). Checks, in order (the first failing one gives the report):

  1. decodable signed data with protocolVersion 3 (clause 5.1);
  2. signer identifier: certificate (exactly one) or digest; DENMs always use a certificate (clause 7.1.2);
  3. the signer certificate is a known, valid authorization ticket;
  4. headerInfo: generationTime present, p2pcdLearningRequest and missingCrlIdentifier absent (clause 5.2); CAM (clause 7.1.1) and DENM (clause 7.1.2) profiles;
  5. the PSID is in the appPermissions of the AT (the SSP is returned);
  6. the generationTime lies in the validity period of the AT chain;
  7. the generationLocation, when present, lies in the region of the chain;
  8. the signature, over Hash(Hash(tbsData) || Hash(AT)), with an algorithm matching the verification key.

Mirrors flexstack/security/verify_service.py.