// This file is @generated by prost-build. /// HashOutput captures a digest of a 'message' (generic octet sequence) /// and the corresponding hash algorithm used. #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.HashOutput")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct HashOutput { #[prost(enumeration = "HashAlgorithm", tag = "1")] pub algorithm: i32, /// This is the raw octets of the message digest as computed by /// the hash algorithm. #[prost(bytes = "vec", tag = "2")] pub digest: ::prost::alloc::vec::Vec, } /// MessageSignature stores the computed signature over a message. #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.MessageSignature")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct MessageSignature { /// Message digest can be used to identify the artifact. /// Clients MUST NOT attempt to use this digest to verify the associated /// signature; it is intended solely for identification. #[prost(message, optional, tag = "1")] pub message_digest: ::core::option::Option, /// The raw bytes as returned from the signature algorithm. /// The signature algorithm (and so the format of the signature bytes) /// are determined by the contents of the 'verification_material', /// either a key-pair or a certificate. If using a certificate, the /// certificate contains the required information on the signature /// algorithm. /// When using a key pair, the algorithm MUST be part of the public /// key, which MUST be communicated out-of-band. #[prost(bytes = "vec", tag = "2")] pub signature: ::prost::alloc::vec::Vec, } /// LogId captures the identity of a transparency log. #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.LogId")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct LogId { /// The unique identity of the log, represented by its public key. #[prost(bytes = "vec", tag = "1")] pub key_id: ::prost::alloc::vec::Vec, } /// This message holds a RFC 3161 timestamp. #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.RFC3161SignedTimestamp")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Rfc3161SignedTimestamp { /// Signed timestamp is the DER encoded TimeStampResponse. /// See #[prost(bytes = "vec", tag = "1")] pub signed_timestamp: ::prost::alloc::vec::Vec, } #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.PublicKey")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PublicKey { /// DER-encoded public key, encoding method is specified by the /// key_details attribute. #[prost(bytes = "vec", optional, tag = "1")] pub raw_bytes: ::core::option::Option<::prost::alloc::vec::Vec>, /// Key encoding and signature algorithm to use for this key. #[prost(enumeration = "PublicKeyDetails", tag = "2")] pub key_details: i32, /// Optional validity period for this key, *inclusive* of the endpoints. #[prost(message, optional, tag = "3")] pub valid_for: ::core::option::Option, } /// PublicKeyIdentifier can be used to identify an (out of band) delivered /// key, to verify a signature. #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.PublicKeyIdentifier")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PublicKeyIdentifier { /// Optional unauthenticated hint on which key to use. /// The format of the hint must be agreed upon out of band by the /// signer and the verifiers, and so is not subject to this /// specification. /// Example use-case is to specify the public key to use, from a /// trusted key-ring. /// Implementors are RECOMMENDED to derive the value from the public /// key as described in RFC 6962. /// See: <> #[prost(string, tag = "1")] pub hint: ::prost::alloc::string::String, } /// An ASN.1 OBJECT IDENTIFIER #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.ObjectIdentifier")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ObjectIdentifier { #[prost(int32, repeated, packed = "false", tag = "1")] pub id: ::prost::alloc::vec::Vec, } /// An OID and the corresponding (byte) value. #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.ObjectIdentifierValuePair")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ObjectIdentifierValuePair { #[prost(message, optional, tag = "1")] pub oid: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] pub value: ::prost::alloc::vec::Vec, } #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.DistinguishedName")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct DistinguishedName { #[prost(string, tag = "1")] pub organization: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub common_name: ::prost::alloc::string::String, } #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.X509Certificate")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct X509Certificate { /// DER-encoded X.509 certificate. #[prost(bytes = "vec", tag = "1")] pub raw_bytes: ::prost::alloc::vec::Vec, } #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.SubjectAlternativeName")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SubjectAlternativeName { #[prost(enumeration = "SubjectAlternativeNameType", tag = "1")] pub r#type: i32, #[prost(oneof = "subject_alternative_name::Identity", tags = "2, 3")] pub identity: ::core::option::Option, } /// Nested message and enum types in `SubjectAlternativeName`. pub mod subject_alternative_name { #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Identity { /// A regular expression describing the expected value for /// the SAN. #[prost(string, tag = "2")] Regexp(::prost::alloc::string::String), /// The exact value to match against. #[prost(string, tag = "3")] Value(::prost::alloc::string::String), } } /// A collection of X.509 certificates. /// /// This "chain" can be used in multiple contexts, such as providing a root CA /// certificate within a TUF root of trust or multiple untrusted certificates for /// the purpose of chain building. #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.X509CertificateChain")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, PartialEq, ::prost::Message)] pub struct X509CertificateChain { /// One or more DER-encoded certificates. /// /// In some contexts (such as `VerificationMaterial.x509_certificate_chain`), this sequence /// has an imposed order. Unless explicitly specified, there is otherwise no /// guaranteed order. #[prost(message, repeated, tag = "1")] pub certificates: ::prost::alloc::vec::Vec, } /// The time range is closed and includes both the start and end times, /// (i.e., \[start, end\]). /// End is optional to be able to capture a period that has started but /// has no known end. #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(::prost_reflect::ReflectMessage)] #[prost_reflect(message_name = "dev.sigstore.common.v1.TimeRange")] #[prost_reflect(file_descriptor_set_bytes = "crate::FILE_DESCRIPTOR_SET_BYTES")] #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct TimeRange { #[prost(message, optional, tag = "1")] pub start: ::core::option::Option<::prost_types::Timestamp>, #[prost(message, optional, tag = "2")] pub end: ::core::option::Option<::prost_types::Timestamp>, } /// Only a subset of the secure hash standard algorithms are supported. /// See <> for more /// details. /// UNSPECIFIED SHOULD not be used, primary reason for inclusion is to force /// any proto JSON serialization to emit the used hash algorithm, as default /// option is to *omit* the default value of an enum (which is the first /// value, represented by '0'. #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum HashAlgorithm { Unspecified = 0, Sha2256 = 1, Sha2384 = 2, Sha2512 = 3, /// Used for LMS #[deprecated] Sha3256 = 4, /// Used for LMS #[deprecated] Sha3384 = 5, } impl HashAlgorithm { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { Self::Unspecified => "HASH_ALGORITHM_UNSPECIFIED", Self::Sha2256 => "SHA2_256", Self::Sha2384 => "SHA2_384", Self::Sha2512 => "SHA2_512", #[allow(deprecated)] Self::Sha3256 => "SHA3_256", #[allow(deprecated)] Self::Sha3384 => "SHA3_384", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { "HASH_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified), "SHA2_256" => Some(Self::Sha2256), "SHA2_384" => Some(Self::Sha2384), "SHA2_512" => Some(Self::Sha2512), "SHA3_256" => Some(#[allow(deprecated)] Self::Sha3256), "SHA3_384" => Some(#[allow(deprecated)] Self::Sha3384), _ => None, } } } /// Details of a specific public key, capturing the the key encoding method, /// and signature algorithm. /// /// PublicKeyDetails captures the public key/hash algorithm combinations /// recommended 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: <> /// /// To avoid the possibility of contradicting formats such as PKCS1 with /// ED25519 the valid permutations are listed as a linear set instead of a /// cartesian set (i.e one combined variable instead of two, one for encoding /// and one for the signature algorithm). #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum PublicKeyDetails { Unspecified = 0, /// RSA /// /// See RFC8017 #[deprecated] Pkcs1RsaPkcs1v5 = 1, /// See RFC8017 #[deprecated] Pkcs1RsaPss = 2, #[deprecated] PkixRsaPkcs1v5 = 3, #[deprecated] PkixRsaPss = 4, /// RSA public key in PKIX format, PKCS#1v1.5 signature PkixRsaPkcs1v152048Sha256 = 9, PkixRsaPkcs1v153072Sha256 = 10, PkixRsaPkcs1v154096Sha256 = 11, /// RSA public key in PKIX format, RSASSA-PSS signature /// /// See RFC4055 PkixRsaPss2048Sha256 = 16, PkixRsaPss3072Sha256 = 17, PkixRsaPss4096Sha256 = 18, /// ECDSA /// /// See RFC6979 #[deprecated] PkixEcdsaP256HmacSha256 = 6, /// See NIST FIPS 186-4 PkixEcdsaP256Sha256 = 5, PkixEcdsaP384Sha384 = 12, PkixEcdsaP521Sha512 = 13, /// Ed 25519 /// /// See RFC8032 PkixEd25519 = 7, PkixEd25519Ph = 8, /// These algorithms are deprecated and should not be used, but they /// were/are being used by most Sigstore clients implementations. #[deprecated] PkixEcdsaP384Sha256 = 19, #[deprecated] PkixEcdsaP521Sha256 = 20, /// LMS and LM-OTS /// /// These algorithms are deprecated and should not be used. /// There are no plans to support SLH-DSA at this time. /// /// USER WARNING: LMS and LM-OTS are both stateful signature schemes. /// Using them correctly requires discretion and careful consideration /// to ensure that individual secret keys are not used more than once. /// In addition, LM-OTS is a single-use scheme, meaning that it /// MUST NOT be used for more than one signature per LM-OTS key. /// If you cannot maintain these invariants, you MUST NOT use these /// schemes. #[deprecated] LmsSha256 = 14, #[deprecated] LmotsSha256 = 15, /// ML-DSA /// /// These ML_DSA_44, ML_DSA_65 and ML-DSA_87 algorithms are the pure variants /// that take data to sign rather than the prehash variants (HashML-DSA), which /// take digests. While considered quantum-resistant, their usage /// involves tradeoffs in that signatures and keys are much larger, and /// this makes deployments more costly. /// /// USER WARNING: ML_DSA_44, ML_DSA_65 and ML_DSA_87 are experimental algorithms. /// In the future they MAY be used by private Sigstore deployments, but /// they are not yet fully functional. This warning will be removed when /// these algorithms are widely supported by Sigstore clients and servers, /// but care should still be taken for production environments. /// /// See NIST FIPS 204, RFC 9881 for algorithm identifiers MlDsa44 = 23, MlDsa65 = 21, MlDsa87 = 22, } impl PublicKeyDetails { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { Self::Unspecified => "PUBLIC_KEY_DETAILS_UNSPECIFIED", #[allow(deprecated)] Self::Pkcs1RsaPkcs1v5 => "PKCS1_RSA_PKCS1V5", #[allow(deprecated)] Self::Pkcs1RsaPss => "PKCS1_RSA_PSS", #[allow(deprecated)] Self::PkixRsaPkcs1v5 => "PKIX_RSA_PKCS1V5", #[allow(deprecated)] Self::PkixRsaPss => "PKIX_RSA_PSS", Self::PkixRsaPkcs1v152048Sha256 => "PKIX_RSA_PKCS1V15_2048_SHA256", Self::PkixRsaPkcs1v153072Sha256 => "PKIX_RSA_PKCS1V15_3072_SHA256", Self::PkixRsaPkcs1v154096Sha256 => "PKIX_RSA_PKCS1V15_4096_SHA256", Self::PkixRsaPss2048Sha256 => "PKIX_RSA_PSS_2048_SHA256", Self::PkixRsaPss3072Sha256 => "PKIX_RSA_PSS_3072_SHA256", Self::PkixRsaPss4096Sha256 => "PKIX_RSA_PSS_4096_SHA256", #[allow(deprecated)] Self::PkixEcdsaP256HmacSha256 => "PKIX_ECDSA_P256_HMAC_SHA_256", Self::PkixEcdsaP256Sha256 => "PKIX_ECDSA_P256_SHA_256", Self::PkixEcdsaP384Sha384 => "PKIX_ECDSA_P384_SHA_384", Self::PkixEcdsaP521Sha512 => "PKIX_ECDSA_P521_SHA_512", Self::PkixEd25519 => "PKIX_ED25519", Self::PkixEd25519Ph => "PKIX_ED25519_PH", #[allow(deprecated)] Self::PkixEcdsaP384Sha256 => "PKIX_ECDSA_P384_SHA_256", #[allow(deprecated)] Self::PkixEcdsaP521Sha256 => "PKIX_ECDSA_P521_SHA_256", #[allow(deprecated)] Self::LmsSha256 => "LMS_SHA256", #[allow(deprecated)] Self::LmotsSha256 => "LMOTS_SHA256", Self::MlDsa44 => "ML_DSA_44", Self::MlDsa65 => "ML_DSA_65", Self::MlDsa87 => "ML_DSA_87", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { "PUBLIC_KEY_DETAILS_UNSPECIFIED" => Some(Self::Unspecified), "PKCS1_RSA_PKCS1V5" => Some(#[allow(deprecated)] Self::Pkcs1RsaPkcs1v5), "PKCS1_RSA_PSS" => Some(#[allow(deprecated)] Self::Pkcs1RsaPss), "PKIX_RSA_PKCS1V5" => Some(#[allow(deprecated)] Self::PkixRsaPkcs1v5), "PKIX_RSA_PSS" => Some(#[allow(deprecated)] Self::PkixRsaPss), "PKIX_RSA_PKCS1V15_2048_SHA256" => Some(Self::PkixRsaPkcs1v152048Sha256), "PKIX_RSA_PKCS1V15_3072_SHA256" => Some(Self::PkixRsaPkcs1v153072Sha256), "PKIX_RSA_PKCS1V15_4096_SHA256" => Some(Self::PkixRsaPkcs1v154096Sha256), "PKIX_RSA_PSS_2048_SHA256" => Some(Self::PkixRsaPss2048Sha256), "PKIX_RSA_PSS_3072_SHA256" => Some(Self::PkixRsaPss3072Sha256), "PKIX_RSA_PSS_4096_SHA256" => Some(Self::PkixRsaPss4096Sha256), "PKIX_ECDSA_P256_HMAC_SHA_256" => { Some(#[allow(deprecated)] Self::PkixEcdsaP256HmacSha256) } "PKIX_ECDSA_P256_SHA_256" => Some(Self::PkixEcdsaP256Sha256), "PKIX_ECDSA_P384_SHA_384" => Some(Self::PkixEcdsaP384Sha384), "PKIX_ECDSA_P521_SHA_512" => Some(Self::PkixEcdsaP521Sha512), "PKIX_ED25519" => Some(Self::PkixEd25519), "PKIX_ED25519_PH" => Some(Self::PkixEd25519Ph), "PKIX_ECDSA_P384_SHA_256" => { Some(#[allow(deprecated)] Self::PkixEcdsaP384Sha256) } "PKIX_ECDSA_P521_SHA_256" => { Some(#[allow(deprecated)] Self::PkixEcdsaP521Sha256) } "LMS_SHA256" => Some(#[allow(deprecated)] Self::LmsSha256), "LMOTS_SHA256" => Some(#[allow(deprecated)] Self::LmotsSha256), "ML_DSA_44" => Some(Self::MlDsa44), "ML_DSA_65" => Some(Self::MlDsa65), "ML_DSA_87" => Some(Self::MlDsa87), _ => None, } } } #[derive( sigstore_protobuf_specs_derive::Deserialize_proto, sigstore_protobuf_specs_derive::Serialize_proto )] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum SubjectAlternativeNameType { Unspecified = 0, Email = 1, Uri = 2, /// OID 1.3.6.1.4.1.57264.1.7 /// See /// for more details. OtherName = 3, } impl SubjectAlternativeNameType { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { Self::Unspecified => "SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED", Self::Email => "EMAIL", Self::Uri => "URI", Self::OtherName => "OTHER_NAME", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { "SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED" => Some(Self::Unspecified), "EMAIL" => Some(Self::Email), "URI" => Some(Self::Uri), "OTHER_NAME" => Some(Self::OtherName), _ => None, } } }