From 9e396df55a9f897f0b08840cd142290e45c18f2e Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Fri, 4 Dec 2026 12:54:25 -0500 Subject: [PATCH 1/2] index-hosted-attestations: propose version 2 Signed-off-by: William Woodruff --- .../index-hosted-attestations.rst | 47 ++++++++++++++----- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/source/specifications/index-hosted-attestations.rst b/source/specifications/index-hosted-attestations.rst index d078e87bdc..12c600bd1b 100644 --- a/source/specifications/index-hosted-attestations.rst +++ b/source/specifications/index-hosted-attestations.rst @@ -41,9 +41,9 @@ object is provided as pseudocode below. @dataclass class Attestation: - version: Literal[1] + version: Literal[1, 2] """ - The attestation object's version, which is always 1. + The attestation object's version, which is always 1 or 2. """ verification_material: VerificationMaterial @@ -91,17 +91,28 @@ transparency log entries, and **MAY** include additional keys for other sources of signed time (such as an :rfc:`3161` Time Stamping Authority or a `Roughtime `__ server). -Attestation objects are versioned; this PEP specifies version 1. Each version -is tied to a single cryptographic suite to minimize unnecessary cryptographic -agility. In version 1, the suite is as follows: +Attestation objects are versioned, and this specification defined versions 1 and 2. + +Each version is tied to a single cryptographic suite to minimize unnecessary cryptographic +agility. + +In version 1, the suite is as follows: * Certificates are specified as X.509 certificates, and comply with the profile in :rfc:`5280`. * The message signature algorithm is ECDSA, with the P-256 curve for public keys and SHA-256 as the cryptographic digest function. -Future PEPs may change this suite (and the overall shape of the attestation -object) by selecting a new version number. +In version 2, the suite is as follows: + +* Certificates are specified as X.509 certificates, and comply with the profile in + :rfc:`5280`. +* The message signature algorithm is ECDSA, with the P-384 curve for public keys + and SHA-256 as the cryptographic digest function. + +Future updated to the attestation specification may change these +suites (and the overall shape of the attestation object) by selecting +a new version number. .. _payload-and-signature-generation: @@ -123,8 +134,9 @@ in the following ways: * ``subject[0].name`` is the distribution's filename, which **MUST** be a valid :ref:`source distribution ` or :ref:`wheel distribution ` filename. -* ``subject[0].digest`` **MUST** contain a SHA-256 digest. Other digests - **MAY** be present. The digests **MUST** be represented as hexadecimal strings. +* ``subject[0].digest`` **MUST** contain digest matching the attestation version. + Other digests **MAY** be present. The digests **MUST** be represented as hexadecimal + strings. * The following ``predicateType`` values are supported: * `SLSA Provenance `__: ``https://slsa.dev/provenance/v1`` @@ -215,7 +227,8 @@ or, as pseudocode: """ * ``version`` is ``1``. Like attestation objects, provenance objects are - versioned, and this PEP only defines version ``1``. + versioned, and this standard only defines version ``1``. + This version is independent from the attestation object version. * ``attestation_bundles`` is a **required** JSON array, containing one or more "bundles" of attestations. Each bundle corresponds to a signing identity (such as a Trusted Publishing identity), and contains @@ -264,18 +277,24 @@ Attestation verification Verifying an attestation object against a distribution file requires verification of each of the following: -* ``version`` is ``1``. The verifier **MUST** reject any other version. +* ``version`` is ``1`` or ``2``. The verifier **MUST** reject any other version. + Verifiers **MAY** choose to additionally reject known versions on a policy basis, + e.g. rejecting version 1 because the verifier expects only P-384 signatures. + * ``verification_material.certificate`` is a valid signing certificate, as issued by an *a priori* trusted authority (such as a root of trust already present within the verifying client). + * ``verification_material.certificate`` identifies an appropriate signing subject, such as the machine identity of the Trusted Publisher that published the package. + * ``envelope.statement`` is a valid in-toto v1 Statement, with a subject and digest that **MUST** match the distribution's filename and contents. For the distribution's filename, matching **MUST** be performed by parsing using the appropriate source distribution or wheel filename format, as the statement's subject may be equivalent but normalized. + * ``envelope.signature`` is a valid signature for ``envelope.statement`` corresponding to ``verification_material.certificate``, as reconstituted via the @@ -366,3 +385,9 @@ of signed inclusion time, and can be verified either online or offline. """ Cosigned checkpoints from zero or more log witnesses. """ + +History +======= + +* July 2024: initial standardization of index-hosted attestations, in :pep:`740` +* December 2026: definition of version 2 of the attestation object format From ea1f106e73f6324f6aba0ebb34d4a0b0f7ffda3d Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Fri, 4 Dec 2026 13:01:28 -0500 Subject: [PATCH 2/2] Apply suggestion from @woodruffw --- source/specifications/index-hosted-attestations.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/specifications/index-hosted-attestations.rst b/source/specifications/index-hosted-attestations.rst index 12c600bd1b..161521fe99 100644 --- a/source/specifications/index-hosted-attestations.rst +++ b/source/specifications/index-hosted-attestations.rst @@ -91,7 +91,7 @@ transparency log entries, and **MAY** include additional keys for other sources of signed time (such as an :rfc:`3161` Time Stamping Authority or a `Roughtime `__ server). -Attestation objects are versioned, and this specification defined versions 1 and 2. +Attestation objects are versioned, and this specification defines versions 1 and 2. Each version is tied to a single cryptographic suite to minimize unnecessary cryptographic agility.