Skip to content

Commit aefc024

Browse files
committed
refactor: re-gen protos
Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent 6f0b270 commit aefc024

File tree

110 files changed

+3734
-288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+3734
-288
lines changed

.protoc-manifest.json

Lines changed: 105 additions & 233 deletions
Large diffs are not rendered by default.

cli/envelope.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ func (a *EnvelopeArgs) BuildCommands() []*cli.Command {
7777
Flags: a.BuildFlags(),
7878
},
7979
{
80-
Name: "unseal",
81-
Usage: "unseal an envelope using the given private keys",
80+
Name: "unseal",
81+
Usage: "unseal an envelope using the given private keys",
8282
Action: a.RunUnseal,
8383
Flags: append(a.BuildFlags(), &cli.BoolFlag{
8484
Name: "info",
@@ -99,7 +99,7 @@ func (a *EnvelopeArgs) readInput() ([]byte, error) {
9999
// writeOutput writes output to the specified path or stdout.
100100
func (a *EnvelopeArgs) writeOutput(data []byte) error {
101101
if a.OutputPath != "" {
102-
return os.WriteFile(a.OutputPath, data, 0600)
102+
return os.WriteFile(a.OutputPath, data, 0o600)
103103
}
104104
_, err := os.Stdout.Write(data)
105105
return err

daemon/api/api.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

daemon/api/api.pb.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// @generated
2+
// This file is @generated by prost-build.
3+
/// Config configures the API.
4+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5+
pub struct Config {
6+
/// BusConfig configures the bus api.
7+
#[prost(message, optional, tag="1")]
8+
pub bus_config: ::core::option::Option<super::super::bus::api::Config>,
9+
}
10+
// @@protoc_insertion_point(module)

daemon/api/controller/controller.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// @generated
2+
// This file is @generated by prost-build.
3+
/// Config configures the API.
4+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5+
pub struct Config {
6+
/// ListenAddr is the address to listen on for connections.
7+
#[prost(string, tag="1")]
8+
pub listen_addr: ::prost::alloc::string::String,
9+
/// ApiConfig are api config options.
10+
#[prost(message, optional, tag="2")]
11+
pub api_config: ::core::option::Option<super::Config>,
12+
/// DisableBusApi disables the bus api.
13+
#[prost(bool, tag="3")]
14+
pub disable_bus_api: bool,
15+
/// BusApiConfig are controller-bus bus api config options.
16+
/// BusApiConfig are options for controller bus api.
17+
#[prost(message, optional, tag="4")]
18+
pub bus_api_config: ::core::option::Option<super::super::super::bus::api::Config>,
19+
}
20+
// @@protoc_insertion_point(module)

entitygraph/config.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

entitygraph/config.pb.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// @generated
2+
// This file is @generated by prost-build.
3+
/// Config is the config object for the entitygraph repoter.
4+
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5+
pub struct Config {
6+
}
7+
// @@protoc_insertion_point(module)

envelope/envelope.pb.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

envelope/envelope.pb.rs

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
// @generated
2+
// This file is @generated by prost-build.
3+
/// Envelope contains an encrypted message unlockable via secret sharing.
4+
///
5+
/// The message is encrypted with a key derived from a Ristretto255 scalar.
6+
/// The scalar is split into shares distributed across Grants.
7+
/// At least threshold+1 shares are needed to reconstruct the scalar.
8+
#[derive(Clone, PartialEq, ::prost::Message)]
9+
pub struct Envelope {
10+
/// EnvelopeId is the unique identifier of the envelope.
11+
/// If empty when building, generated from hash of secret + context.
12+
#[prost(string, tag="1")]
13+
pub envelope_id: ::prost::alloc::string::String,
14+
/// ContextHash is the BLAKE3 hash of the context string.
15+
/// Used to verify the envelope matches the expected application context.
16+
#[prost(bytes="vec", tag="2")]
17+
pub context_hash: ::prost::alloc::vec::Vec<u8>,
18+
/// Threshold is the CIRCL threshold parameter.
19+
/// Recovery requires threshold+1 shares.
20+
/// If zero, any single share suffices (no secret splitting).
21+
#[prost(uint32, tag="3")]
22+
pub threshold: u32,
23+
/// Ciphertext is the encrypted payload.
24+
/// Encrypted with XChaCha20-Poly1305 using a key derived from the scalar.
25+
#[prost(bytes="vec", tag="4")]
26+
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
27+
/// Grants is the list of encrypted share bundles.
28+
#[prost(message, repeated, tag="5")]
29+
pub grants: ::prost::alloc::vec::Vec<EnvelopeGrant>,
30+
/// Keypairs is the list of public keys used to encrypt grants.
31+
#[prost(message, repeated, tag="6")]
32+
pub keypairs: ::prost::alloc::vec::Vec<EnvelopeKeypair>,
33+
/// Contents is an optional plaintext description of what the envelope contains.
34+
/// Application-specific; not used in the unlock process.
35+
#[prost(bytes="vec", tag="7")]
36+
pub contents: ::prost::alloc::vec::Vec<u8>,
37+
}
38+
/// EnvelopeGrant is an encrypted bundle of shares.
39+
/// The grant ciphertext contains a marshaled EnvelopeGrantInner.
40+
/// Encrypted to one or more keypairs in the Envelope keypairs list.
41+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
42+
pub struct EnvelopeGrant {
43+
/// KeypairIndexes lists which keypairs can decrypt this grant.
44+
/// Each value is an index into the Envelope.keypairs list.
45+
#[prost(uint32, repeated, tag="1")]
46+
pub keypair_indexes: ::prost::alloc::vec::Vec<u32>,
47+
/// Ciphertexts contains the encrypted EnvelopeGrantInner.
48+
/// One ciphertext per keypair index, in the same order.
49+
/// Each encrypted with peer.EncryptToPubKey to the corresponding keypair.
50+
#[prost(bytes="vec", repeated, tag="2")]
51+
pub ciphertexts: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
52+
}
53+
/// EnvelopeGrantInner is the decrypted contents of a grant.
54+
#[derive(Clone, PartialEq, ::prost::Message)]
55+
pub struct EnvelopeGrantInner {
56+
/// Shares is the list of Shamir shares in this grant.
57+
#[prost(message, repeated, tag="1")]
58+
pub shares: ::prost::alloc::vec::Vec<EnvelopeShare>,
59+
}
60+
/// EnvelopeShare is a single Shamir share (Ristretto255 scalar pair).
61+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
62+
pub struct EnvelopeShare {
63+
/// Id is the share identifier (marshaled Ristretto255 scalar, 32 bytes).
64+
#[prost(bytes="vec", tag="1")]
65+
pub id: ::prost::alloc::vec::Vec<u8>,
66+
/// Value is the share value (marshaled Ristretto255 scalar, 32 bytes).
67+
#[prost(bytes="vec", tag="2")]
68+
pub value: ::prost::alloc::vec::Vec<u8>,
69+
}
70+
/// EnvelopeKeypair is a public key entry in the envelope.
71+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
72+
pub struct EnvelopeKeypair {
73+
/// PubKey is the marshaled public key in PEM format (via bifrost/keypem).
74+
#[prost(bytes="vec", tag="1")]
75+
pub pub_key: ::prost::alloc::vec::Vec<u8>,
76+
/// AuthMethodId is an optional identifier for the auth method.
77+
/// Application-specific hint for how to derive the private key.
78+
#[prost(string, tag="2")]
79+
pub auth_method_id: ::prost::alloc::string::String,
80+
/// AuthMethodParams is optional parameters for the auth method.
81+
#[prost(bytes="vec", tag="3")]
82+
pub auth_method_params: ::prost::alloc::vec::Vec<u8>,
83+
}
84+
/// EnvelopeConfig is the configuration for building an envelope.
85+
#[derive(Clone, PartialEq, ::prost::Message)]
86+
pub struct EnvelopeConfig {
87+
/// EnvelopeId is the unique identifier. If empty, auto-generated.
88+
#[prost(string, tag="1")]
89+
pub envelope_id: ::prost::alloc::string::String,
90+
/// Threshold is the CIRCL threshold parameter (need threshold+1 shares).
91+
/// If zero, any single share suffices.
92+
#[prost(uint32, tag="2")]
93+
pub threshold: u32,
94+
/// TotalShares is the total number of shares to create.
95+
/// If zero, defaults to sum of shares across all grant configs.
96+
#[prost(uint32, tag="3")]
97+
pub total_shares: u32,
98+
/// GrantConfigs defines how shares are distributed across grants.
99+
#[prost(message, repeated, tag="4")]
100+
pub grant_configs: ::prost::alloc::vec::Vec<EnvelopeGrantConfig>,
101+
}
102+
/// EnvelopeGrantConfig configures a single grant in the envelope.
103+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
104+
pub struct EnvelopeGrantConfig {
105+
/// ShareCount is the number of shares to include in this grant.
106+
/// If zero, defaults to 1.
107+
#[prost(uint32, tag="1")]
108+
pub share_count: u32,
109+
/// KeypairIndexes lists which keypairs can decrypt this grant.
110+
/// Indexes into the keypairs list provided to BuildEnvelope.
111+
#[prost(uint32, repeated, tag="2")]
112+
pub keypair_indexes: ::prost::alloc::vec::Vec<u32>,
113+
}
114+
/// EnvelopeUnlockResult is the result of attempting to unlock an envelope.
115+
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
116+
pub struct EnvelopeUnlockResult {
117+
/// Success indicates whether the envelope was fully unlocked.
118+
#[prost(bool, tag="1")]
119+
pub success: bool,
120+
/// SharesAvailable is the number of shares recovered from grants.
121+
#[prost(uint32, tag="2")]
122+
pub shares_available: u32,
123+
/// SharesNeeded is the number of shares needed (threshold+1).
124+
#[prost(uint32, tag="3")]
125+
pub shares_needed: u32,
126+
/// UnlockedGrantIndexes lists which grants were successfully decrypted.
127+
#[prost(uint32, repeated, tag="4")]
128+
pub unlocked_grant_indexes: ::prost::alloc::vec::Vec<u32>,
129+
}
130+
// @@protoc_insertion_point(module)

0 commit comments

Comments
 (0)