Skip to main content

coven_protocol/objects/
domains.rs

1/// Signed object kind bound into protection AAD and checked against the
2/// semantic path before storage I/O.
3#[derive(Clone, Copy, Debug, PartialEq, Eq)]
4pub enum ProtectedObjectDomain {
5    StoreProtocolRoot,
6    StoreCurrentPublication,
7    StorePublicationEntry,
8    StoreCommit,
9    StoreHead,
10    StoreAck,
11    StoreDeviceRegistration,
12    DeviceJoinAbandonment,
13    DeviceJoinCleanupReceipt,
14    DeviceJoinTransport,
15    StoreDeviceExclusionProposal,
16    StoreDeviceExclusionOutcome,
17    StoreReclaimEvidence,
18    StoreReclaimAuthorization,
19    StoreReclaimReceipt,
20    ProviderAccessGrant,
21    OwnerRecoveryNode,
22    StoreSnapshotMeta,
23    StoreSnapshotImage,
24    StoreMembershipRollup,
25    StoreMembershipEntry,
26    StoreMembershipHead,
27    StoreMembershipResolution,
28    StoreWrappedKey,
29    StorePackage,
30    CircleControl,
31    CircleRoster,
32    CircleRosterResolution,
33    CircleMetadata,
34    CirclePackage,
35    CircleBootstrapImage,
36    CircleEpochCloseIntent,
37    CircleEpochCloseOutcome,
38    CircleEpochCloseResponse,
39    CircleAccessLeaf,
40    CircleAccessEnvelope,
41    CircleAcknowledgement,
42    CircleSnapshotMeta,
43    CircleSnapshotImage,
44}
45
46#[derive(Clone, Copy)]
47pub(super) struct ProtocolObjectMetadata {
48    pub(super) aad_label: &'static [u8],
49    pub(super) path: ProtocolPathRule,
50    pub(super) extension: &'static str,
51}
52
53#[derive(Clone, Copy)]
54pub(super) enum ProtocolPathRule {
55    Exact(&'static [ExactPathShape]),
56    StoreDeviceRegistration,
57    StoreMembershipHead,
58    StoreCandidate {
59        kind: &'static str,
60        component_count: usize,
61    },
62    CircleCandidate {
63        kind: &'static str,
64        component_count: usize,
65    },
66}
67
68#[derive(Clone, Copy)]
69pub(super) struct ExactPathShape {
70    component_count: usize,
71    fixed_components: &'static [(usize, &'static str)],
72}
73
74impl ProtocolPathRule {
75    pub(super) fn accepts(self, semantic_prefix: &str) -> bool {
76        match self {
77            Self::Exact(shapes) => shapes
78                .iter()
79                .any(|shape| accepts_path_shape(semantic_prefix, *shape)),
80            Self::StoreDeviceRegistration => {
81                (accepts_path_shape(
82                    semantic_prefix,
83                    ExactPathShape {
84                        component_count: 3,
85                        fixed_components: &[(0, "store-v1"), (1, "devices")],
86                    },
87                ) && semantic_prefix.split('/').nth(2) != Some("founder"))
88                    || accepts_path_shape(
89                        semantic_prefix,
90                        ExactPathShape {
91                            component_count: 5,
92                            fixed_components: &[
93                                (0, "store-v1"),
94                                (1, "devices"),
95                                (2, "founder"),
96                                (4, "registration"),
97                            ],
98                        },
99                    )
100            }
101            Self::StoreMembershipHead => {
102                (accepts_path_shape(
103                    semantic_prefix,
104                    ExactPathShape {
105                        component_count: 7,
106                        fixed_components: &[(0, "store-v1"), (1, "membership"), (2, "heads")],
107                    },
108                ) && semantic_prefix.split('/').nth(3) != Some("founder"))
109                    || accepts_path_shape(
110                        semantic_prefix,
111                        ExactPathShape {
112                            component_count: 6,
113                            fixed_components: &[
114                                (0, "store-v1"),
115                                (1, "membership"),
116                                (2, "heads"),
117                                (3, "founder"),
118                                (5, "1"),
119                            ],
120                        },
121                    )
122            }
123            Self::StoreCandidate {
124                kind,
125                component_count,
126            } => accepts_candidate_path(
127                semantic_prefix,
128                component_count,
129                &[(0, "store-v1"), (1, "candidates"), (3, kind)],
130            ),
131            Self::CircleCandidate {
132                kind,
133                component_count,
134            } => accepts_candidate_path(
135                semantic_prefix,
136                component_count,
137                &[(0, "circles"), (2, "candidates"), (4, kind)],
138            ),
139        }
140    }
141}
142
143fn accepts_path_shape(semantic_prefix: &str, shape: ExactPathShape) -> bool {
144    let components = semantic_prefix.split('/').collect::<Vec<_>>();
145    components.len() == shape.component_count
146        && components.iter().all(|component| !component.is_empty())
147        && shape
148            .fixed_components
149            .iter()
150            .all(|(index, expected)| components[*index] == *expected)
151}
152
153fn accepts_candidate_path(
154    semantic_prefix: &str,
155    component_count: usize,
156    fixed_components: &[(usize, &str)],
157) -> bool {
158    let components = semantic_prefix.split('/').collect::<Vec<_>>();
159    components.len() == component_count
160        && components.iter().all(|component| !component.is_empty())
161        && fixed_components.iter().all(|(index, expected)| {
162            components[*index] == *expected
163                && components
164                    .iter()
165                    .filter(|component| **component == *expected)
166                    .count()
167                    == 1
168        })
169}
170
171impl ProtectedObjectDomain {
172    pub(super) fn metadata(self) -> ProtocolObjectMetadata {
173        match self {
174            Self::StoreProtocolRoot => ProtocolObjectMetadata {
175                aad_label: b"store-protocol-root",
176                path: ProtocolPathRule::Exact(&[ExactPathShape {
177                    component_count: 2,
178                    fixed_components: &[(0, "store-v1"), (1, "store-protocol-root")],
179                }]),
180                extension: ".json",
181            },
182            Self::StoreCurrentPublication => ProtocolObjectMetadata {
183                aad_label: b"store-current-publication",
184                path: ProtocolPathRule::Exact(&[ExactPathShape {
185                    component_count: 3,
186                    fixed_components: &[(0, "store-v1"), (1, "publications"), (2, "current")],
187                }]),
188                extension: ".json",
189            },
190            Self::StorePublicationEntry => ProtocolObjectMetadata {
191                aad_label: b"store-publication-entry",
192                path: ProtocolPathRule::Exact(&[ExactPathShape {
193                    component_count: 5,
194                    fixed_components: &[(0, "store-v1"), (1, "publications"), (2, "entries")],
195                }]),
196                extension: ".json",
197            },
198            Self::StoreCommit => ProtocolObjectMetadata {
199                aad_label: b"store-commit",
200                path: ProtocolPathRule::StoreCandidate {
201                    kind: "commits",
202                    component_count: 7,
203                },
204                extension: ".json",
205            },
206            Self::StoreHead => ProtocolObjectMetadata {
207                aad_label: b"store-head",
208                path: ProtocolPathRule::Exact(&[ExactPathShape {
209                    component_count: 4,
210                    fixed_components: &[(0, "store-v1"), (1, "heads")],
211                }]),
212                extension: ".json",
213            },
214            Self::StoreAck => ProtocolObjectMetadata {
215                aad_label: b"store-ack",
216                path: ProtocolPathRule::Exact(&[ExactPathShape {
217                    component_count: 4,
218                    fixed_components: &[(0, "store-v1"), (1, "acks")],
219                }]),
220                extension: ".json",
221            },
222            Self::StoreDeviceRegistration => ProtocolObjectMetadata {
223                aad_label: b"store-device-registration",
224                path: ProtocolPathRule::StoreDeviceRegistration,
225                extension: ".json",
226            },
227            Self::DeviceJoinAbandonment => ProtocolObjectMetadata {
228                aad_label: b"device-join-abandonment",
229                path: ProtocolPathRule::Exact(&[ExactPathShape {
230                    component_count: 3,
231                    fixed_components: &[(0, "store-v1"), (1, "device-join-abandonments")],
232                }]),
233                extension: ".json",
234            },
235            Self::DeviceJoinCleanupReceipt => ProtocolObjectMetadata {
236                aad_label: b"device-join-cleanup-receipt",
237                path: ProtocolPathRule::Exact(&[ExactPathShape {
238                    component_count: 3,
239                    fixed_components: &[(0, "store-v1"), (1, "device-join-cleanup-receipts")],
240                }]),
241                extension: ".json",
242            },
243            Self::DeviceJoinTransport => ProtocolObjectMetadata {
244                aad_label: b"device-join-transport",
245                path: ProtocolPathRule::Exact(&[ExactPathShape {
246                    component_count: 4,
247                    fixed_components: &[(0, "store-v1"), (1, "device-join-transport")],
248                }]),
249                extension: ".json",
250            },
251            Self::StoreDeviceExclusionProposal => ProtocolObjectMetadata {
252                aad_label: b"store-device-exclusion-proposal",
253                path: ProtocolPathRule::Exact(&[ExactPathShape {
254                    component_count: 5,
255                    fixed_components: &[(0, "store-v1"), (1, "device-exclusion-proposals")],
256                }]),
257                extension: ".json",
258            },
259            Self::StoreDeviceExclusionOutcome => ProtocolObjectMetadata {
260                aad_label: b"store-device-exclusion-outcome",
261                path: ProtocolPathRule::Exact(&[ExactPathShape {
262                    component_count: 4,
263                    fixed_components: &[(0, "store-v1"), (1, "device-exclusion-outcomes")],
264                }]),
265                extension: ".json",
266            },
267            Self::StoreReclaimEvidence => ProtocolObjectMetadata {
268                aad_label: b"store-reclaim-evidence",
269                path: ProtocolPathRule::Exact(&[ExactPathShape {
270                    component_count: 4,
271                    fixed_components: &[(0, "store-v1"), (1, "reclaim"), (2, "evidence")],
272                }]),
273                extension: ".json",
274            },
275            Self::StoreReclaimAuthorization => ProtocolObjectMetadata {
276                aad_label: b"store-reclaim-authorization",
277                path: ProtocolPathRule::Exact(&[ExactPathShape {
278                    component_count: 4,
279                    fixed_components: &[(0, "store-v1"), (1, "reclaim"), (2, "authorizations")],
280                }]),
281                extension: ".json",
282            },
283            Self::StoreReclaimReceipt => ProtocolObjectMetadata {
284                aad_label: b"store-reclaim-receipt",
285                path: ProtocolPathRule::Exact(&[ExactPathShape {
286                    component_count: 4,
287                    fixed_components: &[(0, "store-v1"), (1, "reclaim"), (2, "receipts")],
288                }]),
289                extension: ".json",
290            },
291            Self::ProviderAccessGrant => ProtocolObjectMetadata {
292                aad_label: b"provider-access-grant",
293                path: ProtocolPathRule::Exact(&[ExactPathShape {
294                    component_count: 4,
295                    fixed_components: &[(0, "store-v1"), (1, "provider-access"), (2, "grants")],
296                }]),
297                extension: ".json",
298            },
299            Self::OwnerRecoveryNode => ProtocolObjectMetadata {
300                aad_label: b"owner-recovery-node",
301                path: ProtocolPathRule::Exact(&[ExactPathShape {
302                    component_count: 5,
303                    fixed_components: &[(0, "store-v1"), (1, "recovery")],
304                }]),
305                extension: ".json",
306            },
307            Self::StoreSnapshotMeta => ProtocolObjectMetadata {
308                aad_label: b"store-snapshot-meta",
309                path: ProtocolPathRule::Exact(&[ExactPathShape {
310                    component_count: 4,
311                    fixed_components: &[(0, "store-v1"), (1, "snapshots")],
312                }]),
313                extension: ".json",
314            },
315            Self::StoreMembershipRollup => ProtocolObjectMetadata {
316                aad_label: b"store-membership-rollup",
317                path: ProtocolPathRule::Exact(&[ExactPathShape {
318                    component_count: 4,
319                    fixed_components: &[(0, "store-v1"), (1, "membership-rollups")],
320                }]),
321                extension: ".json",
322            },
323            Self::StoreSnapshotImage => ProtocolObjectMetadata {
324                aad_label: b"store-snapshot-image",
325                path: ProtocolPathRule::Exact(&[ExactPathShape {
326                    component_count: 4,
327                    fixed_components: &[(0, "store-v1"), (1, "snapshot-images")],
328                }]),
329                extension: ".db",
330            },
331            Self::StoreMembershipEntry => ProtocolObjectMetadata {
332                aad_label: b"store-membership-entry",
333                path: ProtocolPathRule::Exact(&[ExactPathShape {
334                    component_count: 8,
335                    fixed_components: &[(0, "store-v1"), (1, "membership"), (2, "entries")],
336                }]),
337                extension: ".json",
338            },
339            Self::StoreMembershipHead => ProtocolObjectMetadata {
340                aad_label: b"store-membership-head",
341                path: ProtocolPathRule::StoreMembershipHead,
342                extension: ".json",
343            },
344            Self::StoreMembershipResolution => ProtocolObjectMetadata {
345                aad_label: b"store-membership-resolution",
346                path: ProtocolPathRule::Exact(&[ExactPathShape {
347                    component_count: 6,
348                    fixed_components: &[(0, "store-v1"), (1, "membership"), (2, "resolutions")],
349                }]),
350                extension: ".json",
351            },
352            Self::StoreWrappedKey => ProtocolObjectMetadata {
353                aad_label: b"store-wrapped-key",
354                path: ProtocolPathRule::Exact(&[ExactPathShape {
355                    component_count: 5,
356                    fixed_components: &[(0, "keys")],
357                }]),
358                extension: ".json",
359            },
360            Self::StorePackage => ProtocolObjectMetadata {
361                aad_label: b"store-package",
362                path: ProtocolPathRule::StoreCandidate {
363                    kind: "packages",
364                    component_count: 7,
365                },
366                extension: ".pkg",
367            },
368            Self::CircleControl => ProtocolObjectMetadata {
369                aad_label: b"circle-control",
370                path: ProtocolPathRule::Exact(&[
371                    ExactPathShape {
372                        component_count: 10,
373                        fixed_components: &[(0, "circle-control"), (2, "merge"), (3, "entries")],
374                    },
375                    ExactPathShape {
376                        component_count: 9,
377                        fixed_components: &[(0, "circle-control"), (2, "merge"), (3, "heads")],
378                    },
379                ]),
380                extension: ".json",
381            },
382            Self::CircleRoster => ProtocolObjectMetadata {
383                aad_label: b"circle-roster",
384                path: ProtocolPathRule::Exact(&[
385                    ExactPathShape {
386                        component_count: 10,
387                        fixed_components: &[(0, "circles"), (2, "roster"), (3, "entries")],
388                    },
389                    ExactPathShape {
390                        component_count: 9,
391                        fixed_components: &[(0, "circles"), (2, "roster"), (3, "heads")],
392                    },
393                ]),
394                extension: ".json",
395            },
396            Self::CircleRosterResolution => ProtocolObjectMetadata {
397                aad_label: b"circle-roster-resolution",
398                path: ProtocolPathRule::Exact(&[ExactPathShape {
399                    component_count: 7,
400                    fixed_components: &[(0, "circles"), (2, "roster"), (3, "resolutions")],
401                }]),
402                extension: ".json",
403            },
404            Self::CircleMetadata => ProtocolObjectMetadata {
405                aad_label: b"circle-metadata",
406                path: ProtocolPathRule::Exact(&[
407                    ExactPathShape {
408                        component_count: 10,
409                        fixed_components: &[(0, "circles"), (2, "metadata"), (3, "entries")],
410                    },
411                    ExactPathShape {
412                        component_count: 9,
413                        fixed_components: &[(0, "circles"), (2, "metadata"), (3, "heads")],
414                    },
415                ]),
416                extension: ".json",
417            },
418            Self::CirclePackage => ProtocolObjectMetadata {
419                aad_label: b"circle-package",
420                path: ProtocolPathRule::CircleCandidate {
421                    kind: "packages",
422                    component_count: 8,
423                },
424                extension: ".pkg",
425            },
426            Self::CircleBootstrapImage => ProtocolObjectMetadata {
427                aad_label: b"circle-bootstrap-image",
428                path: ProtocolPathRule::CircleCandidate {
429                    kind: "bootstraps",
430                    component_count: 9,
431                },
432                extension: ".db",
433            },
434            Self::CircleEpochCloseIntent => ProtocolObjectMetadata {
435                aad_label: b"circle-epoch-close-intent",
436                path: ProtocolPathRule::Exact(&[ExactPathShape {
437                    component_count: 6,
438                    fixed_components: &[(0, "circles"), (2, "epoch-close"), (4, "intent")],
439                }]),
440                extension: ".json",
441            },
442            Self::CircleEpochCloseOutcome => ProtocolObjectMetadata {
443                aad_label: b"circle-epoch-close-outcome",
444                path: ProtocolPathRule::Exact(&[ExactPathShape {
445                    component_count: 5,
446                    fixed_components: &[(0, "circles"), (2, "epoch-close"), (4, "outcome")],
447                }]),
448                extension: ".json",
449            },
450            Self::CircleEpochCloseResponse => ProtocolObjectMetadata {
451                aad_label: b"circle-epoch-close-response",
452                path: ProtocolPathRule::Exact(&[ExactPathShape {
453                    component_count: 6,
454                    fixed_components: &[(0, "circles"), (2, "epoch-close"), (4, "responses")],
455                }]),
456                extension: ".json",
457            },
458            Self::CircleAccessLeaf => ProtocolObjectMetadata {
459                aad_label: b"circle-access-leaf",
460                path: ProtocolPathRule::CircleCandidate {
461                    kind: "access-leaves",
462                    component_count: 9,
463                },
464                extension: "",
465            },
466            Self::CircleAccessEnvelope => ProtocolObjectMetadata {
467                aad_label: b"circle-access-envelope",
468                path: ProtocolPathRule::CircleCandidate {
469                    kind: "access-envelopes",
470                    component_count: 8,
471                },
472                extension: ".json",
473            },
474            Self::CircleAcknowledgement => ProtocolObjectMetadata {
475                aad_label: b"circle-acknowledgement",
476                path: ProtocolPathRule::Exact(&[ExactPathShape {
477                    component_count: 5,
478                    fixed_components: &[(0, "circles"), (2, "acks")],
479                }]),
480                extension: ".json",
481            },
482            Self::CircleSnapshotMeta => ProtocolObjectMetadata {
483                aad_label: b"circle-snapshot-meta",
484                path: ProtocolPathRule::Exact(&[ExactPathShape {
485                    component_count: 5,
486                    fixed_components: &[(0, "circles"), (2, "snapshots")],
487                }]),
488                extension: ".json",
489            },
490            Self::CircleSnapshotImage => ProtocolObjectMetadata {
491                aad_label: b"circle-snapshot-image",
492                path: ProtocolPathRule::Exact(&[ExactPathShape {
493                    component_count: 5,
494                    fixed_components: &[(0, "circles"), (2, "snapshot-images")],
495                }]),
496                extension: ".db",
497            },
498        }
499    }
500
501    pub fn aad_label(self) -> &'static [u8] {
502        self.metadata().aad_label
503    }
504
505    pub fn extension(self) -> &'static str {
506        self.metadata().extension
507    }
508}
509
510/// A domain protected by the Store key.
511#[derive(Clone, Copy, Debug, PartialEq, Eq)]
512pub struct StoreEncryptedProtocolObjectDomain(pub(super) ProtectedObjectDomain);
513
514/// A signed Store control-plane domain whose bytes must remain readable before
515/// the reader has adopted the Store data key named by those bytes.
516#[derive(Clone, Copy, Debug, PartialEq, Eq)]
517pub struct SignedStoreProtocolObjectDomain(pub(super) ProtectedObjectDomain);
518
519/// A domain protected by a Circle epoch key.
520#[derive(Clone, Copy, Debug, PartialEq, Eq)]
521pub struct CircleProtocolObjectDomain(pub(super) ProtectedObjectDomain);
522
523/// A domain whose canonical bytes already carry recipient-specific encryption.
524#[derive(Clone, Copy, Debug, PartialEq, Eq)]
525pub struct RecipientSealedProtocolObjectDomain(pub(super) ProtectedObjectDomain);
526
527/// Typed protocol-object domain names. Each name's value carries the only
528/// protection class its object kind permits.
529pub struct ProtocolObjectDomain;
530
531#[allow(non_upper_case_globals)]
532impl ProtocolObjectDomain {
533    pub const StoreProtocolRoot: SignedStoreProtocolObjectDomain =
534        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreProtocolRoot);
535    pub const StoreCurrentPublication: SignedStoreProtocolObjectDomain =
536        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreCurrentPublication);
537    pub const StorePublicationEntry: SignedStoreProtocolObjectDomain =
538        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StorePublicationEntry);
539    pub const StoreCommit: SignedStoreProtocolObjectDomain =
540        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreCommit);
541    pub const StoreHead: SignedStoreProtocolObjectDomain =
542        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreHead);
543    pub const StoreAck: SignedStoreProtocolObjectDomain =
544        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreAck);
545    pub const StoreDeviceRegistration: SignedStoreProtocolObjectDomain =
546        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreDeviceRegistration);
547    pub const DeviceJoinAbandonment: SignedStoreProtocolObjectDomain =
548        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::DeviceJoinAbandonment);
549    pub const DeviceJoinCleanupReceipt: SignedStoreProtocolObjectDomain =
550        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::DeviceJoinCleanupReceipt);
551    /// Device-join artifacts in transit. The bytes carry their own per-attempt
552    /// seal, so the storage layer stores them as it received them.
553    pub const DeviceJoinTransport: RecipientSealedProtocolObjectDomain =
554        RecipientSealedProtocolObjectDomain(ProtectedObjectDomain::DeviceJoinTransport);
555    pub const StoreDeviceExclusionProposal: SignedStoreProtocolObjectDomain =
556        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreDeviceExclusionProposal);
557    pub const StoreDeviceExclusionOutcome: SignedStoreProtocolObjectDomain =
558        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreDeviceExclusionOutcome);
559    pub const StoreReclaimEvidence: StoreEncryptedProtocolObjectDomain =
560        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::StoreReclaimEvidence);
561    pub const StoreReclaimAuthorization: SignedStoreProtocolObjectDomain =
562        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreReclaimAuthorization);
563    pub const StoreReclaimReceipt: SignedStoreProtocolObjectDomain =
564        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreReclaimReceipt);
565    pub const ProviderAccessGrant: SignedStoreProtocolObjectDomain =
566        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::ProviderAccessGrant);
567    pub const OwnerRecoveryNode: SignedStoreProtocolObjectDomain =
568        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::OwnerRecoveryNode);
569    pub const StoreSnapshotMeta: SignedStoreProtocolObjectDomain =
570        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreSnapshotMeta);
571    pub const StoreSnapshotImage: StoreEncryptedProtocolObjectDomain =
572        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::StoreSnapshotImage);
573    pub const StoreMembershipRollup: SignedStoreProtocolObjectDomain =
574        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreMembershipRollup);
575    pub const StoreMembershipEntry: SignedStoreProtocolObjectDomain =
576        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreMembershipEntry);
577    pub const StoreMembershipHead: SignedStoreProtocolObjectDomain =
578        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreMembershipHead);
579    pub const StoreMembershipResolution: SignedStoreProtocolObjectDomain =
580        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreMembershipResolution);
581    pub const StoreWrappedKey: RecipientSealedProtocolObjectDomain =
582        RecipientSealedProtocolObjectDomain(ProtectedObjectDomain::StoreWrappedKey);
583    pub const CircleAccessLeaf: RecipientSealedProtocolObjectDomain =
584        RecipientSealedProtocolObjectDomain(ProtectedObjectDomain::CircleAccessLeaf);
585    pub const StorePackage: StoreEncryptedProtocolObjectDomain =
586        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::StorePackage);
587    pub const CircleControl: StoreEncryptedProtocolObjectDomain =
588        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::CircleControl);
589    pub const CircleAccessEnvelope: StoreEncryptedProtocolObjectDomain =
590        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::CircleAccessEnvelope);
591    pub const CircleRoster: CircleProtocolObjectDomain =
592        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleRoster);
593    pub const CircleRosterResolution: CircleProtocolObjectDomain =
594        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleRosterResolution);
595    pub const CircleMetadata: CircleProtocolObjectDomain =
596        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleMetadata);
597    pub const CirclePackage: CircleProtocolObjectDomain =
598        CircleProtocolObjectDomain(ProtectedObjectDomain::CirclePackage);
599    pub const CircleBootstrapImage: CircleProtocolObjectDomain =
600        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleBootstrapImage);
601    pub const CircleEpochCloseIntent: CircleProtocolObjectDomain =
602        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleEpochCloseIntent);
603    pub const CircleEpochCloseOutcome: StoreEncryptedProtocolObjectDomain =
604        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::CircleEpochCloseOutcome);
605    pub const CircleEpochCloseResponse: StoreEncryptedProtocolObjectDomain =
606        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::CircleEpochCloseResponse);
607    pub const CircleAcknowledgement: CircleProtocolObjectDomain =
608        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleAcknowledgement);
609    pub const CircleSnapshotMeta: CircleProtocolObjectDomain =
610        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleSnapshotMeta);
611    pub const CircleSnapshotImage: CircleProtocolObjectDomain =
612        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleSnapshotImage);
613}