Skip to main content

Module messages

Module messages 

Source
Expand description

ITS-S side of the ETSI TS 102 941 V2.2.1 security management messages: enrolment (clause 6.2.3.2) and authorization (clause 6.2.3.3), with the official ASN.1 modules (crate::security::pki_asn).

The functions build the request messages and read the responses; they do no I/O. Times are UTC seconds (now) so that callers can inject a clock.

Enrolment request (clause 6.2.3.2.1, Figure 14): EtsiTs103097Data-Encrypted (certRecipInfo of the EA, ECIES) of an EtsiTs103097Data-Signed (signer self with the canonical key, or digest of the EC) of EtsiTs102941Data {v1, enrolmentRequest} whose content is the InnerEcRequestSignedForPop (signer self, new key) of the InnerEcRequest.

Authorization request (clause 6.2.3.3.1, Figures 17 and 18): encrypted to the AA, the EtsiTs102941Data {v1, authorizationRequest} either signed with the new AT key (proof of possession) or unsecured; the InnerAtRequest carries encryptedEcSignature (encrypted to the EA): the EtsiTs103097Data-SignedExternalPayload by the EC over the SHA-256 hash of the SharedAtRequest.

Responses (clauses 6.2.3.2.2 and 6.2.3.3.2): encrypted with the request’s AES key (pskRecipInfo), signed by the EA / AA (signer digest), with the leftmost 16 octets of SHA-256 of the request as requestHash.

Structs§

PendingRequest
A request sent: its encoding, AES key and the new key pair to certify.
PkiProtocolError
A response cannot be read or does not match the request (code names the check).

Constants§

CT_REQUEST
HTTP content types (Annex C).
CT_RESPONSE
PSID_CERT_REQUEST
ITS-AID “secured certificate request” (ETSI TS 102 965).
SSP_AUTHORIZATION_REQUEST
SSP_ENROLMENT_REQUEST
SSP_VERSION
Certificate request SSP (clause B.4): version 1, then the permission bits.

Functions§

build_authorization_request
AuthorizationRequestMessage (pop false) or AuthorizationRequestMessageWithPop (clause 6.2.3.3.1), with privacy (encryptedEcSignature to the EA). A new key pair and hmacKey are generated.
build_enrolment_request
EnrolmentRequestMessage (clause 6.2.3.2.1). Initial request (current_ec None): itsId = canonical identifier its_id, outer signer self with the canonical key signer_key. Re-keying: itsId = HashedId8(EC), outer signer digest(EC) with the EC key. A new verification key pair is generated.
certificate_ssp
The SSP an EC requests: version 1, enrolment and authorization requests.
certifies
The verification key certified by certificate equals key (both canonical).
data_payload
SignedDataPayload data = unsecured EtsiTs103097Data containing content.
decrypt_psk
Decrypt a response encrypted with the request’s AES key (exactly one pskRecipInfo with psk_id); returns the decoded inner Ieee1609Dot2Data.
encrypt_to
EtsiTs103097Data-Encrypted for the encryption key of certificate: one certRecipInfo (its HashedId8), ECIES (fresh ephemeral key, KDF2 with P1 = SHA-256 of the canonical certificate, MAC1) on the AES-128-CCM key, which encrypts plaintext with a fresh nonce. Returns the data and the AES key.
key_tag
keyTag: HMAC-SHA256 with hmac_key over the serialization of the verificationKey and of the encryptionKey (if present), leftmost 128 bits.
psk_id
HashedId8 of the COER SymmetricEncryptionKey {aes128Ccm} holding key (pskRecipInfo, IEEE 1609.2 clause 6.3.34).
read_authorization_response
InnerAtResponse of an AuthorizationResponseMessage (clause 6.2.3.3.2).
read_enrolment_response
InnerEcResponse of an EnrolmentResponseMessage (clause 6.2.3.2.2).
read_signed
Content of an EtsiTs103097Data-Signed by signer (signer digest, psid 623, generationTime present, no other header, valid signature); errors otherwise.
request_hash
Leftmost 16 octets of SHA-256 of the request’s EtsiTs103097Data-Encrypted.
sign
An EtsiTs103097Data-Signed with headerInfo {psid 623, generationTime} only. The signer is self when signer is None (signature input with the empty signer, IEEE 1609.2 clause 5.3.1), else the digest of signer.
ssp_permits
The certificate’s appPermissions grant ITS-AID 623 with SSP version 1 and bit (clause B.4: 0x80 enrolment request, 0x40 authorization request).
time32
Time32 (TAI seconds since the ITS epoch, IEEE 1609.2 clause 6.4.15).
time64
Time64 (TAI microseconds since the ITS epoch), as generationTime.