Skip to content

recovery: enable clients to send encrypted recovery secrets#878

Merged
daniel-weisse merged 6 commits intomasterfrom
dw/encrypted-recovery
Nov 27, 2025
Merged

recovery: enable clients to send encrypted recovery secrets#878
daniel-weisse merged 6 commits intomasterfrom
dw/encrypted-recovery

Conversation

@daniel-weisse
Copy link
Copy Markdown
Member

@daniel-weisse daniel-weisse commented Nov 19, 2025

Clients may not want to bring the key material needed to decrypt the recovery secrets, or the recovery secrets themselves, onto machines exposed to the internet.
To enable a recovery workflow where the recovery secrets (or the needed key material) are kept on an airgapped machine, this PR adds a new endpoint to the Coordinator, allowing clients to retrieve an RSA public key generated by the Coordinator for the recovery workflow.
Clients can use this public key to encrypt their shares on the airgapped machine, transfer the encrypted share, and upload it to the Coordinator, where it is decrypted inside the SGX enclave.

Proposed changes

  • Add a new endpoint /api/v2/recover/public-key to retrieve a public key generated for the recovery
  • Add API functions to retrieve the Coordinator's public recovery key and encrypt your recovery secret (share)
  • Add CLI command to retrieve the Coordinator's public recovery key

Tests

@daniel-weisse daniel-weisse added the feature This change introduces new functionality label Nov 19, 2025
@netlify
Copy link
Copy Markdown

netlify bot commented Nov 19, 2025

Deploy Preview for marblerun-docs canceled.

Name Link
🔨 Latest commit 887a148
🔍 Latest deploy log https://app.netlify.com/projects/marblerun-docs/deploys/6928085ea63aff0009b88afa

// but the signature must always be generated over the plain recoverySecret.
//
// If this function is called from inside an EGo enclave, the "marblerun_ego_enclave" build tag must be set when building the binary.
func RecoverWithSignature(ctx context.Context, endpoint string, opts VerifyOptions, recoverySecret, recoverySecretSignature []byte) (remaining int, sgxQuote []byte, err error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to expose this as a cli command. And we need means to create the signature on the air-gapped machine.

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
@daniel-weisse daniel-weisse force-pushed the dw/encrypted-recovery branch 6 times, most recently from 63d41b6 to 7c13916 Compare November 26, 2025 12:45
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
@daniel-weisse daniel-weisse merged commit cafbc14 into master Nov 27, 2025
11 checks passed
@daniel-weisse daniel-weisse deleted the dw/encrypted-recovery branch November 27, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature This change introduces new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants