Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Envelope ¶
type Envelope struct {
Payload string `json:"payload"`
PayloadType string `json:"payloadType"`
Signatures []Signature `json:"signatures"`
}
func (*Envelope) Verify ¶
Verify is a Go implementation of the DSSE verification protocol described in detail here: https://github.com/secure-systems-lab/dsse/blob/master/protocol.md Verify accepts a number of PublicKeys which should correspond to the signatures of the envelope.
type GetVerifier ¶
type Signer ¶
Signer defines the interface for an abstract signing algorithm. The Signer interface is used to inject signature algorithm implementations into the EnvelopeSigner. This decoupling allows for any signing algorithm and key management system can be used. The full message is provided as the parameter. If the signature algorithm depends on hashing of the message prior to signature calculation, the implementor of this interface must perform such hashing. The function must return raw bytes representing the calculated signature using the current algorithm, and the key used (if applicable).
type SignerVerifier ¶
SignerVerifier provides both the signing and verification interface.
type Verifier ¶
type Verifier interface {
Verify(pae, signature []byte) error
KeyID() (string, error)
Public() crypto.PublicKey
}
Verifier verifies a complete message against a signature and key. If the message was hashed prior to signature generation, the verifier must perform the same steps. If KeyID returns successfully, only signature matching the key ID will be verified.