Help us shape the future of Go! Take the 2026 Go Developer Survey

keyspb

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2019 License: Apache-2.0 Imports: 3 Imported by: 236

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Specification_ECDSA_Curve_name = map[int32]string{
	0: "DEFAULT_CURVE",
	1: "P256",
	2: "P384",
	3: "P521",
}
View Source
var Specification_ECDSA_Curve_value = map[string]int32{
	"DEFAULT_CURVE": 0,
	"P256":          1,
	"P384":          2,
	"P521":          3,
}

Functions

This section is empty.

Types

type PEMKeyFile

type PEMKeyFile struct {
	// File path of the private key.
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// Password for decrypting the private key.
	// If empty, indicates that the private key is not encrypted.
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PEMKeyFile identifies a private key stored in a PEM-encoded file.

func (*PEMKeyFile) Descriptor

func (*PEMKeyFile) Descriptor() ([]byte, []int)

func (*PEMKeyFile) GetPassword

func (m *PEMKeyFile) GetPassword() string

func (*PEMKeyFile) GetPath

func (m *PEMKeyFile) GetPath() string

func (*PEMKeyFile) ProtoMessage

func (*PEMKeyFile) ProtoMessage()

func (*PEMKeyFile) Reset

func (m *PEMKeyFile) Reset()

func (*PEMKeyFile) String

func (m *PEMKeyFile) String() string

func (*PEMKeyFile) XXX_DiscardUnknown added in v1.2.0

func (m *PEMKeyFile) XXX_DiscardUnknown()

func (*PEMKeyFile) XXX_Marshal added in v1.2.0

func (m *PEMKeyFile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PEMKeyFile) XXX_Merge added in v1.2.0

func (m *PEMKeyFile) XXX_Merge(src proto.Message)

func (*PEMKeyFile) XXX_Size added in v1.2.0

func (m *PEMKeyFile) XXX_Size() int

func (*PEMKeyFile) XXX_Unmarshal added in v1.2.0

func (m *PEMKeyFile) XXX_Unmarshal(b []byte) error

type PKCS11Config

type PKCS11Config struct {
	// The label of the PKCS#11 token.
	TokenLabel string `protobuf:"bytes,1,opt,name=token_label,json=tokenLabel,proto3" json:"token_label,omitempty"`
	// The PIN for the specific token.
	Pin string `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"`
	// The PEM public key assosciated with the private key to be used.
	PublicKey            string   `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PKCS11Config identifies a private key accessed using PKCS #11.

func (*PKCS11Config) Descriptor

func (*PKCS11Config) Descriptor() ([]byte, []int)

func (*PKCS11Config) GetPin

func (m *PKCS11Config) GetPin() string

func (*PKCS11Config) GetPublicKey

func (m *PKCS11Config) GetPublicKey() string

func (*PKCS11Config) GetTokenLabel

func (m *PKCS11Config) GetTokenLabel() string

func (*PKCS11Config) ProtoMessage

func (*PKCS11Config) ProtoMessage()

func (*PKCS11Config) Reset

func (m *PKCS11Config) Reset()

func (*PKCS11Config) String

func (m *PKCS11Config) String() string

func (*PKCS11Config) XXX_DiscardUnknown added in v1.2.0

func (m *PKCS11Config) XXX_DiscardUnknown()

func (*PKCS11Config) XXX_Marshal added in v1.2.0

func (m *PKCS11Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PKCS11Config) XXX_Merge added in v1.2.0

func (m *PKCS11Config) XXX_Merge(src proto.Message)

func (*PKCS11Config) XXX_Size added in v1.2.0

func (m *PKCS11Config) XXX_Size() int

func (*PKCS11Config) XXX_Unmarshal added in v1.2.0

func (m *PKCS11Config) XXX_Unmarshal(b []byte) error

type PrivateKey

type PrivateKey struct {
	// The key in DER-encoded form.
	// The specific format (e.g. PKCS8) is not specified.
	Der                  []byte   `protobuf:"bytes,1,opt,name=der,proto3" json:"der,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PrivateKey is a private key, used for generating signatures.

func (*PrivateKey) Descriptor

func (*PrivateKey) Descriptor() ([]byte, []int)

func (*PrivateKey) GetDer

func (m *PrivateKey) GetDer() []byte

func (*PrivateKey) ProtoMessage

func (*PrivateKey) ProtoMessage()

func (*PrivateKey) Reset

func (m *PrivateKey) Reset()

func (*PrivateKey) String

func (m *PrivateKey) String() string

func (*PrivateKey) XXX_DiscardUnknown added in v1.2.0

func (m *PrivateKey) XXX_DiscardUnknown()

func (*PrivateKey) XXX_Marshal added in v1.2.0

func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PrivateKey) XXX_Merge added in v1.2.0

func (m *PrivateKey) XXX_Merge(src proto.Message)

func (*PrivateKey) XXX_Size added in v1.2.0

func (m *PrivateKey) XXX_Size() int

func (*PrivateKey) XXX_Unmarshal added in v1.2.0

func (m *PrivateKey) XXX_Unmarshal(b []byte) error

type PublicKey

type PublicKey struct {
	// The key in DER-encoded PKIX form.
	Der                  []byte   `protobuf:"bytes,1,opt,name=der,proto3" json:"der,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PublicKey is a public key, used for verifying signatures.

func (*PublicKey) Descriptor

func (*PublicKey) Descriptor() ([]byte, []int)

func (*PublicKey) GetDer

func (m *PublicKey) GetDer() []byte

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) Reset

func (m *PublicKey) Reset()

func (*PublicKey) String

func (m *PublicKey) String() string

func (*PublicKey) XXX_DiscardUnknown added in v1.2.0

func (m *PublicKey) XXX_DiscardUnknown()

func (*PublicKey) XXX_Marshal added in v1.2.0

func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PublicKey) XXX_Merge added in v1.2.0

func (m *PublicKey) XXX_Merge(src proto.Message)

func (*PublicKey) XXX_Size added in v1.2.0

func (m *PublicKey) XXX_Size() int

func (*PublicKey) XXX_Unmarshal added in v1.2.0

func (m *PublicKey) XXX_Unmarshal(b []byte) error

type Specification

type Specification struct {
	// The type of parameters provided determines the algorithm used for the key.
	//
	// Types that are valid to be assigned to Params:
	//	*Specification_EcdsaParams
	//	*Specification_RsaParams
	//	*Specification_Ed25519Params
	Params               isSpecification_Params `protobuf_oneof:"params"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

Specification for a private key.

func (*Specification) Descriptor

func (*Specification) Descriptor() ([]byte, []int)

func (*Specification) GetEcdsaParams

func (m *Specification) GetEcdsaParams() *Specification_ECDSA

func (*Specification) GetEd25519Params added in v1.3.0

func (m *Specification) GetEd25519Params() *Specification_Ed25519

func (*Specification) GetParams

func (m *Specification) GetParams() isSpecification_Params

func (*Specification) GetRsaParams

func (m *Specification) GetRsaParams() *Specification_RSA

func (*Specification) ProtoMessage

func (*Specification) ProtoMessage()

func (*Specification) Reset

func (m *Specification) Reset()

func (*Specification) String

func (m *Specification) String() string

func (*Specification) XXX_DiscardUnknown added in v1.2.0

func (m *Specification) XXX_DiscardUnknown()

func (*Specification) XXX_Marshal added in v1.2.0

func (m *Specification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Specification) XXX_Merge added in v1.2.0

func (m *Specification) XXX_Merge(src proto.Message)

func (*Specification) XXX_OneofWrappers added in v1.3.0

func (*Specification) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Specification) XXX_Size added in v1.2.0

func (m *Specification) XXX_Size() int

func (*Specification) XXX_Unmarshal added in v1.2.0

func (m *Specification) XXX_Unmarshal(b []byte) error

type Specification_ECDSA

type Specification_ECDSA struct {
	// The elliptic curve to use.
	// Optional. If not set, the default curve will be used.
	Curve                Specification_ECDSA_Curve `protobuf:"varint,1,opt,name=curve,proto3,enum=keyspb.Specification_ECDSA_Curve" json:"curve,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

/ ECDSA defines parameters for an ECDSA key.

func (*Specification_ECDSA) Descriptor

func (*Specification_ECDSA) Descriptor() ([]byte, []int)

func (*Specification_ECDSA) GetCurve

func (*Specification_ECDSA) ProtoMessage

func (*Specification_ECDSA) ProtoMessage()

func (*Specification_ECDSA) Reset

func (m *Specification_ECDSA) Reset()

func (*Specification_ECDSA) String

func (m *Specification_ECDSA) String() string

func (*Specification_ECDSA) XXX_DiscardUnknown added in v1.2.0

func (m *Specification_ECDSA) XXX_DiscardUnknown()

func (*Specification_ECDSA) XXX_Marshal added in v1.2.0

func (m *Specification_ECDSA) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Specification_ECDSA) XXX_Merge added in v1.2.0

func (m *Specification_ECDSA) XXX_Merge(src proto.Message)

func (*Specification_ECDSA) XXX_Size added in v1.2.0

func (m *Specification_ECDSA) XXX_Size() int

func (*Specification_ECDSA) XXX_Unmarshal added in v1.2.0

func (m *Specification_ECDSA) XXX_Unmarshal(b []byte) error

type Specification_ECDSA_Curve

type Specification_ECDSA_Curve int32

The supported elliptic curves.

const (
	Specification_ECDSA_DEFAULT_CURVE Specification_ECDSA_Curve = 0
	Specification_ECDSA_P256          Specification_ECDSA_Curve = 1
	Specification_ECDSA_P384          Specification_ECDSA_Curve = 2
	Specification_ECDSA_P521          Specification_ECDSA_Curve = 3
)

func (Specification_ECDSA_Curve) EnumDescriptor

func (Specification_ECDSA_Curve) EnumDescriptor() ([]byte, []int)

func (Specification_ECDSA_Curve) String

func (x Specification_ECDSA_Curve) String() string

type Specification_EcdsaParams

type Specification_EcdsaParams struct {
	EcdsaParams *Specification_ECDSA `protobuf:"bytes,1,opt,name=ecdsa_params,json=ecdsaParams,proto3,oneof"`
}

type Specification_Ed25519 added in v1.3.0

type Specification_Ed25519 struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Ed25519 defines (empty) parameters for an Ed25519 private key.

func (*Specification_Ed25519) Descriptor added in v1.3.0

func (*Specification_Ed25519) Descriptor() ([]byte, []int)

func (*Specification_Ed25519) ProtoMessage added in v1.3.0

func (*Specification_Ed25519) ProtoMessage()

func (*Specification_Ed25519) Reset added in v1.3.0

func (m *Specification_Ed25519) Reset()

func (*Specification_Ed25519) String added in v1.3.0

func (m *Specification_Ed25519) String() string

func (*Specification_Ed25519) XXX_DiscardUnknown added in v1.3.0

func (m *Specification_Ed25519) XXX_DiscardUnknown()

func (*Specification_Ed25519) XXX_Marshal added in v1.3.0

func (m *Specification_Ed25519) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Specification_Ed25519) XXX_Merge added in v1.3.0

func (m *Specification_Ed25519) XXX_Merge(src proto.Message)

func (*Specification_Ed25519) XXX_Size added in v1.3.0

func (m *Specification_Ed25519) XXX_Size() int

func (*Specification_Ed25519) XXX_Unmarshal added in v1.3.0

func (m *Specification_Ed25519) XXX_Unmarshal(b []byte) error

type Specification_Ed25519Params added in v1.3.0

type Specification_Ed25519Params struct {
	Ed25519Params *Specification_Ed25519 `protobuf:"bytes,3,opt,name=ed25519_params,json=ed25519Params,proto3,oneof"`
}

type Specification_RSA

type Specification_RSA struct {
	// Size of the keys in bits. Must be sufficiently large to allow two primes
	// to be generated.
	// Optional. If not set, the key size will be chosen by Trillian.
	Bits                 int32    `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RSA defines parameters for an RSA key.

func (*Specification_RSA) Descriptor

func (*Specification_RSA) Descriptor() ([]byte, []int)

func (*Specification_RSA) GetBits

func (m *Specification_RSA) GetBits() int32

func (*Specification_RSA) ProtoMessage

func (*Specification_RSA) ProtoMessage()

func (*Specification_RSA) Reset

func (m *Specification_RSA) Reset()

func (*Specification_RSA) String

func (m *Specification_RSA) String() string

func (*Specification_RSA) XXX_DiscardUnknown added in v1.2.0

func (m *Specification_RSA) XXX_DiscardUnknown()

func (*Specification_RSA) XXX_Marshal added in v1.2.0

func (m *Specification_RSA) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Specification_RSA) XXX_Merge added in v1.2.0

func (m *Specification_RSA) XXX_Merge(src proto.Message)

func (*Specification_RSA) XXX_Size added in v1.2.0

func (m *Specification_RSA) XXX_Size() int

func (*Specification_RSA) XXX_Unmarshal added in v1.2.0

func (m *Specification_RSA) XXX_Unmarshal(b []byte) error

type Specification_RsaParams

type Specification_RsaParams struct {
	RsaParams *Specification_RSA `protobuf:"bytes,2,opt,name=rsa_params,json=rsaParams,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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