blob: c52ebf3737956007ca47be4025a4a542e094831d [file] [log] [blame]
// Copyright 2017 Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proto/ecdsa.proto
/*
Package ecdsa_proto is a generated protocol buffer package.
It is generated from these files:
proto/ecdsa.proto
It has these top-level messages:
EcdsaParams
EcdsaPublicKey
EcdsaPrivateKey
EcdsaKeyFormat
*/
package ecdsa_go_proto
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_crypto_tink "github.com/google/tink/proto/common_go_proto"
// 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
type EcdsaSignatureEncoding int32
const (
EcdsaSignatureEncoding_UNKNOWN_ENCODING EcdsaSignatureEncoding = 0
// The signature's format is r || s, where r and s are zero-padded and have the same size in
// bytes as the order of the curve. For example, for NIST P-256 curve, r and s are zero-padded to
// 32 bytes.
EcdsaSignatureEncoding_IEEE_P1363 EcdsaSignatureEncoding = 1
// The signature is encoded using ASN.1
// (https://tools.ietf.org/html/rfc5480#appendix-A):
// ECDSA-Sig-Value :: = SEQUENCE {
// r INTEGER,
// s INTEGER
// }
EcdsaSignatureEncoding_DER EcdsaSignatureEncoding = 2
)
var EcdsaSignatureEncoding_name = map[int32]string{
0: "UNKNOWN_ENCODING",
1: "IEEE_P1363",
2: "DER",
}
var EcdsaSignatureEncoding_value = map[string]int32{
"UNKNOWN_ENCODING": 0,
"IEEE_P1363": 1,
"DER": 2,
}
func (x EcdsaSignatureEncoding) String() string {
return proto.EnumName(EcdsaSignatureEncoding_name, int32(x))
}
func (EcdsaSignatureEncoding) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// Protos for Ecdsa.
type EcdsaParams struct {
// Required.
HashType google_crypto_tink.HashType `protobuf:"varint,1,opt,name=hash_type,json=hashType,enum=google.crypto.tink.HashType" json:"hash_type,omitempty"`
// Required.
Curve google_crypto_tink.EllipticCurveType `protobuf:"varint,2,opt,name=curve,enum=google.crypto.tink.EllipticCurveType" json:"curve,omitempty"`
// Required.
Encoding EcdsaSignatureEncoding `protobuf:"varint,3,opt,name=encoding,enum=google.crypto.tink.EcdsaSignatureEncoding" json:"encoding,omitempty"`
}
func (m *EcdsaParams) Reset() { *m = EcdsaParams{} }
func (m *EcdsaParams) String() string { return proto.CompactTextString(m) }
func (*EcdsaParams) ProtoMessage() {}
func (*EcdsaParams) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *EcdsaParams) GetHashType() google_crypto_tink.HashType {
if m != nil {
return m.HashType
}
return google_crypto_tink.HashType_UNKNOWN_HASH
}
func (m *EcdsaParams) GetCurve() google_crypto_tink.EllipticCurveType {
if m != nil {
return m.Curve
}
return google_crypto_tink.EllipticCurveType_UNKNOWN_CURVE
}
func (m *EcdsaParams) GetEncoding() EcdsaSignatureEncoding {
if m != nil {
return m.Encoding
}
return EcdsaSignatureEncoding_UNKNOWN_ENCODING
}
// key_type: type.googleapis.com/google.crypto.tink.EcdsaPublicKey
type EcdsaPublicKey struct {
// Required.
Version uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
// Required.
Params *EcdsaParams `protobuf:"bytes,2,opt,name=params" json:"params,omitempty"`
// Affine coordinates of the public key in bigendian representation. The
// public key is a point (x, y) on the curve defined by params.curve. For
// ECDH, it is crucial to verify whether the public key point (x, y) is on the
// private's key curve. For ECDSA, such verification is a defense in depth.
// Required.
X []byte `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"`
// Required.
Y []byte `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"`
}
func (m *EcdsaPublicKey) Reset() { *m = EcdsaPublicKey{} }
func (m *EcdsaPublicKey) String() string { return proto.CompactTextString(m) }
func (*EcdsaPublicKey) ProtoMessage() {}
func (*EcdsaPublicKey) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *EcdsaPublicKey) GetVersion() uint32 {
if m != nil {
return m.Version
}
return 0
}
func (m *EcdsaPublicKey) GetParams() *EcdsaParams {
if m != nil {
return m.Params
}
return nil
}
func (m *EcdsaPublicKey) GetX() []byte {
if m != nil {
return m.X
}
return nil
}
func (m *EcdsaPublicKey) GetY() []byte {
if m != nil {
return m.Y
}
return nil
}
// key_type: type.googleapis.com/google.crypto.tink.EcdsaPrivateKey
type EcdsaPrivateKey struct {
// Required.
Version uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
// Required.
PublicKey *EcdsaPublicKey `protobuf:"bytes,2,opt,name=public_key,json=publicKey" json:"public_key,omitempty"`
// Unsigned big integer in bigendian representation.
// Required.
KeyValue []byte `protobuf:"bytes,3,opt,name=key_value,json=keyValue,proto3" json:"key_value,omitempty"`
}
func (m *EcdsaPrivateKey) Reset() { *m = EcdsaPrivateKey{} }
func (m *EcdsaPrivateKey) String() string { return proto.CompactTextString(m) }
func (*EcdsaPrivateKey) ProtoMessage() {}
func (*EcdsaPrivateKey) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *EcdsaPrivateKey) GetVersion() uint32 {
if m != nil {
return m.Version
}
return 0
}
func (m *EcdsaPrivateKey) GetPublicKey() *EcdsaPublicKey {
if m != nil {
return m.PublicKey
}
return nil
}
func (m *EcdsaPrivateKey) GetKeyValue() []byte {
if m != nil {
return m.KeyValue
}
return nil
}
type EcdsaKeyFormat struct {
// Required.
Params *EcdsaParams `protobuf:"bytes,2,opt,name=params" json:"params,omitempty"`
}
func (m *EcdsaKeyFormat) Reset() { *m = EcdsaKeyFormat{} }
func (m *EcdsaKeyFormat) String() string { return proto.CompactTextString(m) }
func (*EcdsaKeyFormat) ProtoMessage() {}
func (*EcdsaKeyFormat) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *EcdsaKeyFormat) GetParams() *EcdsaParams {
if m != nil {
return m.Params
}
return nil
}
func init() {
proto.RegisterType((*EcdsaParams)(nil), "google.crypto.tink.EcdsaParams")
proto.RegisterType((*EcdsaPublicKey)(nil), "google.crypto.tink.EcdsaPublicKey")
proto.RegisterType((*EcdsaPrivateKey)(nil), "google.crypto.tink.EcdsaPrivateKey")
proto.RegisterType((*EcdsaKeyFormat)(nil), "google.crypto.tink.EcdsaKeyFormat")
proto.RegisterEnum("google.crypto.tink.EcdsaSignatureEncoding", EcdsaSignatureEncoding_name, EcdsaSignatureEncoding_value)
}
func init() { proto.RegisterFile("proto/ecdsa.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 426 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xd1, 0x6a, 0xd4, 0x40,
0x14, 0x86, 0x9d, 0xad, 0x6e, 0x77, 0x4f, 0xeb, 0xba, 0x0e, 0x22, 0x41, 0x0b, 0x4a, 0x40, 0x28,
0xbd, 0xc8, 0x62, 0x17, 0x14, 0xf1, 0xca, 0xb6, 0xd3, 0xba, 0x2c, 0xa4, 0x4b, 0x5a, 0x15, 0xbc,
0x09, 0xb3, 0xd3, 0x21, 0x19, 0x36, 0xc9, 0x0c, 0x93, 0xc9, 0xd2, 0xb9, 0xf2, 0x01, 0x7c, 0x0b,
0xdf, 0xc7, 0x77, 0x92, 0xcc, 0xa4, 0x45, 0x70, 0xeb, 0x45, 0xef, 0xce, 0x4f, 0xfe, 0x2f, 0xf3,
0xff, 0x87, 0x03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