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 3 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
17 changes: 17 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,17 @@
# Algorithm Registry

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

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.

| Algorithm | Name | Usage |
| --- | --- | --- |
tetsuo-cpp marked this conversation as resolved.
Show resolved Hide resolved
| ECDSA | ecdsa-sha2-256-nistp256 | sign/verify |
woodruffw marked this conversation as resolved.
Show resolved Hide resolved
|| ecdsa-sha2-256-nistp521 | verify only |
tetsuo-cpp marked this conversation as resolved.
Show resolved Hide resolved
|| ecdsa-sha2-384-nistp384 | sign/verify |
| EdDSA | ed25519 | sign/verify |
|| ed25519-ph | sign/verify |
tetsuo-cpp marked this conversation as resolved.
Show resolved Hide resolved
134 changes: 106 additions & 28 deletions gen/pb-go/common/v1/sigstore_common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions gen/pb-ruby/lib/sigstore_common_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions gen/pb-typescript/src/__generated__/sigstore_common.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions protos/sigstore_common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@ message HashOutput {
bytes digest = 2;
}

// SupportedAlgorithm captures the signature/hash algorithm combinations allowed
// in the Sigstore ecosystem.
//
// This is modelled as a linear set as we want to provide a small number of
// opinionated options instead of allowing every possible permutation.
//
// Any changes to this enum MUST be reflected in the algorithm registry.
// See: docs/algorithm-registry.md
enum SupportedAlgorithm {
SUPPORTED_ALGORITHM_UNSPECIFIED = 0;
ECDSA_SHA2_256_NISTP256 = 1;
ECDSA_SHA2_256_NISTP521 = 2;
ECDSA_SHA2_384_NISTP384 = 3;
ED25519 = 4;
ED25519_PH = 5;
}

tetsuo-cpp marked this conversation as resolved.
Show resolved Hide resolved
// MessageSignature stores the computed signature over a message.
message MessageSignature {
// Message digest can be used to identify the artifact.
Expand Down