| Internet-Draft | C509 Prefix Reproduction | December 2026 |
| Jones | Expires 5 June 2027 | [Page] |
This individual Internet-Draft reproduces the first 42 octets of a published synthetic C509 certificate. It documents the semantic inputs, encoding procedure, comparison boundary, and limits of a field-level interoperability result.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 5 June 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
The source is the Type 2 certificate in Section 4.1 of [C509-VECTORS]. The test compares byte offsets 0 through 41, inclusive, using the CBOR rules in [RFC8949]. It checks the array header and fields 0 through 7. The public-key material, extensions, and signature are outside the comparison.¶
The inputs in order are an eleven-member array header, type integer 2, a serial number byte string containing hexadecimal 1234, algorithm integer -256, a null issuer, two unsigned epoch-second values for 2025-01-02 and 2026-01-02 at 00:00:00 UTC, the 22 UTF-8 octets of selfsign-rsa-with-sha1, and public key algorithm integer 0. There is no string terminator.¶
Save the following as check.py and run python3 -I check.py. The program constructs the observed bytes from the semantic values before loading the comparison constant. The expected constant comes from the published plain hex. This is a reconstruction from a previously inspected public source.¶
from datetime import datetime, timezone
def epoch_field(year):
seconds = int(datetime(year, 1, 2, tzinfo=timezone.utc).timestamp())
return bytes([26]) + seconds.to_bytes(4, "big")
serial = bytes.fromhex("1234")
subject = b"selfsign-rsa-with-sha1"
assert len(subject) == 22
actual = (
bytes([128 + 11, 2, 64 + len(serial)]) + serial
+ bytes([56, -1 - (-256), 246])
+ epoch_field(2025) + epoch_field(2026)
+ bytes([96 + len(subject)]) + subject + bytes([0])
)
print(actual.hex())
expected = bytes.fromhex(
"8B0242123438FFF61A6775D7001A69570A807673656C667369676E2D7273612D7769"
"74682D7368613100"
)
assert len(actual) == 42 and actual == expected
print("MATCH")
¶
The observed result was MATCH. The subject occupies offsets 18 through 40, including its header. The integer 0 at offset 41 confirms the boundary under this comparison.¶
A report for this check can identify the source revision, section, range, expected bytes, observed bytes, and result. A verifier can preserve a successful result for that range while reporting signature verification, chain validation, and authorization as unassessed. A recipient's policy disposition is a separate finding.¶
The encoding comparison concerns a C509 certificate prefix. For COSE_Sign1, the signature input is a separate structure with the protected header byte string, external AAD, and payload under the Signature1 context, as specified in [RFC9052]. No COSE signature input is constructed here.¶
The published fixture includes a legacy signature algorithm identifier. The match checks the encoding of the identifier. Algorithm acceptability, signature validity, signer identity, and certificate trust require separate checks. A prefix match alone leaves the unexamined bytes unconstrained. A verifier relying on an entire certificate needs full-object parsing and its applicable validation policy.¶
This document requests no IANA actions.¶