Documentation ¶
Index ¶
- Variables
- func DecryptSeedShare(key *rsa.PrivateKey, seedShare *userapi.SeedShare) ([]byte, error)
- func EncryptSeedShares(seed []byte, ownerPubKeys []HexString) ([]*userapi.SeedShare, error)
- func ExtractWorkloadOwnerPublicKey(keyData []byte) ([]byte, error)
- func NewSeedShareOwnerPrivateKey() ([]byte, error)
- func NewWorkloadOwnerKey() ([]byte, error)
- func ParseSeedShareOwnerKey(pubKeyHex HexString) (*rsa.PublicKey, error)
- func ParseSeedshareOwnerPrivateKey(keyData []byte) (*rsa.PrivateKey, error)
- func ParseWorkloadOwnerPrivateKey(keyBytes []byte) (*ecdsa.PrivateKey, error)
- type HexString
- type HexStrings
- type Manifest
- type Policy
- type ReferenceValues
- type SNPReferenceValues
- type SNPTCB
- type SVN
Constants ¶
This section is empty.
Variables ¶
var TrustedMeasurement = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
TrustedMeasurement contains the expected launch digest and is injected at build time.
Functions ¶
func DecryptSeedShare ¶ added in v0.8.0
DecryptSeedShare tries to decrypt a SeedShare with the given owner key.
func EncryptSeedShares ¶ added in v0.8.0
EncryptSeedShares encrypts a seed for owners identified by their public keys and returns a SeedShare slice suitable for userapi.SetManifestResponse.
func ExtractWorkloadOwnerPublicKey ¶ added in v0.8.0
ExtractWorkloadOwnerPublicKey extracts the public key for a workload owner and returns it as serialized DER.
This function supports PEM-encoded public and private keys.
func NewSeedShareOwnerPrivateKey ¶ added in v0.8.0
NewSeedShareOwnerPrivateKey creates and PEM-encodes a new seed share private key.
func NewWorkloadOwnerKey ¶ added in v0.8.0
NewWorkloadOwnerKey creates and marshals a private key.
func ParseSeedShareOwnerKey ¶ added in v0.8.0
ParseSeedShareOwnerKey reads a public key embedded in a userapi.SetManifestRequest.
func ParseSeedshareOwnerPrivateKey ¶ added in v0.8.0
func ParseSeedshareOwnerPrivateKey(keyData []byte) (*rsa.PrivateKey, error)
ParseSeedshareOwnerPrivateKey decodes a PEM-encoded seed share private key.
func ParseWorkloadOwnerPrivateKey ¶ added in v0.8.0
func ParseWorkloadOwnerPrivateKey(keyBytes []byte) (*ecdsa.PrivateKey, error)
ParseWorkloadOwnerPrivateKey parses a PEM-encoded private key.
Types ¶
type HexString ¶
type HexString string
HexString is a hex encoded string.
func ExtractSeedshareOwnerPublicKey ¶ added in v0.8.0
ExtractSeedshareOwnerPublicKey extracts the public key for a seedshare owner and returns it as serialized DER.
This function supports PEM-encoded public and private keys.
func HashWorkloadOwnerKey ¶ added in v0.8.0
HashWorkloadOwnerKey converts a public key into the format for Manifest.WorkloadOwnerKeyDigests.
func MarshalSeedShareOwnerKey ¶ added in v0.8.0
MarshalSeedShareOwnerKey converts a public key into the format for userapi.SetManifestRequest.
func NewHexString ¶
NewHexString creates a new HexString from a byte slice.
type HexStrings ¶
type HexStrings []HexString
HexStrings is a slice of HexString.
func (*HexStrings) ByteSlices ¶
func (l *HexStrings) ByteSlices() ([][]byte, error)
ByteSlices returns the byte slice representation of the HexStrings.
type Manifest ¶
type Manifest struct { // policyHash/HOSTDATA -> commonName Policies map[HexString][]string ReferenceValues ReferenceValues WorkloadOwnerKeyDigests []HexString }
Manifest is the Coordinator manifest and contains the reference values of the deployment.
func DefaultAKS ¶ added in v0.8.0
func DefaultAKS() Manifest
DefaultAKS returns a default manifest with AKS reference values.
func (*Manifest) SNPValidateOpts ¶ added in v0.8.0
SNPValidateOpts returns validate options populated with the manifest's SNP reference values and trusted measurement.
type Policy ¶
type Policy []byte
Policy is a CocCo execution policy.
func NewPolicyFromAnnotation ¶
NewPolicyFromAnnotation parses a base64 encoded policy from an annotation.
type ReferenceValues ¶
type ReferenceValues struct { SNP SNPReferenceValues // TrustedMeasurement is the hash of the trusted launch digest. TrustedMeasurement HexString }
ReferenceValues contains the workload independent reference values.
func (ReferenceValues) Validate ¶ added in v0.8.0
func (r ReferenceValues) Validate() error
Validate checks the validity of all fields in the reference values.
type SNPReferenceValues ¶
type SNPReferenceValues struct {
MinimumTCB SNPTCB
}
SNPReferenceValues contains reference values for the SNP report.
type SVN ¶
type SVN uint8
SVN is a SNP secure version number.
func (SVN) MarshalJSON ¶
MarshalJSON marshals the SVN to JSON.
func (*SVN) UnmarshalJSON ¶
UnmarshalJSON unmarshals the SVN from a JSON.