crypto

package
v0.0.0-...-607ac61 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: AGPL-3.0 Imports: 9 Imported by: 2

Documentation

Overview

Package crypto implements common crypto operations used to verify TDX quotes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildECDSAPublicKey

func BuildECDSAPublicKey(rawPublicKey [64]byte) *ecdsa.PublicKey

BuildECDSAPublicKey builds an ECDSA public key from a byte slice.

func MustParsePEMCertificate

func MustParsePEMCertificate(certPEM []byte) *x509.Certificate

MustParsePEMCertificate parses a single certificate from a PEM-encoded byte slice. If multiple certificates are present, only the first one is returned. It panics if the certificate is invalid or the PEM data contains no certificates.

func ParsePEMCertificateChain

func ParsePEMCertificateChain(certChainPEM []byte) ([]*x509.Certificate, error)

ParsePEMCertificateChain parses a certificate chain from a PEM-encoded byte slice.

func VerifyECDSASignature

func VerifyECDSASignature(publicKey crypto.PublicKey, data, signature []byte) error

VerifyECDSASignature verifies an ECDSA signature was signed using the public key of the provided signing certificate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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