| // Copyright 2018 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: third_party/tink/proto/ecdsa.proto |
| |
| package ecdsa_go_proto |
| |
| import ( |
| fmt "fmt" |
| proto "github.com/golang/protobuf/proto" |
| common_go_proto "github.com/google/tink/proto/common_go_proto" |
| 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.ProtoPackageIsVersion3 // 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 fileDescriptor_8eef580f8138be98, []int{0} |
| } |
| |
| // Protos for Ecdsa. |
| type EcdsaParams struct { |
| // Required. |
| HashType common_go_proto.HashType `protobuf:"varint,1,opt,name=hash_type,json=hashType,proto3,enum=google.crypto.tink.HashType" json:"hash_type,omitempty"` |
| // Required. |
| Curve common_go_proto.EllipticCurveType `protobuf:"varint,2,opt,name=curve,proto3,enum=google.crypto.tink.EllipticCurveType" json:"curve,omitempty"` |
| // Required. |
| Encoding EcdsaSignatureEncoding `protobuf:"varint,3,opt,name=encoding,proto3,enum=google.crypto.tink.EcdsaSignatureEncoding" json:"encoding,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *EcdsaParams) Reset() { *m = EcdsaParams{} } |
| func (m *EcdsaParams) String() string { return proto.CompactTextString(m) } |
| func (*EcdsaParams) ProtoMessage() {} |
| func (*EcdsaParams) Descriptor() ([]byte, []int) { |
| return fileDescriptor_8eef580f8138be98, []int{0} |
| } |
| |
| func (m *EcdsaParams) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_EcdsaParams.Unmarshal(m, b) |
| } |
| func (m *EcdsaParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_EcdsaParams.Marshal(b, m, deterministic) |
| } |
| func (m *EcdsaParams) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_EcdsaParams.Merge(m, src) |
| } |
| func (m *EcdsaParams) XXX_Size() int { |
| return xxx_messageInfo_EcdsaParams.Size(m) |
| } |
| func (m *EcdsaParams) XXX_DiscardUnknown() { |
| xxx_messageInfo_EcdsaParams.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_EcdsaParams proto.InternalMessageInfo |
| |
| func (m *EcdsaParams) GetHashType() common_go_proto.HashType { |
| if m != nil { |
| return m.HashType |
| } |
| return common_go_proto.HashType_UNKNOWN_HASH |
| } |
| |
| func (m *EcdsaParams) GetCurve() common_go_proto.EllipticCurveType { |
| if m != nil { |
| return m.Curve |
| } |
| return common_go_proto.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,proto3" json:"version,omitempty"` |
| // Required. |
| Params *EcdsaParams `protobuf:"bytes,2,opt,name=params,proto3" 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"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *EcdsaPublicKey) Reset() { *m = EcdsaPublicKey{} } |
| func (m *EcdsaPublicKey) String() string { return proto.CompactTextString(m) } |
| func (*EcdsaPublicKey) ProtoMessage() {} |
| func (*EcdsaPublicKey) Descriptor() ([]byte, []int) { |
| return fileDescriptor_8eef580f8138be98, []int{1} |
| } |
| |
| func (m *EcdsaPublicKey) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_EcdsaPublicKey.Unmarshal(m, b) |
| } |
| func (m *EcdsaPublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_EcdsaPublicKey.Marshal(b, m, deterministic) |
| } |
| func (m *EcdsaPublicKey) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_EcdsaPublicKey.Merge(m, src) |
| } |
| func (m *EcdsaPublicKey) XXX_Size() int { |
| return xxx_messageInfo_EcdsaPublicKey.Size(m) |
| } |
| func (m *EcdsaPublicKey) XXX_DiscardUnknown() { |
| xxx_messageInfo_EcdsaPublicKey.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_EcdsaPublicKey proto.InternalMessageInfo |
| |
| 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,proto3" json:"version,omitempty"` |
| // Required. |
| PublicKey *EcdsaPublicKey `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" 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"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *EcdsaPrivateKey) Reset() { *m = EcdsaPrivateKey{} } |
| func (m *EcdsaPrivateKey) String() string { return proto.CompactTextString(m) } |
| func (*EcdsaPrivateKey) ProtoMessage() {} |
| func (*EcdsaPrivateKey) Descriptor() ([]byte, []int) { |
| return fileDescriptor_8eef580f8138be98, []int{2} |
| } |
| |
| func (m *EcdsaPrivateKey) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_EcdsaPrivateKey.Unmarshal(m, b) |
| } |
| func (m *EcdsaPrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_EcdsaPrivateKey.Marshal(b, m, deterministic) |
| } |
| func (m *EcdsaPrivateKey) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_EcdsaPrivateKey.Merge(m, src) |
| } |
| func (m *EcdsaPrivateKey) XXX_Size() int { |
| return xxx_messageInfo_EcdsaPrivateKey.Size(m) |
| } |
| func (m *EcdsaPrivateKey) XXX_DiscardUnknown() { |
| xxx_messageInfo_EcdsaPrivateKey.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_EcdsaPrivateKey proto.InternalMessageInfo |
| |
| 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,proto3" json:"params,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *EcdsaKeyFormat) Reset() { *m = EcdsaKeyFormat{} } |
| func (m *EcdsaKeyFormat) String() string { return proto.CompactTextString(m) } |
| func (*EcdsaKeyFormat) ProtoMessage() {} |
| func (*EcdsaKeyFormat) Descriptor() ([]byte, []int) { |
| return fileDescriptor_8eef580f8138be98, []int{3} |
| } |
| |
| func (m *EcdsaKeyFormat) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_EcdsaKeyFormat.Unmarshal(m, b) |
| } |
| func (m *EcdsaKeyFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_EcdsaKeyFormat.Marshal(b, m, deterministic) |
| } |
| func (m *EcdsaKeyFormat) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_EcdsaKeyFormat.Merge(m, src) |
| } |
| func (m *EcdsaKeyFormat) XXX_Size() int { |
| return xxx_messageInfo_EcdsaKeyFormat.Size(m) |
| } |
| func (m *EcdsaKeyFormat) XXX_DiscardUnknown() { |
| xxx_messageInfo_EcdsaKeyFormat.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_EcdsaKeyFormat proto.InternalMessageInfo |
| |
| func (m *EcdsaKeyFormat) GetParams() *EcdsaParams { |
| if m != nil { |
| return m.Params |
| } |
| return nil |
| } |
| |
| func init() { |
| proto.RegisterEnum("google.crypto.tink.EcdsaSignatureEncoding", EcdsaSignatureEncoding_name, EcdsaSignatureEncoding_value) |
| 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") |
| } |
| |
| func init() { proto.RegisterFile("proto/ecdsa.proto", fileDescriptor_8eef580f8138be98) } |
| |
| var fileDescriptor_8eef580f8138be98 = []byte{ |
| // 435 bytes of a gzipped FileDescriptorProto |
| 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xd1, 0x6a, 0xdb, 0x30,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