attestation

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2020 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Overview

Package attestation defines methods to attest a message using Pgp Private and Public Key pair.

Index

Constants

View Source
const (
	RSABits = 4096
)

Variables

This section is empty.

Functions

func CreateMessageAttestation

func CreateMessageAttestation(pgpKey *secrets.PgpKey, message string) (string, error)

CreateMessageAttestation attests the message using the given PGP key. pgpKey: PGP key message: Message to attest

func GetPlainMessage

func GetPlainMessage(pubKey string, sig string) ([]byte, error)

GetPlainMessage verifies if the image is attested using the PEM encoded public key and returns the plain text in bytes

func VerifyMessageAttestation

func VerifyMessageAttestation(pubKey string, sig string, message string) error

VerifyMessageAttestation verifies if the image is attested using the PEM encoded public key.

Types

type ValidatedAttestation added in v0.2.0

type ValidatedAttestation struct {
	AttestorName string
	Image        string
}

ValidatedAttestation represents a trusted and verified attestation made by the named attestation authority about the named container image. An example ValidatedAttestation may look like:

{
  AttestorName: "build-attestor",
  Image: "gcr.io/img@sha256:abcd",
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL