Debian Codegraph @

metadata/metadata.pb.go

raw
1 //
2 // metadata.proto - File which contains all of the metadata structures which we
3 // write to metadata files. Must be compiled with protoc to use the library.
4 // Compilation can be invoked with go generate.
5 //
6 // Copyright 2017 Google Inc.
7 // Author: Joe Richey ([email protected])
8 //
9 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
10 // use this file except in compliance with the License. You may obtain a copy of
11 // the License at
12 //
13 // http://www.apache.org/licenses/LICENSE-2.0
14 //
15 // Unless required by applicable law or agreed to in writing, software
16 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18 // License for the specific language governing permissions and limitations under
19 // the License.
20
21 // If the *.proto file is modified, be sure to run "make gen" (at the project
22 // root) to recreate the *.pb.go file.
23
24 // Code generated by protoc-gen-go. DO NOT EDIT.
25 // versions:
26 // protoc-gen-go v1.36.10
27 // protoc v3.6.1
28 // source: metadata/metadata.proto
29
30 package metadata
31
32 import (
33 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
34 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
35 reflect "reflect"
36 sync "sync"
37 unsafe "unsafe"
38 )
39
40 const (
41 // Verify that this generated code is sufficiently up-to-date.
42 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
43 // Verify that runtime/protoimpl is sufficiently up-to-date.
44 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
45 )
46
47 // Specifies the method in which an outside secret is obtained for a Protector
48 type SourceType int32
49
50 const (
51 SourceType_default SourceType = 0
52 SourceType_pam_passphrase SourceType = 1
53 SourceType_custom_passphrase SourceType = 2
54 SourceType_raw_key SourceType = 3
55 )
56
57 // Enum value maps for SourceType.
58 var (
59 SourceType_name = map[int32]string{
60 0: "default",
61 1: "pam_passphrase",
62 2: "custom_passphrase",
63 3: "raw_key",
64 }
65 SourceType_value = map[string]int32{
66 "default": 0,
67 "pam_passphrase": 1,
68 "custom_passphrase": 2,
69 "raw_key": 3,
70 }
71 )
72
73 func (x SourceType) Enum() *SourceType {
74 p := new(SourceType)
75 *p = x
76 return p
77 }
78
79 func (x SourceType) String() string {
80 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
81 }
82
83 func (SourceType) Descriptor() protoreflect.EnumDescriptor {
84 return file_metadata_metadata_proto_enumTypes[0].Descriptor()
85 }
86
87 func (SourceType) Type() protoreflect.EnumType {
88 return &file_metadata_metadata_proto_enumTypes[0]
89 }
90
91 func (x SourceType) Number() protoreflect.EnumNumber {
92 return protoreflect.EnumNumber(x)
93 }
94
95 // Deprecated: Use SourceType.Descriptor instead.
96 func (SourceType) EnumDescriptor() ([]byte, []int) {
97 return file_metadata_metadata_proto_rawDescGZIP(), []int{0}
98 }
99
100 // Type of encryption; should match declarations of unix.FSCRYPT_MODE
101 type EncryptionOptions_Mode int32
102
103 const (
104 EncryptionOptions_default EncryptionOptions_Mode = 0
105 EncryptionOptions_AES_256_XTS EncryptionOptions_Mode = 1
106 EncryptionOptions_AES_256_GCM EncryptionOptions_Mode = 2
107 EncryptionOptions_AES_256_CBC EncryptionOptions_Mode = 3
108 EncryptionOptions_AES_256_CTS EncryptionOptions_Mode = 4
109 EncryptionOptions_AES_128_CBC EncryptionOptions_Mode = 5
110 EncryptionOptions_AES_128_CTS EncryptionOptions_Mode = 6
111 EncryptionOptions_Adiantum EncryptionOptions_Mode = 9
112 EncryptionOptions_AES_256_HCTR2 EncryptionOptions_Mode = 10
113 )
114
115 // Enum value maps for EncryptionOptions_Mode.
116 var (
117 EncryptionOptions_Mode_name = map[int32]string{
118 0: "default",
119 1: "AES_256_XTS",
120 2: "AES_256_GCM",
121 3: "AES_256_CBC",
122 4: "AES_256_CTS",
123 5: "AES_128_CBC",
124 6: "AES_128_CTS",
125 9: "Adiantum",
126 10: "AES_256_HCTR2",
127 }
128 EncryptionOptions_Mode_value = map[string]int32{
129 "default": 0,
130 "AES_256_XTS": 1,
131 "AES_256_GCM": 2,
132 "AES_256_CBC": 3,
133 "AES_256_CTS": 4,
134 "AES_128_CBC": 5,
135 "AES_128_CTS": 6,
136 "Adiantum": 9,
137 "AES_256_HCTR2": 10,
138 }
139 )
140
141 func (x EncryptionOptions_Mode) Enum() *EncryptionOptions_Mode {
142 p := new(EncryptionOptions_Mode)
143 *p = x
144 return p
145 }
146
147 func (x EncryptionOptions_Mode) String() string {
148 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
149 }
150
151 func (EncryptionOptions_Mode) Descriptor() protoreflect.EnumDescriptor {
152 return file_metadata_metadata_proto_enumTypes[1].Descriptor()
153 }
154
155 func (EncryptionOptions_Mode) Type() protoreflect.EnumType {
156 return &file_metadata_metadata_proto_enumTypes[1]
157 }
158
159 func (x EncryptionOptions_Mode) Number() protoreflect.EnumNumber {
160 return protoreflect.EnumNumber(x)
161 }
162
163 // Deprecated: Use EncryptionOptions_Mode.Descriptor instead.
164 func (EncryptionOptions_Mode) EnumDescriptor() ([]byte, []int) {
165 return file_metadata_metadata_proto_rawDescGZIP(), []int{3, 0}
166 }
167
168 // Cost parameters to be used in our hashing functions.
169 type HashingCosts struct {
170 state protoimpl.MessageState `protogen:"open.v1"`
171 Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
172 Memory int64 `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"`
173 Parallelism int64 `protobuf:"varint,4,opt,name=parallelism,proto3" json:"parallelism,omitempty"`
174 // If true, parallelism should no longer be truncated to 8 bits.
175 TruncationFixed bool `protobuf:"varint,5,opt,name=truncation_fixed,json=truncationFixed,proto3" json:"truncation_fixed,omitempty"`
176 unknownFields protoimpl.UnknownFields
177 sizeCache protoimpl.SizeCache
178 }
179
180 func (x *HashingCosts) Reset() {
181 *x = HashingCosts{}
182 mi := &file_metadata_metadata_proto_msgTypes[0]
183 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
184 ms.StoreMessageInfo(mi)
185 }
186
187 func (x *HashingCosts) String() string {
188 return protoimpl.X.MessageStringOf(x)
189 }
190
191 func (*HashingCosts) ProtoMessage() {}
192
193 func (x *HashingCosts) ProtoReflect() protoreflect.Message {
194 mi := &file_metadata_metadata_proto_msgTypes[0]
195 if x != nil {
196 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
197 if ms.LoadMessageInfo() == nil {
198 ms.StoreMessageInfo(mi)
199 }
200 return ms
201 }
202 return mi.MessageOf(x)
203 }
204
205 // Deprecated: Use HashingCosts.ProtoReflect.Descriptor instead.
206 func (*HashingCosts) Descriptor() ([]byte, []int) {
207 return file_metadata_metadata_proto_rawDescGZIP(), []int{0}
208 }
209
210 func (x *HashingCosts) GetTime() int64 {
211 if x != nil {
212 return x.Time
213 }
214 return 0
215 }
216
217 func (x *HashingCosts) GetMemory() int64 {
218 if x != nil {
219 return x.Memory
220 }
221 return 0
222 }
223
224 func (x *HashingCosts) GetParallelism() int64 {
225 if x != nil {
226 return x.Parallelism
227 }
228 return 0
229 }
230
231 func (x *HashingCosts) GetTruncationFixed() bool {
232 if x != nil {
233 return x.TruncationFixed
234 }
235 return false
236 }
237
238 // This structure is used for our authenticated wrapping/unwrapping of keys.
239 type WrappedKeyData struct {
240 state protoimpl.MessageState `protogen:"open.v1"`
241 IV []byte `protobuf:"bytes,1,opt,name=IV,proto3" json:"IV,omitempty"`
242 EncryptedKey []byte `protobuf:"bytes,2,opt,name=encrypted_key,json=encryptedKey,proto3" json:"encrypted_key,omitempty"`
243 Hmac []byte `protobuf:"bytes,3,opt,name=hmac,proto3" json:"hmac,omitempty"`
244 unknownFields protoimpl.UnknownFields
245 sizeCache protoimpl.SizeCache
246 }
247
248 func (x *WrappedKeyData) Reset() {
249 *x = WrappedKeyData{}
250 mi := &file_metadata_metadata_proto_msgTypes[1]
251 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
252 ms.StoreMessageInfo(mi)
253 }
254
255 func (x *WrappedKeyData) String() string {
256 return protoimpl.X.MessageStringOf(x)
257 }
258
259 func (*WrappedKeyData) ProtoMessage() {}
260
261 func (x *WrappedKeyData) ProtoReflect() protoreflect.Message {
262 mi := &file_metadata_metadata_proto_msgTypes[1]
263 if x != nil {
264 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
265 if ms.LoadMessageInfo() == nil {
266 ms.StoreMessageInfo(mi)
267 }
268 return ms
269 }
270 return mi.MessageOf(x)
271 }
272
273 // Deprecated: Use WrappedKeyData.ProtoReflect.Descriptor instead.
274 func (*WrappedKeyData) Descriptor() ([]byte, []int) {
275 return file_metadata_metadata_proto_rawDescGZIP(), []int{1}
276 }
277
278 func (x *WrappedKeyData) GetIV() []byte {
279 if x != nil {
280 return x.IV
281 }
282 return nil
283 }
284
285 func (x *WrappedKeyData) GetEncryptedKey() []byte {
286 if x != nil {
287 return x.EncryptedKey
288 }
289 return nil
290 }
291
292 func (x *WrappedKeyData) GetHmac() []byte {
293 if x != nil {
294 return x.Hmac
295 }
296 return nil
297 }
298
299 // The associated data for each protector
300 type ProtectorData struct {
301 state protoimpl.MessageState `protogen:"open.v1"`
302 ProtectorDescriptor string `protobuf:"bytes,1,opt,name=protector_descriptor,json=protectorDescriptor,proto3" json:"protector_descriptor,omitempty"`
303 Source SourceType `protobuf:"varint,2,opt,name=source,proto3,enum=metadata.SourceType" json:"source,omitempty"`
304 // These are only used by some of the protector types
305 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
306 Costs *HashingCosts `protobuf:"bytes,4,opt,name=costs,proto3" json:"costs,omitempty"`
307 Salt []byte `protobuf:"bytes,5,opt,name=salt,proto3" json:"salt,omitempty"`
308 Uid int64 `protobuf:"varint,6,opt,name=uid,proto3" json:"uid,omitempty"`
309 WrappedKey *WrappedKeyData `protobuf:"bytes,7,opt,name=wrapped_key,json=wrappedKey,proto3" json:"wrapped_key,omitempty"`
310 unknownFields protoimpl.UnknownFields
311 sizeCache protoimpl.SizeCache
312 }
313
314 func (x *ProtectorData) Reset() {
315 *x = ProtectorData{}
316 mi := &file_metadata_metadata_proto_msgTypes[2]
317 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
318 ms.StoreMessageInfo(mi)
319 }
320
321 func (x *ProtectorData) String() string {
322 return protoimpl.X.MessageStringOf(x)
323 }
324
325 func (*ProtectorData) ProtoMessage() {}
326
327 func (x *ProtectorData) ProtoReflect() protoreflect.Message {
328 mi := &file_metadata_metadata_proto_msgTypes[2]
329 if x != nil {
330 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
331 if ms.LoadMessageInfo() == nil {
332 ms.StoreMessageInfo(mi)
333 }
334 return ms
335 }
336 return mi.MessageOf(x)
337 }
338
339 // Deprecated: Use ProtectorData.ProtoReflect.Descriptor instead.
340 func (*ProtectorData) Descriptor() ([]byte, []int) {
341 return file_metadata_metadata_proto_rawDescGZIP(), []int{2}
342 }
343
344 func (x *ProtectorData) GetProtectorDescriptor() string {
345 if x != nil {
346 return x.ProtectorDescriptor
347 }
348 return ""
349 }
350
351 func (x *ProtectorData) GetSource() SourceType {
352 if x != nil {
353 return x.Source
354 }
355 return SourceType_default
356 }
357
358 func (x *ProtectorData) GetName() string {
359 if x != nil {
360 return x.Name
361 }
362 return ""
363 }
364
365 func (x *ProtectorData) GetCosts() *HashingCosts {
366 if x != nil {
367 return x.Costs
368 }
369 return nil
370 }
371
372 func (x *ProtectorData) GetSalt() []byte {
373 if x != nil {
374 return x.Salt
375 }
376 return nil
377 }
378
379 func (x *ProtectorData) GetUid() int64 {
380 if x != nil {
381 return x.Uid
382 }
383 return 0
384 }
385
386 func (x *ProtectorData) GetWrappedKey() *WrappedKeyData {
387 if x != nil {
388 return x.WrappedKey
389 }
390 return nil
391 }
392
393 // Encryption policy specifics, corresponds to the fscrypt_policy struct
394 type EncryptionOptions struct {
395 state protoimpl.MessageState `protogen:"open.v1"`
396 Padding int64 `protobuf:"varint,1,opt,name=padding,proto3" json:"padding,omitempty"`
397 Contents EncryptionOptions_Mode `protobuf:"varint,2,opt,name=contents,proto3,enum=metadata.EncryptionOptions_Mode" json:"contents,omitempty"`
398 Filenames EncryptionOptions_Mode `protobuf:"varint,3,opt,name=filenames,proto3,enum=metadata.EncryptionOptions_Mode" json:"filenames,omitempty"`
399 PolicyVersion int64 `protobuf:"varint,4,opt,name=policy_version,json=policyVersion,proto3" json:"policy_version,omitempty"`
400 unknownFields protoimpl.UnknownFields
401 sizeCache protoimpl.SizeCache
402 }
403
404 func (x *EncryptionOptions) Reset() {
405 *x = EncryptionOptions{}
406 mi := &file_metadata_metadata_proto_msgTypes[3]
407 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
408 ms.StoreMessageInfo(mi)
409 }
410
411 func (x *EncryptionOptions) String() string {
412 return protoimpl.X.MessageStringOf(x)
413 }
414
415 func (*EncryptionOptions) ProtoMessage() {}
416
417 func (x *EncryptionOptions) ProtoReflect() protoreflect.Message {
418 mi := &file_metadata_metadata_proto_msgTypes[3]
419 if x != nil {
420 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
421 if ms.LoadMessageInfo() == nil {
422 ms.StoreMessageInfo(mi)
423 }
424 return ms
425 }
426 return mi.MessageOf(x)
427 }
428
429 // Deprecated: Use EncryptionOptions.ProtoReflect.Descriptor instead.
430 func (*EncryptionOptions) Descriptor() ([]byte, []int) {
431 return file_metadata_metadata_proto_rawDescGZIP(), []int{3}
432 }
433
434 func (x *EncryptionOptions) GetPadding() int64 {
435 if x != nil {
436 return x.Padding
437 }
438 return 0
439 }
440
441 func (x *EncryptionOptions) GetContents() EncryptionOptions_Mode {
442 if x != nil {
443 return x.Contents
444 }
445 return EncryptionOptions_default
446 }
447
448 func (x *EncryptionOptions) GetFilenames() EncryptionOptions_Mode {
449 if x != nil {
450 return x.Filenames
451 }
452 return EncryptionOptions_default
453 }
454
455 func (x *EncryptionOptions) GetPolicyVersion() int64 {
456 if x != nil {
457 return x.PolicyVersion
458 }
459 return 0
460 }
461
462 type WrappedPolicyKey struct {
463 state protoimpl.MessageState `protogen:"open.v1"`
464 ProtectorDescriptor string `protobuf:"bytes,1,opt,name=protector_descriptor,json=protectorDescriptor,proto3" json:"protector_descriptor,omitempty"`
465 WrappedKey *WrappedKeyData `protobuf:"bytes,2,opt,name=wrapped_key,json=wrappedKey,proto3" json:"wrapped_key,omitempty"`
466 unknownFields protoimpl.UnknownFields
467 sizeCache protoimpl.SizeCache
468 }
469
470 func (x *WrappedPolicyKey) Reset() {
471 *x = WrappedPolicyKey{}
472 mi := &file_metadata_metadata_proto_msgTypes[4]
473 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
474 ms.StoreMessageInfo(mi)
475 }
476
477 func (x *WrappedPolicyKey) String() string {
478 return protoimpl.X.MessageStringOf(x)
479 }
480
481 func (*WrappedPolicyKey) ProtoMessage() {}
482
483 func (x *WrappedPolicyKey) ProtoReflect() protoreflect.Message {
484 mi := &file_metadata_metadata_proto_msgTypes[4]
485 if x != nil {
486 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
487 if ms.LoadMessageInfo() == nil {
488 ms.StoreMessageInfo(mi)
489 }
490 return ms
491 }
492 return mi.MessageOf(x)
493 }
494
495 // Deprecated: Use WrappedPolicyKey.ProtoReflect.Descriptor instead.
496 func (*WrappedPolicyKey) Descriptor() ([]byte, []int) {
497 return file_metadata_metadata_proto_rawDescGZIP(), []int{4}
498 }
499
500 func (x *WrappedPolicyKey) GetProtectorDescriptor() string {
501 if x != nil {
502 return x.ProtectorDescriptor
503 }
504 return ""
505 }
506
507 func (x *WrappedPolicyKey) GetWrappedKey() *WrappedKeyData {
508 if x != nil {
509 return x.WrappedKey
510 }
511 return nil
512 }
513
514 // The associated data for each policy
515 type PolicyData struct {
516 state protoimpl.MessageState `protogen:"open.v1"`
517 KeyDescriptor string `protobuf:"bytes,1,opt,name=key_descriptor,json=keyDescriptor,proto3" json:"key_descriptor,omitempty"`
518 Options *EncryptionOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
519 WrappedPolicyKeys []*WrappedPolicyKey `protobuf:"bytes,3,rep,name=wrapped_policy_keys,json=wrappedPolicyKeys,proto3" json:"wrapped_policy_keys,omitempty"`
520 unknownFields protoimpl.UnknownFields
521 sizeCache protoimpl.SizeCache
522 }
523
524 func (x *PolicyData) Reset() {
525 *x = PolicyData{}
526 mi := &file_metadata_metadata_proto_msgTypes[5]
527 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
528 ms.StoreMessageInfo(mi)
529 }
530
531 func (x *PolicyData) String() string {
532 return protoimpl.X.MessageStringOf(x)
533 }
534
535 func (*PolicyData) ProtoMessage() {}
536
537 func (x *PolicyData) ProtoReflect() protoreflect.Message {
538 mi := &file_metadata_metadata_proto_msgTypes[5]
539 if x != nil {
540 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
541 if ms.LoadMessageInfo() == nil {
542 ms.StoreMessageInfo(mi)
543 }
544 return ms
545 }
546 return mi.MessageOf(x)
547 }
548
549 // Deprecated: Use PolicyData.ProtoReflect.Descriptor instead.
550 func (*PolicyData) Descriptor() ([]byte, []int) {
551 return file_metadata_metadata_proto_rawDescGZIP(), []int{5}
552 }
553
554 func (x *PolicyData) GetKeyDescriptor() string {
555 if x != nil {
556 return x.KeyDescriptor
557 }
558 return ""
559 }
560
561 func (x *PolicyData) GetOptions() *EncryptionOptions {
562 if x != nil {
563 return x.Options
564 }
565 return nil
566 }
567
568 func (x *PolicyData) GetWrappedPolicyKeys() []*WrappedPolicyKey {
569 if x != nil {
570 return x.WrappedPolicyKeys
571 }
572 return nil
573 }
574
575 // Data stored in the config file
576 type Config struct {
577 state protoimpl.MessageState `protogen:"open.v1"`
578 Source SourceType `protobuf:"varint,1,opt,name=source,proto3,enum=metadata.SourceType" json:"source,omitempty"`
579 HashCosts *HashingCosts `protobuf:"bytes,2,opt,name=hash_costs,json=hashCosts,proto3" json:"hash_costs,omitempty"`
580 Options *EncryptionOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
581 UseFsKeyringForV1Policies bool `protobuf:"varint,5,opt,name=use_fs_keyring_for_v1_policies,json=useFsKeyringForV1Policies,proto3" json:"use_fs_keyring_for_v1_policies,omitempty"`
582 AllowCrossUserMetadata bool `protobuf:"varint,6,opt,name=allow_cross_user_metadata,json=allowCrossUserMetadata,proto3" json:"allow_cross_user_metadata,omitempty"`
583 unknownFields protoimpl.UnknownFields
584 sizeCache protoimpl.SizeCache
585 }
586
587 func (x *Config) Reset() {
588 *x = Config{}
589 mi := &file_metadata_metadata_proto_msgTypes[6]
590 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
591 ms.StoreMessageInfo(mi)
592 }
593
594 func (x *Config) String() string {
595 return protoimpl.X.MessageStringOf(x)
596 }
597
598 func (*Config) ProtoMessage() {}
599
600 func (x *Config) ProtoReflect() protoreflect.Message {
601 mi := &file_metadata_metadata_proto_msgTypes[6]
602 if x != nil {
603 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
604 if ms.LoadMessageInfo() == nil {
605 ms.StoreMessageInfo(mi)
606 }
607 return ms
608 }
609 return mi.MessageOf(x)
610 }
611
612 // Deprecated: Use Config.ProtoReflect.Descriptor instead.
613 func (*Config) Descriptor() ([]byte, []int) {
614 return file_metadata_metadata_proto_rawDescGZIP(), []int{6}
615 }
616
617 func (x *Config) GetSource() SourceType {
618 if x != nil {
619 return x.Source
620 }
621 return SourceType_default
622 }
623
624 func (x *Config) GetHashCosts() *HashingCosts {
625 if x != nil {
626 return x.HashCosts
627 }
628 return nil
629 }
630
631 func (x *Config) GetOptions() *EncryptionOptions {
632 if x != nil {
633 return x.Options
634 }
635 return nil
636 }
637
638 func (x *Config) GetUseFsKeyringForV1Policies() bool {
639 if x != nil {
640 return x.UseFsKeyringForV1Policies
641 }
642 return false
643 }
644
645 func (x *Config) GetAllowCrossUserMetadata() bool {
646 if x != nil {
647 return x.AllowCrossUserMetadata
648 }
649 return false
650 }
651
652 var File_metadata_metadata_proto protoreflect.FileDescriptor
653
654 const file_metadata_metadata_proto_rawDesc = "" +
655 "\n" +
656 "\x17metadata/metadata.proto\x12\bmetadata\"\x87\x01\n" +
657 "\fHashingCosts\x12\x12\n" +
658 "\x04time\x18\x02 \x01(\x03R\x04time\x12\x16\n" +
659 "\x06memory\x18\x03 \x01(\x03R\x06memory\x12 \n" +
660 "\vparallelism\x18\x04 \x01(\x03R\vparallelism\x12)\n" +
661 "\x10truncation_fixed\x18\x05 \x01(\bR\x0ftruncationFixed\"Y\n" +
662 "\x0eWrappedKeyData\x12\x0e\n" +
663 "\x02IV\x18\x01 \x01(\fR\x02IV\x12#\n" +
664 "\rencrypted_key\x18\x02 \x01(\fR\fencryptedKey\x12\x12\n" +
665 "\x04hmac\x18\x03 \x01(\fR\x04hmac\"\x93\x02\n" +
666 "\rProtectorData\x121\n" +
667 "\x14protector_descriptor\x18\x01 \x01(\tR\x13protectorDescriptor\x12,\n" +
668 "\x06source\x18\x02 \x01(\x0e2\x14.metadata.SourceTypeR\x06source\x12\x12\n" +
669 "\x04name\x18\x03 \x01(\tR\x04name\x12,\n" +
670 "\x05costs\x18\x04 \x01(\v2\x16.metadata.HashingCostsR\x05costs\x12\x12\n" +
671 "\x04salt\x18\x05 \x01(\fR\x04salt\x12\x10\n" +
672 "\x03uid\x18\x06 \x01(\x03R\x03uid\x129\n" +
673 "\vwrapped_key\x18\a \x01(\v2\x18.metadata.WrappedKeyDataR\n" +
674 "wrappedKey\"\xef\x02\n" +
675 "\x11EncryptionOptions\x12\x18\n" +
676 "\apadding\x18\x01 \x01(\x03R\apadding\x12<\n" +
677 "\bcontents\x18\x02 \x01(\x0e2 .metadata.EncryptionOptions.ModeR\bcontents\x12>\n" +
678 "\tfilenames\x18\x03 \x01(\x0e2 .metadata.EncryptionOptions.ModeR\tfilenames\x12%\n" +
679 "\x0epolicy_version\x18\x04 \x01(\x03R\rpolicyVersion\"\x9a\x01\n" +
680 "\x04Mode\x12\v\n" +
681 "\adefault\x10\x00\x12\x0f\n" +
682 "\vAES_256_XTS\x10\x01\x12\x0f\n" +
683 "\vAES_256_GCM\x10\x02\x12\x0f\n" +
684 "\vAES_256_CBC\x10\x03\x12\x0f\n" +
685 "\vAES_256_CTS\x10\x04\x12\x0f\n" +
686 "\vAES_128_CBC\x10\x05\x12\x0f\n" +
687 "\vAES_128_CTS\x10\x06\x12\f\n" +
688 "\bAdiantum\x10\t\x12\x11\n" +
689 "\rAES_256_HCTR2\x10\n" +
690 "\"\x80\x01\n" +
691 "\x10WrappedPolicyKey\x121\n" +
692 "\x14protector_descriptor\x18\x01 \x01(\tR\x13protectorDescriptor\x129\n" +
693 "\vwrapped_key\x18\x02 \x01(\v2\x18.metadata.WrappedKeyDataR\n" +
694 "wrappedKey\"\xb6\x01\n" +
695 "\n" +
696 "PolicyData\x12%\n" +
697 "\x0ekey_descriptor\x18\x01 \x01(\tR\rkeyDescriptor\x125\n" +
698 "\aoptions\x18\x02 \x01(\v2\x1b.metadata.EncryptionOptionsR\aoptions\x12J\n" +
699 "\x13wrapped_policy_keys\x18\x03 \x03(\v2\x1a.metadata.WrappedPolicyKeyR\x11wrappedPolicyKeys\"\xb7\x02\n" +
700 "\x06Config\x12,\n" +
701 "\x06source\x18\x01 \x01(\x0e2\x14.metadata.SourceTypeR\x06source\x125\n" +
702 "\n" +
703 "hash_costs\x18\x02 \x01(\v2\x16.metadata.HashingCostsR\thashCosts\x125\n" +
704 "\aoptions\x18\x04 \x01(\v2\x1b.metadata.EncryptionOptionsR\aoptions\x12A\n" +
705 "\x1euse_fs_keyring_for_v1_policies\x18\x05 \x01(\bR\x19useFsKeyringForV1Policies\x129\n" +
706 "\x19allow_cross_user_metadata\x18\x06 \x01(\bR\x16allowCrossUserMetadataJ\x04\b\x03\x10\x04R\rcompatibility*Q\n" +
707 "\n" +
708 "SourceType\x12\v\n" +
709 "\adefault\x10\x00\x12\x12\n" +
710 "\x0epam_passphrase\x10\x01\x12\x15\n" +
711 "\x11custom_passphrase\x10\x02\x12\v\n" +
712 "\araw_key\x10\x03B$Z\"github.com/google/fscrypt/metadatab\x06proto3"
713
714 var (
715 file_metadata_metadata_proto_rawDescOnce sync.Once
716 file_metadata_metadata_proto_rawDescData []byte
717 )
718
719 func file_metadata_metadata_proto_rawDescGZIP() []byte {
720 file_metadata_metadata_proto_rawDescOnce.Do(func() {
721 file_metadata_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_metadata_metadata_proto_rawDesc), len(file_metadata_metadata_proto_rawDesc)))
722 })
723 return file_metadata_metadata_proto_rawDescData
724 }
725
726 var file_metadata_metadata_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
727 var file_metadata_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
728 var file_metadata_metadata_proto_goTypes = []any{
729 (SourceType)(0), // 0: metadata.SourceType
730 (EncryptionOptions_Mode)(0), // 1: metadata.EncryptionOptions.Mode
731 (*HashingCosts)(nil), // 2: metadata.HashingCosts
732 (*WrappedKeyData)(nil), // 3: metadata.WrappedKeyData
733 (*ProtectorData)(nil), // 4: metadata.ProtectorData
734 (*EncryptionOptions)(nil), // 5: metadata.EncryptionOptions
735 (*WrappedPolicyKey)(nil), // 6: metadata.WrappedPolicyKey
736 (*PolicyData)(nil), // 7: metadata.PolicyData
737 (*Config)(nil), // 8: metadata.Config
738 }
739 var file_metadata_metadata_proto_depIdxs = []int32{
740 0, // 0: metadata.ProtectorData.source:type_name -> metadata.SourceType
741 2, // 1: metadata.ProtectorData.costs:type_name -> metadata.HashingCosts
742 3, // 2: metadata.ProtectorData.wrapped_key:type_name -> metadata.WrappedKeyData
743 1, // 3: metadata.EncryptionOptions.contents:type_name -> metadata.EncryptionOptions.Mode
744 1, // 4: metadata.EncryptionOptions.filenames:type_name -> metadata.EncryptionOptions.Mode
745 3, // 5: metadata.WrappedPolicyKey.wrapped_key:type_name -> metadata.WrappedKeyData
746 5, // 6: metadata.PolicyData.options:type_name -> metadata.EncryptionOptions
747 6, // 7: metadata.PolicyData.wrapped_policy_keys:type_name -> metadata.WrappedPolicyKey
748 0, // 8: metadata.Config.source:type_name -> metadata.SourceType
749 2, // 9: metadata.Config.hash_costs:type_name -> metadata.HashingCosts
750 5, // 10: metadata.Config.options:type_name -> metadata.EncryptionOptions
751 11, // [11:11] is the sub-list for method output_type
752 11, // [11:11] is the sub-list for method input_type
753 11, // [11:11] is the sub-list for extension type_name
754 11, // [11:11] is the sub-list for extension extendee
755 0, // [0:11] is the sub-list for field type_name
756 }
757
758 func init() { file_metadata_metadata_proto_init() }
759 func file_metadata_metadata_proto_init() {
760 if File_metadata_metadata_proto != nil {
761 return
762 }
763 type x struct{}
764 out := protoimpl.TypeBuilder{
765 File: protoimpl.DescBuilder{
766 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
767 RawDescriptor: unsafe.Slice(unsafe.StringData(file_metadata_metadata_proto_rawDesc), len(file_metadata_metadata_proto_rawDesc)),
768 NumEnums: 2,
769 NumMessages: 7,
770 NumExtensions: 0,
771 NumServices: 0,
772 },
773 GoTypes: file_metadata_metadata_proto_goTypes,
774 DependencyIndexes: file_metadata_metadata_proto_depIdxs,
775 EnumInfos: file_metadata_metadata_proto_enumTypes,
776 MessageInfos: file_metadata_metadata_proto_msgTypes,
777 }.Build()
778 File_metadata_metadata_proto = out.File
779 file_metadata_metadata_proto_goTypes = nil
780 file_metadata_metadata_proto_depIdxs = nil
781 }