Skip to content

Commit 43de29d

Browse files
Add checkpoint key ID to trust root
This adds a string to represent the checkpoint key ID for a log, which will differ for ed25519 logs. To simplify client implementation, we will provide this string so that clients don't have to compute the checkpoint key ID themselves using the public key. If it's not set, then a client should assume the log ID is equal to the checkpoint key ID, which is true for ecdsa and rsa logs. Ref: sigstore/rekor#2062 Signed-off-by: Hayden Blauzvern <[email protected]>
1 parent 1d62444 commit 43de29d

28 files changed

+326
-167
lines changed

gen/jsonschema/schemas/Bundle.schema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"properties": {
137137
"keyId": {
138138
"type": "string",
139-
"description": "The unique id of the log, represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2",
139+
"description": "The unique identity of the log, represented by its public key.",
140140
"format": "binary",
141141
"binaryEncoding": "base64"
142142
}
@@ -229,7 +229,7 @@
229229
"additionalProperties": false,
230230
"type": "object",
231231
"title": "Checkpoint",
232-
"description": "The checkpoint MUST contain a signature of the tree head (root hash), size of the tree and the transparency log's unique identifier (log ID). It MAY also be followed by any optional data. The result is a string, the format is described here https://github.com/transparency-dev/formats/blob/main/log/README.md The details are here https://github.com/sigstore/rekor/blob/a6e58f72b6b18cc06cefe61808efd562b9726330/pkg/util/signed_note.go#L114 The signature has the same format as InclusionPromise.signed_entry_timestamp. See below for more details."
232+
"description": "The checkpoint MUST contain an origin string as a unique log identifier, the tree size, and the root hash. It MAY also be followed by optional data, and clients MUST NOT assume optional data. The checkpoint MUST also contain a signature over the root hash (tree head). The checkpoint MAY contain additional signatures, but the first SHOULD be the signature from the log. Checkpoint contents are concatenated with newlines into a single string. The checkpoint format is described in https://github.com/transparency-dev/formats/blob/main/log/README.md and https://github.com/C2SP/C2SP/blob/main/tlog-checkpoint.md. An example implementation can be found in https://github.com/sigstore/rekor/blob/main/pkg/util/signed_note.go"
233233
},
234234
"dev.sigstore.rekor.v1.InclusionPromise": {
235235
"properties": {

gen/jsonschema/schemas/Checkpoint.schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"additionalProperties": false,
1212
"type": "object",
1313
"title": "Checkpoint",
14-
"description": "The checkpoint MUST contain a signature of the tree head (root hash), size of the tree and the transparency log's unique identifier (log ID). It MAY also be followed by any optional data. The result is a string, the format is described here https://github.com/transparency-dev/formats/blob/main/log/README.md The details are here https://github.com/sigstore/rekor/blob/a6e58f72b6b18cc06cefe61808efd562b9726330/pkg/util/signed_note.go#L114 The signature has the same format as InclusionPromise.signed_entry_timestamp. See below for more details."
14+
"description": "The checkpoint MUST contain an origin string as a unique log identifier, the tree size, and the root hash. It MAY also be followed by optional data, and clients MUST NOT assume optional data. The checkpoint MUST also contain a signature over the root hash (tree head). The checkpoint MAY contain additional signatures, but the first SHOULD be the signature from the log. Checkpoint contents are concatenated with newlines into a single string. The checkpoint format is described in https://github.com/transparency-dev/formats/blob/main/log/README.md and https://github.com/C2SP/C2SP/blob/main/tlog-checkpoint.md. An example implementation can be found in https://github.com/sigstore/rekor/blob/main/pkg/util/signed_note.go"
1515
}
1616
}
1717
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"$ref": "#/definitions/CheckpointKeyId",
4+
"definitions": {
5+
"CheckpointKeyId": {
6+
"properties": {
7+
"keyId": {
8+
"type": "string",
9+
"description": "The key ID in a checkpoint, as a prefix to the signature. SHOULD be 4 bytes long, as a truncated hash.",
10+
"format": "binary",
11+
"binaryEncoding": "base64"
12+
}
13+
},
14+
"additionalProperties": false,
15+
"type": "object",
16+
"title": "Checkpoint Key Id",
17+
"description": "The checkpoint key ID, following the specification described here for ECDSA and Ed25519 signatures: https://github.com/C2SP/C2SP/blob/main/signed-note.md#signatures For RSA signatures, the key ID will match the ECDSA format of the hashed DER-encoded SPKI public key. Publicly witnessed logs MUST NOT use RSA-signed checkpoints, since witnesses do not support RSA signatures. This is provided for convenience. Clients can also calculate the checkpoint key ID given the log's public key."
18+
}
19+
}
20+
}

gen/jsonschema/schemas/ClientTrustConfig.schema.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"properties": {
4242
"keyId": {
4343
"type": "string",
44-
"description": "The unique id of the log, represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2",
44+
"description": "The unique identity of the log, represented by its public key.",
4545
"format": "binary",
4646
"binaryEncoding": "base64"
4747
}
@@ -243,7 +243,12 @@
243243
"logId": {
244244
"$ref": "#/definitions/dev.sigstore.common.v1.LogId",
245245
"additionalProperties": false,
246-
"description": "The unique identifier for this transparency log."
246+
"description": "The unique identifier for this transparency log. Represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2"
247+
},
248+
"checkpointKeyId": {
249+
"$ref": "#/definitions/dev.sigstore.common.v1.LogId",
250+
"additionalProperties": false,
251+
"description": "The checkpoint key identifier for the log used in a checkpoint. Optional, not provided for logs that do not generate checkpoints. For logs that do generate checkpoints, if not set, assume log_id equals checkpoint_key_id. Follows the specification described here for ECDSA and Ed25519 signatures: https://github.com/C2SP/C2SP/blob/main/signed-note.md#signatures For RSA signatures, the key ID will match the ECDSA format, the hashed DER-encoded SPKI public key. Publicly witnessed logs MUST NOT use RSA-signed checkpoints, since witnesses do not support RSA signatures. This is provided for convenience. Clients can also calculate the checkpoint key ID given the log's public key. SHOULD be set for logs generating Ed25519 signatures. SHOULD be 4 bytes long, as a truncated hash."
247252
}
248253
},
249254
"additionalProperties": false,

gen/jsonschema/schemas/InclusionProof.schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"additionalProperties": false,
4848
"type": "object",
4949
"title": "Checkpoint",
50-
"description": "The checkpoint MUST contain a signature of the tree head (root hash), size of the tree and the transparency log's unique identifier (log ID). It MAY also be followed by any optional data. The result is a string, the format is described here https://github.com/transparency-dev/formats/blob/main/log/README.md The details are here https://github.com/sigstore/rekor/blob/a6e58f72b6b18cc06cefe61808efd562b9726330/pkg/util/signed_note.go#L114 The signature has the same format as InclusionPromise.signed_entry_timestamp. See below for more details."
50+
"description": "The checkpoint MUST contain an origin string as a unique log identifier, the tree size, and the root hash. It MAY also be followed by optional data, and clients MUST NOT assume optional data. The checkpoint MUST also contain a signature over the root hash (tree head). The checkpoint MAY contain additional signatures, but the first SHOULD be the signature from the log. Checkpoint contents are concatenated with newlines into a single string. The checkpoint format is described in https://github.com/transparency-dev/formats/blob/main/log/README.md and https://github.com/C2SP/C2SP/blob/main/tlog-checkpoint.md. An example implementation can be found in https://github.com/sigstore/rekor/blob/main/pkg/util/signed_note.go"
5151
}
5252
}
5353
}

gen/jsonschema/schemas/Input.schema.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
"properties": {
183183
"keyId": {
184184
"type": "string",
185-
"description": "The unique id of the log, represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2",
185+
"description": "The unique identity of the log, represented by its public key.",
186186
"format": "binary",
187187
"binaryEncoding": "base64"
188188
}
@@ -422,7 +422,7 @@
422422
"additionalProperties": false,
423423
"type": "object",
424424
"title": "Checkpoint",
425-
"description": "The checkpoint MUST contain a signature of the tree head (root hash), size of the tree and the transparency log's unique identifier (log ID). It MAY also be followed by any optional data. The result is a string, the format is described here https://github.com/transparency-dev/formats/blob/main/log/README.md The details are here https://github.com/sigstore/rekor/blob/a6e58f72b6b18cc06cefe61808efd562b9726330/pkg/util/signed_note.go#L114 The signature has the same format as InclusionPromise.signed_entry_timestamp. See below for more details."
425+
"description": "The checkpoint MUST contain an origin string as a unique log identifier, the tree size, and the root hash. It MAY also be followed by optional data, and clients MUST NOT assume optional data. The checkpoint MUST also contain a signature over the root hash (tree head). The checkpoint MAY contain additional signatures, but the first SHOULD be the signature from the log. Checkpoint contents are concatenated with newlines into a single string. The checkpoint format is described in https://github.com/transparency-dev/formats/blob/main/log/README.md and https://github.com/C2SP/C2SP/blob/main/tlog-checkpoint.md. An example implementation can be found in https://github.com/sigstore/rekor/blob/main/pkg/util/signed_note.go"
426426
},
427427
"dev.sigstore.rekor.v1.InclusionPromise": {
428428
"properties": {
@@ -585,7 +585,12 @@
585585
"logId": {
586586
"$ref": "#/definitions/dev.sigstore.common.v1.LogId",
587587
"additionalProperties": false,
588-
"description": "The unique identifier for this transparency log."
588+
"description": "The unique identifier for this transparency log. Represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2"
589+
},
590+
"checkpointKeyId": {
591+
"$ref": "#/definitions/dev.sigstore.common.v1.LogId",
592+
"additionalProperties": false,
593+
"description": "The checkpoint key identifier for the log used in a checkpoint. Optional, not provided for logs that do not generate checkpoints. For logs that do generate checkpoints, if not set, assume log_id equals checkpoint_key_id. Follows the specification described here for ECDSA and Ed25519 signatures: https://github.com/C2SP/C2SP/blob/main/signed-note.md#signatures For RSA signatures, the key ID will match the ECDSA format, the hashed DER-encoded SPKI public key. Publicly witnessed logs MUST NOT use RSA-signed checkpoints, since witnesses do not support RSA signatures. This is provided for convenience. Clients can also calculate the checkpoint key ID given the log's public key. SHOULD be set for logs generating Ed25519 signatures. SHOULD be 4 bytes long, as a truncated hash."
589594
}
590595
},
591596
"additionalProperties": false,

gen/jsonschema/schemas/LogId.schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"properties": {
77
"keyId": {
88
"type": "string",
9-
"description": "The unique id of the log, represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2",
9+
"description": "The unique identity of the log, represented by its public key.",
1010
"format": "binary",
1111
"binaryEncoding": "base64"
1212
}

gen/jsonschema/schemas/TransparencyLogEntry.schema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"properties": {
4949
"keyId": {
5050
"type": "string",
51-
"description": "The unique id of the log, represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2",
51+
"description": "The unique identity of the log, represented by its public key.",
5252
"format": "binary",
5353
"binaryEncoding": "base64"
5454
}
@@ -67,7 +67,7 @@
6767
"additionalProperties": false,
6868
"type": "object",
6969
"title": "Checkpoint",
70-
"description": "The checkpoint MUST contain a signature of the tree head (root hash), size of the tree and the transparency log's unique identifier (log ID). It MAY also be followed by any optional data. The result is a string, the format is described here https://github.com/transparency-dev/formats/blob/main/log/README.md The details are here https://github.com/sigstore/rekor/blob/a6e58f72b6b18cc06cefe61808efd562b9726330/pkg/util/signed_note.go#L114 The signature has the same format as InclusionPromise.signed_entry_timestamp. See below for more details."
70+
"description": "The checkpoint MUST contain an origin string as a unique log identifier, the tree size, and the root hash. It MAY also be followed by optional data, and clients MUST NOT assume optional data. The checkpoint MUST also contain a signature over the root hash (tree head). The checkpoint MAY contain additional signatures, but the first SHOULD be the signature from the log. Checkpoint contents are concatenated with newlines into a single string. The checkpoint format is described in https://github.com/transparency-dev/formats/blob/main/log/README.md and https://github.com/C2SP/C2SP/blob/main/tlog-checkpoint.md. An example implementation can be found in https://github.com/sigstore/rekor/blob/main/pkg/util/signed_note.go"
7171
},
7272
"dev.sigstore.rekor.v1.InclusionPromise": {
7373
"properties": {

gen/jsonschema/schemas/TransparencyLogInstance.schema.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@
2929
"logId": {
3030
"$ref": "#/definitions/dev.sigstore.common.v1.LogId",
3131
"additionalProperties": false,
32-
"description": "The unique identifier for this transparency log."
32+
"description": "The unique identifier for this transparency log. Represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2"
33+
},
34+
"checkpointKeyId": {
35+
"$ref": "#/definitions/dev.sigstore.common.v1.LogId",
36+
"additionalProperties": false,
37+
"description": "The checkpoint key identifier for the log used in a checkpoint. Optional, not provided for logs that do not generate checkpoints. For logs that do generate checkpoints, if not set, assume log_id equals checkpoint_key_id. Follows the specification described here for ECDSA and Ed25519 signatures: https://github.com/C2SP/C2SP/blob/main/signed-note.md#signatures For RSA signatures, the key ID will match the ECDSA format, the hashed DER-encoded SPKI public key. Publicly witnessed logs MUST NOT use RSA-signed checkpoints, since witnesses do not support RSA signatures. This is provided for convenience. Clients can also calculate the checkpoint key ID given the log's public key. SHOULD be set for logs generating Ed25519 signatures. SHOULD be 4 bytes long, as a truncated hash."
3338
}
3439
},
3540
"additionalProperties": false,
@@ -41,7 +46,7 @@
4146
"properties": {
4247
"keyId": {
4348
"type": "string",
44-
"description": "The unique id of the log, represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2",
49+
"description": "The unique identity of the log, represented by its public key.",
4550
"format": "binary",
4651
"binaryEncoding": "base64"
4752
}

gen/jsonschema/schemas/TrustedRoot.schema.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"properties": {
6464
"keyId": {
6565
"type": "string",
66-
"description": "The unique id of the log, represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2",
66+
"description": "The unique identity of the log, represented by its public key.",
6767
"format": "binary",
6868
"binaryEncoding": "base64"
6969
}
@@ -235,7 +235,12 @@
235235
"logId": {
236236
"$ref": "#/definitions/dev.sigstore.common.v1.LogId",
237237
"additionalProperties": false,
238-
"description": "The unique identifier for this transparency log."
238+
"description": "The unique identifier for this transparency log. Represented as the SHA-256 hash of the log's public key, calculated over the DER encoding of the key represented as SubjectPublicKeyInfo. See https://www.rfc-editor.org/rfc/rfc6962#section-3.2"
239+
},
240+
"checkpointKeyId": {
241+
"$ref": "#/definitions/dev.sigstore.common.v1.LogId",
242+
"additionalProperties": false,
243+
"description": "The checkpoint key identifier for the log used in a checkpoint. Optional, not provided for logs that do not generate checkpoints. For logs that do generate checkpoints, if not set, assume log_id equals checkpoint_key_id. Follows the specification described here for ECDSA and Ed25519 signatures: https://github.com/C2SP/C2SP/blob/main/signed-note.md#signatures For RSA signatures, the key ID will match the ECDSA format, the hashed DER-encoded SPKI public key. Publicly witnessed logs MUST NOT use RSA-signed checkpoints, since witnesses do not support RSA signatures. This is provided for convenience. Clients can also calculate the checkpoint key ID given the log's public key. SHOULD be set for logs generating Ed25519 signatures. SHOULD be 4 bytes long, as a truncated hash."
239244
}
240245
},
241246
"additionalProperties": false,

0 commit comments

Comments
 (0)