Documentation ¶
Index ¶
- Constants
- Variables
- func Decode(input string) ([]byte, error)
- func Encode(input []byte) string
- func NewEd25519PrivateKeyFromRaw(key []byte) (ed25519.PrivateKey, error)
- 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.PublicKey, error)
- func NewJclabPrs2301ResignKey(curveEngine engine.CurveEngine, keyType string, RK []byte, W1 []byte) (crypto.PrivateKey, error)
- func PgpPublicKeySerialize(key crypto.PublicKey) ([]byte, error)
- func ReadPgpArmorPrivateKey(input string) (crypto.PrivateKey, error)
- func ReadPgpArmorPublicKey(input string) (crypto.PublicKey, error)
- type Engine
- type GpgConfig
- type HmacKey
- type JclabPrs2301PrivateKey
- type JclabPrs2301PublicKey
- type JclabPrs2301ResignKey
- type PKIXPublicKey
- type SignedJson
- type SignedJsonSignature
- type Signer
- type Verifier
Constants ¶
View Source
const (
MaxJSONKeySize = 512 * 1024
)
Variables ¶
View Source
var ( ErrInvalid = errors.New("tuf: signature verification failed") ErrInvalidKey = errors.New("invalid key") )
View Source
var ( ErrGpgNotSupported = errors.New("GPG Not Supported") ErrGpgCancelled = errors.New("cancelled") )
Functions ¶
func NewEd25519PrivateKeyFromRaw ¶
func NewEd25519PrivateKeyFromRaw(key []byte) (ed25519.PrivateKey, error)
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 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 KeyTypeByPublicKey(key crypto.PublicKey) (string, error) KeyTypeByPrivateKey(key crypto.PrivateKey) (string, error) GeneratePublicKey(privateKey crypto.PrivateKey) (crypto.PublicKey, error) NewSigner(key crypto.PrivateKey, keyId string) (Signer, error) NewVerifier(key crypto.PublicKey, keyId string) (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 JclabPrs2301PrivateKey ¶
type JclabPrs2301PrivateKey struct {
// contains filtered or unexported fields
}
func (*JclabPrs2301PrivateKey) GetS ¶
func (k *JclabPrs2301PrivateKey) GetS() []byte
type JclabPrs2301PublicKey ¶
type JclabPrs2301PublicKey struct {
// contains filtered or unexported fields
}
func (*JclabPrs2301PublicKey) GetW1 ¶
func (k *JclabPrs2301PublicKey) GetW1() []byte
type JclabPrs2301ResignKey ¶
type JclabPrs2301ResignKey struct {
// contains filtered or unexported fields
}
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 ¶
Click to show internal directories.
Click to hide internal directories.