Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add algorithm registry markdown and KnownSignatureAlgorithm enumeration #194

Merged
merged 18 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions docs/algorithm-registry.md
tetsuo-cpp marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Algorithm Registry

This file is designed to act as a source of truth regarding what signing
algorithms are recommended across the Sigstore ecosystem. Any changes to this
file **must** be reflected in the `KnownSignatureAlgorithm` enumeration in
[sigstore_common.proto](../protos/sigstore_common.proto).
tetsuo-cpp marked this conversation as resolved.
Show resolved Hide resolved

Note that Sigstore clients and services aren't required support all algorithms
in this registry and may support algorithms that aren't in the registry. The
algorithm registry is more of a guideline than a rule and is meant to serve as
a secure set of defaults that the community can follow.

Refer to the [Sigstore: Configurable Crypto Algorithms](https://docs.google.com/document/d/18vTKFvTQdRt3OGz6Qd1xf04o-hugRYSup-1EAOWn7MQ/)
woodruffw marked this conversation as resolved.
Show resolved Hide resolved
specification for the design rationale for this registry.

## Signature Algorithms

| Algorithm | Name | Usage |
|-----------|----------------------------|---------------------------------------------------|
| RSA | rsa-sign-pkcs1-2048-sha256 | verify only |
| | rsa-sign-pkcs1-3072-sha256 | sign/verify |
| | rsa-sign-pkcs1-4096-sha256 | sign/verify |
| ECDSA | ecdsa-sha2-256-nistp256 | sign/verify |
| | ecdsa-sha2-384-nistp384 | sign/verify |
| | ecdsa-sha2-512-nistp521 | sign/verify |
| EdDSA | ed25519 | sign/verify |
| | ed25519-ph | sign/verify (recommended only for `hashedrekord`) |

## Hash Algorithms

Generally speaking, these hash algorithms are implied by the above signing suites.
However, clients *may* need to list or configure them explicitly, e.g. for custom
signing schemes or as part of a `hashedrekord` entry.
woodruffw marked this conversation as resolved.
Show resolved Hide resolved

| Algorithm | Name |
|-----------|--------------|
| SHA2 | sha2-256 |
| | sha2-256/192 |
woodruffw marked this conversation as resolved.
Show resolved Hide resolved
| | sha2-384 |
woodruffw marked this conversation as resolved.
Show resolved Hide resolved
| SHA3 | sha3-256 |
woodruffw marked this conversation as resolved.
Show resolved Hide resolved
| | sha3-384 |
6 changes: 5 additions & 1 deletion gen/jsonschema/schemas/Bundle.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@
"algorithm": {
"enum": [
"HASH_ALGORITHM_UNSPECIFIED",
"SHA2_256"
"SHA2_256",
"SHA2_256_192",
"SHA2_512",
"SHA3_256",
"SHA3_384"
],
"type": "string",
"title": "This package defines commonly used message types within the Sigstore\n community.",
Expand Down
6 changes: 5 additions & 1 deletion gen/jsonschema/schemas/HashOutput.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
"algorithm": {
"enum": [
"HASH_ALGORITHM_UNSPECIFIED",
"SHA2_256"
"SHA2_256",
"SHA2_256_192",
"SHA2_512",
"SHA3_256",
"SHA3_384"
],
"type": "string",
"title": "This package defines commonly used message types within the Sigstore\n community.",
Expand Down
12 changes: 10 additions & 2 deletions gen/jsonschema/schemas/Input.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@
"algorithm": {
"enum": [
"HASH_ALGORITHM_UNSPECIFIED",
"SHA2_256"
"SHA2_256",
"SHA2_256_192",
"SHA2_512",
"SHA3_256",
"SHA3_384"
],
"type": "string",
"title": "This package defines commonly used message types within the Sigstore\n community.",
Expand Down Expand Up @@ -543,7 +547,11 @@
"hashAlgorithm": {
"enum": [
"HASH_ALGORITHM_UNSPECIFIED",
"SHA2_256"
"SHA2_256",
"SHA2_256_192",
"SHA2_512",
"SHA3_256",
"SHA3_384"
],
"type": "string",
"title": "This package defines commonly used message types within the Sigstore\n community.",
Expand Down
6 changes: 5 additions & 1 deletion gen/jsonschema/schemas/MessageSignature.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
"algorithm": {
"enum": [
"HASH_ALGORITHM_UNSPECIFIED",
"SHA2_256"
"SHA2_256",
"SHA2_256_192",
"SHA2_512",
"SHA3_256",
"SHA3_384"
],
"type": "string",
"title": "This package defines commonly used message types within the Sigstore\n community.",
Expand Down
6 changes: 5 additions & 1 deletion gen/jsonschema/schemas/TransparencyLogInstance.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
"hashAlgorithm": {
"enum": [
"HASH_ALGORITHM_UNSPECIFIED",
"SHA2_256"
"SHA2_256",
"SHA2_256_192",
"SHA2_512",
"SHA3_256",
"SHA3_384"
],
"type": "string",
"title": "This package defines commonly used message types within the Sigstore\n community.",
Expand Down
6 changes: 5 additions & 1 deletion gen/jsonschema/schemas/TrustedRoot.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,11 @@
"hashAlgorithm": {
"enum": [
"HASH_ALGORITHM_UNSPECIFIED",
"SHA2_256"
"SHA2_256",
"SHA2_256_192",
"SHA2_512",
"SHA3_256",
"SHA3_384"
],
"type": "string",
"title": "This package defines commonly used message types within the Sigstore\n community.",
Expand Down
Loading