Documentation
¶
Index ¶
- Constants
- Variables
- func NewJclabPrs2301Bls12381PrivateKey(S []byte) (crypto.PrivateKey, error)
- func NewJclabPrs2301Bls12381PublicKey(W1 []byte) (crypto.PrivateKey, error)
- func NewJclabPrs2301Bls12381ResignKey(RK []byte, W1 []byte) (crypto.PrivateKey, error)
- func NewJclabPrs2301PrivateKey(curveEngine engine.CurveEngine, keyType string, S []byte) (crypto.PrivateKey, error)
- func NewJclabPrs2301PublicKey(curveEngine engine.CurveEngine, keyType string, W1 []byte) (crypto.PrivateKey, error)
- func NewJclabPrs2301ResignKey(curveEngine engine.CurveEngine, keyType string, RK []byte, W1 []byte) (crypto.PrivateKey, error)
- func ReadPgpArmorPrivateKey(input string) (crypto.PrivateKey, error)
- func ReadPgpArmorPublicKey(input string) (crypto.PublicKey, error)
- type Engine
- type GpgConfig
- type HmacKey
- type PKIXPublicKey
- type SignedJson
- type SignedJsonSignature
- type Signer
- type Verifier
Constants ¶
View Source
const (
MaxJSONKeySize = 512 * 1024
)
Variables ¶
View Source
var ( ErrGpgNotSupported = errors.New("GPG Not Supported") ErrGpgCancelled = errors.New("cancelled") )
View Source
var ( ErrInvalid = errors.New("tuf: signature verification failed") ErrInvalidKey = errors.New("invalid key") )
Functions ¶
func NewJclabPrs2301Bls12381PrivateKey ¶
func NewJclabPrs2301Bls12381PrivateKey(S []byte) (crypto.PrivateKey, error)
func NewJclabPrs2301Bls12381PublicKey ¶
func NewJclabPrs2301Bls12381PublicKey(W1 []byte) (crypto.PrivateKey, error)
func NewJclabPrs2301Bls12381ResignKey ¶
func NewJclabPrs2301Bls12381ResignKey(RK []byte, W1 []byte) (crypto.PrivateKey, error)
func NewJclabPrs2301PrivateKey ¶
func NewJclabPrs2301PrivateKey(curveEngine engine.CurveEngine, keyType string, S []byte) (crypto.PrivateKey, error)
func NewJclabPrs2301PublicKey ¶
func NewJclabPrs2301PublicKey(curveEngine engine.CurveEngine, keyType string, W1 []byte) (crypto.PrivateKey, error)
func NewJclabPrs2301ResignKey ¶
func NewJclabPrs2301ResignKey(curveEngine engine.CurveEngine, keyType string, RK []byte, W1 []byte) (crypto.PrivateKey, error)
func ReadPgpArmorPrivateKey ¶
func ReadPgpArmorPrivateKey(input string) (crypto.PrivateKey, error)
Types ¶
type Engine ¶
type Engine interface { Schema() string GenerateKeyPair() (crypto.PrivateKey, crypto.PublicKey, error) GeneratePublicKey(privateKey crypto.PrivateKey) (crypto.PublicKey, error) MarshalPublicKey(key crypto.PublicKey) (string, error) UnmarshalPublicKey(key string) (crypto.PublicKey, error) MarshalPrivateKey(key crypto.PrivateKey) (string, error) UnmarshalPrivateKey(key string) (crypto.PrivateKey, error) MarshalPublicKeyRaw(key crypto.PublicKey) ([]byte, error) UnmarshalPublicKeyRaw(key []byte) (crypto.PublicKey, error) MarshalPrivateKeyRaw(key crypto.PrivateKey) ([]byte, error) UnmarshalPrivateKeyRaw(key []byte) (crypto.PrivateKey, error) KeyId(key crypto.PublicKey) (string, error) KeyTypeByPublicKey(key crypto.PublicKey) (string, error) KeyTypeByPrivateKey(key crypto.PrivateKey) (string, error) NewSigner(key crypto.PrivateKey) (Signer, error) NewVerifier(key crypto.PublicKey) (Verifier, error) }
func NewEd25519Engine ¶
func NewEd25519Engine() Engine
func NewHmacEngine ¶
func NewHmacEngine() Engine
func NewJclabPrs2301FinalEngine ¶
func NewJclabPrs2301FinalEngine() Engine
func NewJclabPrs2301FirstEngine ¶
func NewJclabPrs2301FirstEngine() Engine
func NewPgpEngine ¶
func NewPgpEngine() Engine
type PKIXPublicKey ¶
func (*PKIXPublicKey) MarshalJSON ¶
func (p *PKIXPublicKey) MarshalJSON() ([]byte, error)
func (*PKIXPublicKey) UnmarshalJSON ¶
func (p *PKIXPublicKey) UnmarshalJSON(b []byte) error
type SignedJson ¶
type SignedJson[T interface{}] struct { Signed T `json:"signed"` Signatures []*SignedJsonSignature `json:"signatures"` }
type SignedJsonSignature ¶
type Signer ¶
type Signer interface { PrivateKey() crypto.PrivateKey PublicKey() crypto.PublicKey KeyId() string SignMessage(msg []byte) ([]byte, error) SignJson(msg *SignedJson[any]) error }
func NewGpgSigner ¶
Click to show internal directories.
Click to hide internal directories.