3. The Canonical Cache Representation content
The content of a Canonical Cache Representation is formally defined as follows:¶
RpkiCanonicalCacheRepresentation-2025
{ iso(1) member-body(2) us(840) rsadsi(113549)
pkcs(1) pkcs9(9) smime(16) mod(0) id-mod-rpkiCCR-2025(TBD) }
DEFINITIONS EXPLICIT TAGS ::=
BEGIN
IMPORTS
CONTENT-TYPE, Digest, DigestAlgorithmIdentifier, SubjectKeyIdentifier
FROM CryptographicMessageSyntax-2010 -- in [RFC6268]
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
pkcs-9(9) smime(16) modules(0) id-mod-cms-2009(58) }
ASID, ROAIPAddressFamily
FROM RPKI-ROA-2023 -- in [RFC9582]
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
pkcs9(9) smime(16) mod(0) id-mod-rpkiROA-2023(75) }
CertificateSerialNumber, SubjectPublicKeyInfo
FROM PKIX1Explicit-2009
{ iso(1) identified-organization(3) dod(6) internet(1) security(5)
mechanisms(5) pkix(7) id-mod(0) id-mod-pkix1-explicit-02(51) }
AccessDescription, KeyIdentifier
FROM PKIX1Implicit-2009
{iso(1) identified-organization(3) dod(6) internet(1) security(5)
mechanisms(5) pkix(7) id-mod(0) id-mod-pkix1-implicit-02(59) }
;
EncapsulatedContentInfo ::= SEQUENCE {
eContentType CONTENT-TYPE.&id({ContentSet}),
eContent [0] EXPLICIT OCTET STRING
(CONTAINING CONTENT-TYPE.&Type({ContentSet}{@eContentType})) OPTIONAL }
ContentSet CONTENT-TYPE ::= {
ct-rpkiCanonicalCacheRepresentation, ... }
ct-rpkiCanonicalCacheRepresentation CONTENT-TYPE ::=
{ TYPE RpkiCanonicalCacheRepresentation
IDENTIFIED BY id-ct-rpkiCanonicalCacheRepresentation }
id-ct-rpkiCanonicalCacheRepresentation OBJECT IDENTIFIER ::=
{ iso(1) identified-organization(3) dod(6) internet(1) private(4)
enterprise(1) snijders(41948) ccr(828) }
RpkiCanonicalCacheRepresentation ::= SEQUENCE {
version [0] INTEGER DEFAULT 0,
hashAlg DigestAlgorithmIdentifier,
producedAt GeneralizedTime,
mfts [1] ManifestState OPTIONAL,
vrps [2] ROAPayloadState OPTIONAL,
vaps [3] ASPAPayloadState OPTIONAL,
tas [4] TrustAnchorState OPTIONAL,
rks [5] RouterKeyState OPTIONAL,
... }
-- at least one of mfts, vrps, vaps, or tas MUST be present
( WITH COMPONENTS { ..., mfts PRESENT } |
WITH COMPONENTS { ..., vrps PRESENT } |
WITH COMPONENTS { ..., vaps PRESENT } |
WITH COMPONENTS { ..., tas PRESENT } |
WITH COMPONENTS { ..., rks PRESENT } )
ManifestState ::= SEQUENCE {
mis SEQUENCE OF ManifestInstance,
mostRecentUpdate GeneralizedTime,
hash Digest }
ManifestInstance ::= SEQUENCE {
hash Digest,
size INTEGER (1000..MAX),
aki KeyIdentifier,
manifestNumber INTEGER (0..MAX),
thisUpdate GeneralizedTime,
locations SEQUENCE SIZE (1..MAX) OF AccessDescription,
subordinates SEQUENCE (SIZE(1..MAX)) OF SubjectKeyIdentifier OPTIONAL }
ROAPayloadState ::= SEQUENCE {
rps SEQUENCE OF ROAPayloadSet,
hash Digest }
ROAPayloadSet ::= SEQUENCE {
asID ASID,
ipAddrBlocks SEQUENCE (SIZE(1..2)) OF ROAIPAddressFamily }
ASPAPayloadState ::= SEQUENCE {
aps SEQUENCE OF ASPAPayloadSet,
hash Digest }
ASPAPayloadSet ::= SEQUENCE {
customerASID ASID,
providers SEQUENCE (SIZE(1..MAX)) OF ASID }
TrustAnchorState ::= SEQUENCE {
skis SEQUENCE (SIZE(1..MAX)) OF SubjectKeyIdentifier,
hash Digest }
RouterKeyState ::= SEQUENCE {
rksets SEQUENCE OF RouterKeySet,
hash Digest }
RouterKeySet ::= SEQUENCE {
asID ASID,
routerKeys SEQUENCE (SIZE(1..MAX)) OF RouterKey }
RouterKey ::= SEQUENCE {
ski SubjectKeyIdentifier,
spki SubjectPublicKeyInfo }
END
¶
3.1. version
The version field contains the format version for the RpkiCanonicalCacheRepresentation structure, in this version of the specification it MUST be 0.¶
3.2. hashAlg
The hashAlg field specifies the algorithm used to construct the message digests.
This profile uses SHA-256 [SHS], therefore the OID MUST be 2.16.840.1.101.3.4.2.1.¶
3.3. producedAt
The producedAt field contains a GeneralizedTime and indicates the moment in time the CCR was generated.¶
3.4. State aspect fields
Each CCR contains one or more fields representing particular aspects of the cache's state.
Implementers should note the ellipsis extension marker in the RpkiCanonicalCacheRepresentation ASN.1 notation and anticipate future changes as new signed object types are standardized.¶
Each state aspect generally consists of a sequence of details extracted from RPKI Objects of a specific type, along with a digest computed by hashing the aforementioned DER-encoded sequence, optionally including some metadata.¶
3.4.1. ManifestState
An instance of ManifestState represents the set of valid, current Manifests ([RFC9286]) in the cache.
It contains three fields: mis, mostRecentUpdate, and hash.¶
3.4.1.1. ManifestInstance
The mis field contains a SEQUENCE of ManifestInstance.
There is one ManifestInstance for each current manifest.
A manifest is nominally current until the time specified in nextUpdate or until a manifest is issued with a greater manifestNumber, whichever comes first (see Section 4.2.1 of [RFC9286]).¶
A ManifestInstance is a structure consisting of the following fields:¶
hash- the hash of the DER-encoded manifest object¶
size- the size of the manifest object¶
aki- the manifest issuer's key identifier¶
manifestNumber- the manifest number contained within the manifest's eContent field¶
thisUpdate- the thisUpdate contained within the manifest's eContent field¶
locations- a sequence of
AccessDescriptioninstances from the manifest's End-Entity certificate's Subject Information Access extension¶ subordinates- a optional non-empty SEQUENCE of
SubjectKeyIdentifier¶
The subordinates field represents the keypairs associated with the set of non-revoked, non-expired, validly signed resource certificates subordinate to the manifest issuer.
Each SubjectKeyIdentifier is the 160-bit SHA-1 hash of the value of the DER-encoded ASN.1 bit string of the resource certificate's Subject Public Key, as described in Section 4.8.2 of [RFC6487].
The sequence elements of the subordinates field MUST be sorted in ascending order by interpreting each SubjectKeyIdentifier value as an unsigned 160-bit integer and MUST be unique with respect to each other.¶
The sequence elements in the mis field MUST be sorted in ascending order by hash value contained in each instance of ManifestInstance and MUST be unique with respect to the other instances of ManifestInstance.¶
3.4.1.2. mostRecentUpdate
The mostRecentUpdate is a metadata field which contains the most recent thisUpdate amongst all current manifests represented by the ManifestInstance structures.
If the mis field contains an empty sequence, the mostRecentUpdate MUST be set to the POSIX Epoch ("19700101000000Z").¶
3.4.1.3. hash
The hash field contains a message digest computed using the mis value (encoded in DER format) as input message.¶
3.4.2. ROAPayloadState
An instance of ROAPayloadState contains a field named rps which represents the current set of Validated ROA Payloads (Section 2 of [RFC6811]) encoded as a SEQUENCE of ROAPayloadSet instances.¶
The ROAPayloadSet structure is modeled after the RouteOriginAttestation (Section 4 of [RFC9582]).
The asID value in each instance of ROAPayloadSet MUST be unique with respect to other instances of ROAPayloadSet.
The contents of the ipAddrBlocks field MUST appear in canonical form and ordered as defined in Section 4.3.3 of [RFC9582].¶
The hash field contains a message digest computed using the rps value (encoded in DER format) as input message.¶
3.4.3. ASPAPayloadState
An instance of ASPAPayloadState contains an aps field which represents the current set of deduplicated and merged ASPA payloads ([I-D.ietf-sidrops-aspa-profile]) ordered by ascending customerASID value encoded as a SEQUENCE of ASPAPayloadSet instances.
The customerASID value in each instance of ASPAPayloadSet MUST be unique with respect to other instances of ASPAPayloadSet.¶
The ASPAPayloadSet structure is modeled after the ProviderASSet (Section 3.3 of [I-D.ietf-sidrops-aspa-profile]).¶
The hash field contains a message digest computed using the aps value (encoded in DER format) as input message.¶
3.4.4. TrustAnchorState
An instance of TrustAnchorState represents the set of valid Trust Anchor (TA) Certification Authority (CA) resource certificates used by the relying party when producing the CCR.¶
Each SubjectKeyIdentifier is the 160-bit SHA-1 hash of the value of the DER-encoded ASN.1 bit string of the TA's Subject Public Key, as described in Section 4.8.2 of [RFC6487].
The skis field contains a sequence of Subject Key Identifiers (SKI) sorted in ascending order by interpreting the SKI value as an unsigned 160-bit integer.¶
The hash field contains a message digest computed using the skis value (encoded in DER format) as input message.¶
3.4.5. RouterKeyState
An instance of RouterKeyState contains an rksets field which represents the current set of valid BGPsec Router Keys [RFC8205] encoded as a SEQUENCE of RouterKeySet instances.
The asID value in each instance of RouterKeySet MUST be unique with respect to other instances of RouterKeySet.
Instances of RouterKeySet are sorted by ascending value of asID.
Instances of RouterKey are sorted by ascending value of ski by interpreting the SKI value as an unsigned 160-bit integer.¶
The hash field contains a message digest computed using the rks value (encoded in DER format) as input message.¶