// Code generated by protoc-gen-go. DO NOT EDIT.
// source: crypto/keyspb/keyspb.proto

/*
Package keyspb is a generated protocol buffer package.

It is generated from these files:
	crypto/keyspb/keyspb.proto

It has these top-level messages:
	Specification
	PEMKeyFile
	PrivateKey
	PublicKey
	PKCS11Config
*/
package keyspb

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// The supported elliptic curves.
type Specification_ECDSA_Curve int32

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
)

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

func (x Specification_ECDSA_Curve) String() string {
	return proto.EnumName(Specification_ECDSA_Curve_name, int32(x))
}
func (Specification_ECDSA_Curve) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor0, []int{0, 0, 0}
}

// Specification for a private key.
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
	Params isSpecification_Params `protobuf_oneof:"params"`
}

func (m *Specification) Reset()                    { *m = Specification{} }
func (m *Specification) String() string            { return proto.CompactTextString(m) }
func (*Specification) ProtoMessage()               {}
func (*Specification) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

type isSpecification_Params interface {
	isSpecification_Params()
}

type Specification_EcdsaParams struct {
	EcdsaParams *Specification_ECDSA `protobuf:"bytes,1,opt,name=ecdsa_params,json=ecdsaParams,oneof"`
}
type Specification_RsaParams struct {
	RsaParams *Specification_RSA `protobuf:"bytes,2,opt,name=rsa_params,json=rsaParams,oneof"`
}

func (*Specification_EcdsaParams) isSpecification_Params() {}
func (*Specification_RsaParams) isSpecification_Params()   {}

func (m *Specification) GetParams() isSpecification_Params {
	if m != nil {
		return m.Params
	}
	return nil
}

func (m *Specification) GetEcdsaParams() *Specification_ECDSA {
	if x, ok := m.GetParams().(*Specification_EcdsaParams); ok {
		return x.EcdsaParams
	}
	return nil
}

func (m *Specification) GetRsaParams() *Specification_RSA {
	if x, ok := m.GetParams().(*Specification_RsaParams); ok {
		return x.RsaParams
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*Specification) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _Specification_OneofMarshaler, _Specification_OneofUnmarshaler, _Specification_OneofSizer, []interface{}{
		(*Specification_EcdsaParams)(nil),
		(*Specification_RsaParams)(nil),
	}
}

func _Specification_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*Specification)
	// params
	switch x := m.Params.(type) {
	case *Specification_EcdsaParams:
		b.EncodeVarint(1<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.EcdsaParams); err != nil {
			return err
		}
	case *Specification_RsaParams:
		b.EncodeVarint(2<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.RsaParams); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("Specification.Params has unexpected type %T", x)
	}
	return nil
}

func _Specification_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*Specification)
	switch tag {
	case 1: // params.ecdsa_params
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(Specification_ECDSA)
		err := b.DecodeMessage(msg)
		m.Params = &Specification_EcdsaParams{msg}
		return true, err
	case 2: // params.rsa_params
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(Specification_RSA)
		err := b.DecodeMessage(msg)
		m.Params = &Specification_RsaParams{msg}
		return true, err
	default:
		return false, nil
	}
}

func _Specification_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*Specification)
	// params
	switch x := m.Params.(type) {
	case *Specification_EcdsaParams:
		s := proto.Size(x.EcdsaParams)
		n += proto.SizeVarint(1<<3 | proto.WireBytes)
		n += proto.SizeVarint(uint64(s))
		n += s
	case *Specification_RsaParams:
		s := proto.Size(x.RsaParams)
		n += proto.SizeVarint(2<<3 | proto.WireBytes)
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

// / ECDSA defines parameters for an ECDSA key.
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,enum=keyspb.Specification_ECDSA_Curve" json:"curve,omitempty"`
}

func (m *Specification_ECDSA) Reset()                    { *m = Specification_ECDSA{} }
func (m *Specification_ECDSA) String() string            { return proto.CompactTextString(m) }
func (*Specification_ECDSA) ProtoMessage()               {}
func (*Specification_ECDSA) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }

func (m *Specification_ECDSA) GetCurve() Specification_ECDSA_Curve {
	if m != nil {
		return m.Curve
	}
	return Specification_ECDSA_DEFAULT_CURVE
}

// RSA defines parameters for an RSA key.
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" json:"bits,omitempty"`
}

func (m *Specification_RSA) Reset()                    { *m = Specification_RSA{} }
func (m *Specification_RSA) String() string            { return proto.CompactTextString(m) }
func (*Specification_RSA) ProtoMessage()               {}
func (*Specification_RSA) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 1} }

func (m *Specification_RSA) GetBits() int32 {
	if m != nil {
		return m.Bits
	}
	return 0
}

// PEMKeyFile identifies a private key stored in a PEM-encoded file.
type PEMKeyFile struct {
	// File path of the private key.
	Path string `protobuf:"bytes,1,opt,name=path" 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" json:"password,omitempty"`
}

func (m *PEMKeyFile) Reset()                    { *m = PEMKeyFile{} }
func (m *PEMKeyFile) String() string            { return proto.CompactTextString(m) }
func (*PEMKeyFile) ProtoMessage()               {}
func (*PEMKeyFile) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

func (m *PEMKeyFile) GetPath() string {
	if m != nil {
		return m.Path
	}
	return ""
}

func (m *PEMKeyFile) GetPassword() string {
	if m != nil {
		return m.Password
	}
	return ""
}

// PrivateKey is a private key, used for generating signatures.
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"`
}

func (m *PrivateKey) Reset()                    { *m = PrivateKey{} }
func (m *PrivateKey) String() string            { return proto.CompactTextString(m) }
func (*PrivateKey) ProtoMessage()               {}
func (*PrivateKey) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

func (m *PrivateKey) GetDer() []byte {
	if m != nil {
		return m.Der
	}
	return nil
}

// PublicKey is a public key, used for verifying signatures.
type PublicKey struct {
	// The key in DER-encoded PKIX form.
	Der []byte `protobuf:"bytes,1,opt,name=der,proto3" json:"der,omitempty"`
}

func (m *PublicKey) Reset()                    { *m = PublicKey{} }
func (m *PublicKey) String() string            { return proto.CompactTextString(m) }
func (*PublicKey) ProtoMessage()               {}
func (*PublicKey) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func (m *PublicKey) GetDer() []byte {
	if m != nil {
		return m.Der
	}
	return nil
}

// PKCS11Config identifies a private key accessed using PKCS #11.
type PKCS11Config struct {
	// The label of the PKCS#11 token.
	TokenLabel string `protobuf:"bytes,1,opt,name=token_label,json=tokenLabel" json:"token_label,omitempty"`
	// The PIN for the specific token.
	Pin string `protobuf:"bytes,2,opt,name=pin" 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" json:"public_key,omitempty"`
}

func (m *PKCS11Config) Reset()                    { *m = PKCS11Config{} }
func (m *PKCS11Config) String() string            { return proto.CompactTextString(m) }
func (*PKCS11Config) ProtoMessage()               {}
func (*PKCS11Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }

func (m *PKCS11Config) GetTokenLabel() string {
	if m != nil {
		return m.TokenLabel
	}
	return ""
}

func (m *PKCS11Config) GetPin() string {
	if m != nil {
		return m.Pin
	}
	return ""
}

func (m *PKCS11Config) GetPublicKey() string {
	if m != nil {
		return m.PublicKey
	}
	return ""
}

func init() {
	proto.RegisterType((*Specification)(nil), "keyspb.Specification")
	proto.RegisterType((*Specification_ECDSA)(nil), "keyspb.Specification.ECDSA")
	proto.RegisterType((*Specification_RSA)(nil), "keyspb.Specification.RSA")
	proto.RegisterType((*PEMKeyFile)(nil), "keyspb.PEMKeyFile")
	proto.RegisterType((*PrivateKey)(nil), "keyspb.PrivateKey")
	proto.RegisterType((*PublicKey)(nil), "keyspb.PublicKey")
	proto.RegisterType((*PKCS11Config)(nil), "keyspb.PKCS11Config")
	proto.RegisterEnum("keyspb.Specification_ECDSA_Curve", Specification_ECDSA_Curve_name, Specification_ECDSA_Curve_value)
}

func init() { proto.RegisterFile("crypto/keyspb/keyspb.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 403 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff,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