Debian Codegraph @

internal/third_party/go-securesystemslib/dsse/signerverifier.go

raw symbols SCIP
1 package dssescip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/
2
3 import (
4 "contextscip-go gomod github.com/golang/go/src go1.26.0 context/"
5 "cryptoscip-go gomod github.com/golang/go/src go1.26.0 crypto/"
6
7 "google.golang.org/protobuf/types/known/structpbscip-go gomod google.golang.org/protobuf f2248ac996af `google.golang.org/protobuf/types/known/structpb`/"
8 )
9
10 /*
11 Signer defines the interface for an abstract signing algorithm. The Signer
12 interface is used to inject signature algorithm implementations into the
13 EnvelopeSigner. This decoupling allows for any signing algorithm and key
14 management system can be used. The full message is provided as the parameter.
15 If the signature algorithm depends on hashing of the message prior to signature
16 calculation, the implementor of this interface must perform such hashing. The
17 function must return raw bytes representing the calculated signature using the
18 current algorithm, and the key used (if applicable).
19 */
20 type Signerscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/Signer# interface {
21 Signscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/Signer#Sign.(ctx contextscip-go gomod github.com/golang/go/src go1.26.0 context/.Contextscip-go gomod github.com/golang/go/src go1.26.0 context/Context#, data []byte) ([]byte, error)
22 KeyIDscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/Signer#KeyID.() (string, error)
23 }
24
25 /*
26 Verifier verifies a complete message against a signature and key. If the message
27 was hashed prior to signature generation, the verifier must perform the same
28 steps. If KeyID returns successfully, only signature matching the key ID will be
29 verified.
30 */
31 type Verifierscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/Verifier# interface {
32 Verifyscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/Verifier#Verify.(ctx contextscip-go gomod github.com/golang/go/src go1.26.0 context/.Contextscip-go gomod github.com/golang/go/src go1.26.0 context/Context#, data, sig []byte) error
33 KeyIDscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/Verifier#KeyID.() (string, error)
34 Publicscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/Verifier#Public.() cryptoscip-go gomod github.com/golang/go/src go1.26.0 crypto/.PublicKeyscip-go gomod github.com/golang/go/src go1.26.0 crypto/PublicKey#
35 }
36
37 type SupportsSignatureExtensionscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/SupportsSignatureExtension# interface {
38 SetExtensionscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/SupportsSignatureExtension#SetExtension.(*structpbscip-go gomod google.golang.org/protobuf f2248ac996af `google.golang.org/protobuf/types/known/structpb`/.Structscip-go gomod google.golang.org/protobuf f2248ac996af `google.golang.org/protobuf/types/known/structpb`/Struct#)
39 ExpectedExtensionKindscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/SupportsSignatureExtension#ExpectedExtensionKind.() string
40 }
41
42 // SignerVerifier provides both the signing and verification interface.
43 type SignerVerifierscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/SignerVerifier# interface {
44 Signerscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/Signer#
45 Verifierscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/Verifier#
46 }
47
48 // Deprecated: switch to renamed SignerVerifier. This is currently aliased for
49 // backwards compatibility.
50 type SignVerifierscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/SignVerifier# = SignerVerifierscip-go gomod github.com/gittuf/gittuf . `github.com/gittuf/gittuf/internal/third_party/go-securesystemslib/dsse`/SignerVerifier#