Debian Codegraph @

keymanager/km_common/proto/algorithms.pb.go

raw
1 //nolint:revive
2 // Code generated by protoc-gen-go. DO NOT EDIT.
3 // versions:
4 // protoc-gen-go v1.36.11
5 // protoc v3.21.12
6 // source: keymanager/km_common/proto/algorithms.proto
7
8 package keymanager
9
10 import (
11 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
12 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
13 reflect "reflect"
14 sync "sync"
15 unsafe "unsafe"
16 )
17
18 const (
19 // Verify that this generated code is sufficiently up-to-date.
20 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
21 // Verify that runtime/protoimpl is sufficiently up-to-date.
22 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
23 )
24
25 // Key Encapsulation Mechanism (KEM)
26 type KemAlgorithm int32
27
28 const (
29 KemAlgorithm_KEM_ALGORITHM_UNSPECIFIED KemAlgorithm = 0
30 KemAlgorithm_KEM_ALGORITHM_DHKEM_X25519_HKDF_SHA256 KemAlgorithm = 1
31 )
32
33 // Enum value maps for KemAlgorithm.
34 var (
35 KemAlgorithm_name = map[int32]string{
36 0: "KEM_ALGORITHM_UNSPECIFIED",
37 1: "KEM_ALGORITHM_DHKEM_X25519_HKDF_SHA256",
38 }
39 KemAlgorithm_value = map[string]int32{
40 "KEM_ALGORITHM_UNSPECIFIED": 0,
41 "KEM_ALGORITHM_DHKEM_X25519_HKDF_SHA256": 1,
42 }
43 )
44
45 func (x KemAlgorithm) Enum() *KemAlgorithm {
46 p := new(KemAlgorithm)
47 *p = x
48 return p
49 }
50
51 func (x KemAlgorithm) String() string {
52 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
53 }
54
55 func (KemAlgorithm) Descriptor() protoreflect.EnumDescriptor {
56 return file_keymanager_km_common_proto_algorithms_proto_enumTypes[0].Descriptor()
57 }
58
59 func (KemAlgorithm) Type() protoreflect.EnumType {
60 return &file_keymanager_km_common_proto_algorithms_proto_enumTypes[0]
61 }
62
63 func (x KemAlgorithm) Number() protoreflect.EnumNumber {
64 return protoreflect.EnumNumber(x)
65 }
66
67 // Deprecated: Use KemAlgorithm.Descriptor instead.
68 func (KemAlgorithm) EnumDescriptor() ([]byte, []int) {
69 return file_keymanager_km_common_proto_algorithms_proto_rawDescGZIP(), []int{0}
70 }
71
72 // Key Derivation Function (KDF)
73 type KdfAlgorithm int32
74
75 const (
76 KdfAlgorithm_KDF_ALGORITHM_UNSPECIFIED KdfAlgorithm = 0
77 KdfAlgorithm_KDF_ALGORITHM_HKDF_SHA256 KdfAlgorithm = 1
78 )
79
80 // Enum value maps for KdfAlgorithm.
81 var (
82 KdfAlgorithm_name = map[int32]string{
83 0: "KDF_ALGORITHM_UNSPECIFIED",
84 1: "KDF_ALGORITHM_HKDF_SHA256",
85 }
86 KdfAlgorithm_value = map[string]int32{
87 "KDF_ALGORITHM_UNSPECIFIED": 0,
88 "KDF_ALGORITHM_HKDF_SHA256": 1,
89 }
90 )
91
92 func (x KdfAlgorithm) Enum() *KdfAlgorithm {
93 p := new(KdfAlgorithm)
94 *p = x
95 return p
96 }
97
98 func (x KdfAlgorithm) String() string {
99 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
100 }
101
102 func (KdfAlgorithm) Descriptor() protoreflect.EnumDescriptor {
103 return file_keymanager_km_common_proto_algorithms_proto_enumTypes[1].Descriptor()
104 }
105
106 func (KdfAlgorithm) Type() protoreflect.EnumType {
107 return &file_keymanager_km_common_proto_algorithms_proto_enumTypes[1]
108 }
109
110 func (x KdfAlgorithm) Number() protoreflect.EnumNumber {
111 return protoreflect.EnumNumber(x)
112 }
113
114 // Deprecated: Use KdfAlgorithm.Descriptor instead.
115 func (KdfAlgorithm) EnumDescriptor() ([]byte, []int) {
116 return file_keymanager_km_common_proto_algorithms_proto_rawDescGZIP(), []int{1}
117 }
118
119 // Authenticated Encryption with Associated Data (AEAD)
120 type AeadAlgorithm int32
121
122 const (
123 AeadAlgorithm_AEAD_ALGORITHM_UNSPECIFIED AeadAlgorithm = 0
124 AeadAlgorithm_AEAD_ALGORITHM_AES_256_GCM AeadAlgorithm = 1
125 )
126
127 // Enum value maps for AeadAlgorithm.
128 var (
129 AeadAlgorithm_name = map[int32]string{
130 0: "AEAD_ALGORITHM_UNSPECIFIED",
131 1: "AEAD_ALGORITHM_AES_256_GCM",
132 }
133 AeadAlgorithm_value = map[string]int32{
134 "AEAD_ALGORITHM_UNSPECIFIED": 0,
135 "AEAD_ALGORITHM_AES_256_GCM": 1,
136 }
137 )
138
139 func (x AeadAlgorithm) Enum() *AeadAlgorithm {
140 p := new(AeadAlgorithm)
141 *p = x
142 return p
143 }
144
145 func (x AeadAlgorithm) String() string {
146 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
147 }
148
149 func (AeadAlgorithm) Descriptor() protoreflect.EnumDescriptor {
150 return file_keymanager_km_common_proto_algorithms_proto_enumTypes[2].Descriptor()
151 }
152
153 func (AeadAlgorithm) Type() protoreflect.EnumType {
154 return &file_keymanager_km_common_proto_algorithms_proto_enumTypes[2]
155 }
156
157 func (x AeadAlgorithm) Number() protoreflect.EnumNumber {
158 return protoreflect.EnumNumber(x)
159 }
160
161 // Deprecated: Use AeadAlgorithm.Descriptor instead.
162 func (AeadAlgorithm) EnumDescriptor() ([]byte, []int) {
163 return file_keymanager_km_common_proto_algorithms_proto_rawDescGZIP(), []int{2}
164 }
165
166 // Composite HPKE Algorithm suite
167 type HpkeAlgorithm struct {
168 state protoimpl.MessageState `protogen:"open.v1"`
169 Kem KemAlgorithm `protobuf:"varint,1,opt,name=kem,proto3,enum=keymanager.KemAlgorithm" json:"kem,omitempty"`
170 Kdf KdfAlgorithm `protobuf:"varint,2,opt,name=kdf,proto3,enum=keymanager.KdfAlgorithm" json:"kdf,omitempty"`
171 Aead AeadAlgorithm `protobuf:"varint,3,opt,name=aead,proto3,enum=keymanager.AeadAlgorithm" json:"aead,omitempty"`
172 unknownFields protoimpl.UnknownFields
173 sizeCache protoimpl.SizeCache
174 }
175
176 func (x *HpkeAlgorithm) Reset() {
177 *x = HpkeAlgorithm{}
178 mi := &file_keymanager_km_common_proto_algorithms_proto_msgTypes[0]
179 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
180 ms.StoreMessageInfo(mi)
181 }
182
183 func (x *HpkeAlgorithm) String() string {
184 return protoimpl.X.MessageStringOf(x)
185 }
186
187 func (*HpkeAlgorithm) ProtoMessage() {}
188
189 func (x *HpkeAlgorithm) ProtoReflect() protoreflect.Message {
190 mi := &file_keymanager_km_common_proto_algorithms_proto_msgTypes[0]
191 if x != nil {
192 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
193 if ms.LoadMessageInfo() == nil {
194 ms.StoreMessageInfo(mi)
195 }
196 return ms
197 }
198 return mi.MessageOf(x)
199 }
200
201 // Deprecated: Use HpkeAlgorithm.ProtoReflect.Descriptor instead.
202 func (*HpkeAlgorithm) Descriptor() ([]byte, []int) {
203 return file_keymanager_km_common_proto_algorithms_proto_rawDescGZIP(), []int{0}
204 }
205
206 func (x *HpkeAlgorithm) GetKem() KemAlgorithm {
207 if x != nil {
208 return x.Kem
209 }
210 return KemAlgorithm_KEM_ALGORITHM_UNSPECIFIED
211 }
212
213 func (x *HpkeAlgorithm) GetKdf() KdfAlgorithm {
214 if x != nil {
215 return x.Kdf
216 }
217 return KdfAlgorithm_KDF_ALGORITHM_UNSPECIFIED
218 }
219
220 func (x *HpkeAlgorithm) GetAead() AeadAlgorithm {
221 if x != nil {
222 return x.Aead
223 }
224 return AeadAlgorithm_AEAD_ALGORITHM_UNSPECIFIED
225 }
226
227 var File_keymanager_km_common_proto_algorithms_proto protoreflect.FileDescriptor
228
229 const file_keymanager_km_common_proto_algorithms_proto_rawDesc = "" +
230 "\n" +
231 "+keymanager/km_common/proto/algorithms.proto\x12\n" +
232 "keymanager\"\x96\x01\n" +
233 "\rHpkeAlgorithm\x12*\n" +
234 "\x03kem\x18\x01 \x01(\x0e2\x18.keymanager.KemAlgorithmR\x03kem\x12*\n" +
235 "\x03kdf\x18\x02 \x01(\x0e2\x18.keymanager.KdfAlgorithmR\x03kdf\x12-\n" +
236 "\x04aead\x18\x03 \x01(\x0e2\x19.keymanager.AeadAlgorithmR\x04aead*Y\n" +
237 "\fKemAlgorithm\x12\x1d\n" +
238 "\x19KEM_ALGORITHM_UNSPECIFIED\x10\x00\x12*\n" +
239 "&KEM_ALGORITHM_DHKEM_X25519_HKDF_SHA256\x10\x01*L\n" +
240 "\fKdfAlgorithm\x12\x1d\n" +
241 "\x19KDF_ALGORITHM_UNSPECIFIED\x10\x00\x12\x1d\n" +
242 "\x19KDF_ALGORITHM_HKDF_SHA256\x10\x01*O\n" +
243 "\rAeadAlgorithm\x12\x1e\n" +
244 "\x1aAEAD_ALGORITHM_UNSPECIFIED\x10\x00\x12\x1e\n" +
245 "\x1aAEAD_ALGORITHM_AES_256_GCM\x10\x01BFZDgithub.com/google/go-tpm-tools/keymanager/km_common/proto;keymanagerb\x06proto3"
246
247 var (
248 file_keymanager_km_common_proto_algorithms_proto_rawDescOnce sync.Once
249 file_keymanager_km_common_proto_algorithms_proto_rawDescData []byte
250 )
251
252 func file_keymanager_km_common_proto_algorithms_proto_rawDescGZIP() []byte {
253 file_keymanager_km_common_proto_algorithms_proto_rawDescOnce.Do(func() {
254 file_keymanager_km_common_proto_algorithms_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_keymanager_km_common_proto_algorithms_proto_rawDesc), len(file_keymanager_km_common_proto_algorithms_proto_rawDesc)))
255 })
256 return file_keymanager_km_common_proto_algorithms_proto_rawDescData
257 }
258
259 var file_keymanager_km_common_proto_algorithms_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
260 var file_keymanager_km_common_proto_algorithms_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
261 var file_keymanager_km_common_proto_algorithms_proto_goTypes = []any{
262 (KemAlgorithm)(0), // 0: keymanager.KemAlgorithm
263 (KdfAlgorithm)(0), // 1: keymanager.KdfAlgorithm
264 (AeadAlgorithm)(0), // 2: keymanager.AeadAlgorithm
265 (*HpkeAlgorithm)(nil), // 3: keymanager.HpkeAlgorithm
266 }
267 var file_keymanager_km_common_proto_algorithms_proto_depIdxs = []int32{
268 0, // 0: keymanager.HpkeAlgorithm.kem:type_name -> keymanager.KemAlgorithm
269 1, // 1: keymanager.HpkeAlgorithm.kdf:type_name -> keymanager.KdfAlgorithm
270 2, // 2: keymanager.HpkeAlgorithm.aead:type_name -> keymanager.AeadAlgorithm
271 3, // [3:3] is the sub-list for method output_type
272 3, // [3:3] is the sub-list for method input_type
273 3, // [3:3] is the sub-list for extension type_name
274 3, // [3:3] is the sub-list for extension extendee
275 0, // [0:3] is the sub-list for field type_name
276 }
277
278 func init() { file_keymanager_km_common_proto_algorithms_proto_init() }
279 func file_keymanager_km_common_proto_algorithms_proto_init() {
280 if File_keymanager_km_common_proto_algorithms_proto != nil {
281 return
282 }
283 type x struct{}
284 out := protoimpl.TypeBuilder{
285 File: protoimpl.DescBuilder{
286 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
287 RawDescriptor: unsafe.Slice(unsafe.StringData(file_keymanager_km_common_proto_algorithms_proto_rawDesc), len(file_keymanager_km_common_proto_algorithms_proto_rawDesc)),
288 NumEnums: 3,
289 NumMessages: 1,
290 NumExtensions: 0,
291 NumServices: 0,
292 },
293 GoTypes: file_keymanager_km_common_proto_algorithms_proto_goTypes,
294 DependencyIndexes: file_keymanager_km_common_proto_algorithms_proto_depIdxs,
295 EnumInfos: file_keymanager_km_common_proto_algorithms_proto_enumTypes,
296 MessageInfos: file_keymanager_km_common_proto_algorithms_proto_msgTypes,
297 }.Build()
298 File_keymanager_km_common_proto_algorithms_proto = out.File
299 file_keymanager_km_common_proto_algorithms_proto_goTypes = nil
300 file_keymanager_km_common_proto_algorithms_proto_depIdxs = nil
301 }