Skip to content

Commit ec57597

Browse files
authored
TQ: Encrypt all necessary prior rack secrets (#8601)
This is an update to the trust quorum protocol that no longer relies on tracking the last committed configuration. Instead it encrypts multiple rack secrets to allow upgrading past only one missed reconfiguration if a sled is offline. This is based off the TLA+ spec and what is written in RFD 238.
1 parent 464e168 commit ec57597

File tree

6 files changed

+319
-56
lines changed

6 files changed

+319
-56
lines changed

Cargo.lock

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

trust-quorum/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@ gfss.workspace = true
1717
hex.workspace = true
1818
hkdf.workspace = true
1919
iddqd.workspace = true
20+
omicron-uuid-kinds.workspace = true
2021
rand = { workspace = true, features = ["getrandom"] }
2122
secrecy.workspace = true
2223
serde.workspace = true
2324
serde_with.workspace = true
2425
sha3.workspace = true
2526
slog.workspace = true
2627
slog-error-chain.workspace = true
28+
static_assertions.workspace = true
2729
subtle.workspace = true
2830
thiserror.workspace = true
2931
tokio.workspace = true
3032
uuid.workspace = true
31-
omicron-uuid-kinds.workspace = true
3233
zeroize.workspace = true
3334
omicron-workspace-hack.workspace = true
3435

trust-quorum/src/configuration.rs

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
//! A configuration of a trust quroum at a given epoch
66
7-
use crate::crypto::{EncryptedRackSecret, RackSecret, Salt, Sha3_256Digest};
7+
use crate::crypto::{EncryptedRackSecrets, RackSecret, Sha3_256Digest};
88
use crate::validators::ValidatedReconfigureMsg;
99
use crate::{Epoch, PlatformId, Threshold};
1010
use gfss::shamir::{Share, SplitError};
@@ -47,8 +47,8 @@ pub struct Configuration {
4747
/// The number of sleds required to reconstruct the rack secret
4848
pub threshold: Threshold,
4949

50-
// There is no previous configuration for the initial configuration
51-
pub previous_configuration: Option<PreviousConfiguration>,
50+
// There are no encrypted rack secrets for the initial configuration
51+
pub encrypted_rack_secrets: Option<EncryptedRackSecrets>,
5252
}
5353

5454
impl IdOrdItem for Configuration {
@@ -105,34 +105,9 @@ impl Configuration {
105105
coordinator,
106106
members,
107107
threshold: reconfigure_msg.threshold(),
108-
previous_configuration: None,
108+
encrypted_rack_secrets: None,
109109
},
110110
shares,
111111
))
112112
}
113113
}
114-
115-
/// Information for the last committed configuration that is necessary to track
116-
/// in the next `Configuration`.
117-
#[derive(
118-
Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize,
119-
)]
120-
pub struct PreviousConfiguration {
121-
/// The epoch of the last committed configuration
122-
pub epoch: Epoch,
123-
124-
/// Is the previous configuration LRTQ?
125-
pub is_lrtq: bool,
126-
127-
/// The encrypted rack secret for the last committed epoch
128-
///
129-
/// This allows us to derive old encryption keys so they can be rotated
130-
pub encrypted_last_committed_rack_secret: EncryptedRackSecret,
131-
132-
/// A random value used to derive the key to encrypt the rack secret from
133-
/// the last committed epoch.
134-
///
135-
/// We only encrypt the rack secret once and so we use a nonce of all zeros.
136-
/// This is why there is no corresponding `nonce` field.
137-
pub encrypted_last_committed_rack_secret_salt: Salt,
138-
}

0 commit comments

Comments
 (0)