Shamir backup

Description

BACKUP > BUNDLE > SHAMIR creates an encrypted bundle and splits the generated bundle secret into shares. Use it when the backup must be recoverable only with several custodians present.

Shamir share values are secret material. Do not paste share values into the operation report, ticketing system, or chat.

Protection parameters

The default values below come from the appliance backup and restore configuration.

The default 5 shares / 3 threshold model is suitable for many ceremonies, but the final values must follow the approved custody policy for the operation.

Parameter Default Purpose

Share count

5

Total number of share files generated for the backup. The appliance accepts a value from 2 to 10.

Restore threshold

3

Minimum number of shares required to reconstruct the bundle secret during restore. The threshold must be at least 2 and cannot exceed the share count.

Secret size

32 bytes

Random secret generated by the appliance with openssl rand. The secret protects only the backup bundle and is not reused as a Stream password.

Archive cipher

aes-256-cbc

OpenSSL encryption cipher used for the secure .enc bundle.

Key derivation

PBKDF2 with sha256

Key derivation settings used when encrypting and decrypting the secure bundle.

Iterations

250000

PBKDF2 iteration count used for secure bundle encryption. The appliance rejects values below 10000.

Metadata authentication

HMAC-SHA256

Detached .metadata.json.hmac file created from the bundle metadata and the generated secret. The HMAC is required for protected bundles.

Restore staging

/tmp/offline-ca-restore-staging

Temporary local staging area used before restore material is applied to the runtime.

Optional password per share

After choosing the share storage mode, the operator can choose whether each share file receives its own password.

  • No password: preserves the existing Shamir share format and the existing 0600 file permissions.

  • One different password per share: prompts for and confirms a password for share 1, share 2, and so on. Empty passwords and duplicate passwords are refused.

The password protects the share file, not the reconstructed bundle secret. The password values are never written in clear text to the metadata, HMAC sidecar, logs, or the Recovery Kit. Record each share filename and its password in the approved offline custody procedure. The protected files retain their .txt names but contain an encrypted base64 envelope. For each protected share, the metadata stores password_kdf, a random password_salt, password_cost, and the derived password_verifier, in addition to the protection flag, non-secret OpenSSL parameters, encrypted-file hash, and expected decrypted-content hash.

Integrity model

Item Control

Generated bundle secret

The appliance generates a random secret for the bundle, encrypts the internal bundle, then splits that secret into Shamir shares. The secret protects the backup bundle only and is not reused as a Stream password.

Plaintext staging

The appliance creates the internal plaintext bundle only as an intermediate file. After the secure bundle is generated, plaintext source payloads selected for the secure bundle are removed from the backup staging area.

Metadata

The metadata records:

  • Encrypted archive hash

  • Plaintext bundle hash

  • Payload hashes

  • Cipher

  • Digest

  • PBKDF2 iteration count

  • Share count

  • Threshold

  • Share manifest

  • Per-share password KDF, salt, cost, and verifier when password protection is enabled

  • Metadata format version

Metadata HMAC

The detached HMAC sidecar authenticates the metadata with the generated bundle secret. Restore fails for protected bundles when this authentication cannot be verified.

Share manifest

Each generated share is listed in metadata with:

  • Filename

  • SHA-256 hash

  • Size

  • For password-protected shares, the expected decrypted-content SHA-256 and size

  • For password-protected shares, password_kdf, password_salt, password_cost, and password_verifier

The manifest must contain unique share filenames and unique share hashes.

Procedure file

The recovery kit is generated as the operator procedure file for the backup set. It records:

  • File roles

  • File sizes

  • SHA-256 hashes

  • Versions

  • Restore workflow

It does not store secret values.

Backup workflow

  1. Select the Shamir mode. Open BACKUP > BUNDLE > SHAMIR.

  2. Configure shares. Confirm the total number of shares to generate. The default is 5.

    Shamir total share count input
  3. Confirm the minimum number of shares required for restore. The default is 3.

    Shamir restore threshold input
  4. Choose the share storage mode. Select USB to export each share to a different USB key, or BUNDLE to keep share files in the bundle directory for later manual custody handling.

    Shamir share storage mode selection
  5. Choose whether to protect each share with a password. Select no password to keep the existing share format, or select the per-share password mode. In the latter mode, enter and confirm a different password for each share. The passwords are not displayed again and are not included in the Recovery Kit. Only their per-share verifier parameters are stored in metadata; a lost password cannot be recovered from the verifier.

  6. Validate runtime prerequisites. The appliance verifies the Shamir configuration: share count is numeric and between 2 and 10, threshold is numeric and between 2 and the share count, secret size is at least 16 bytes, and PBKDF2 iterations are at least 10000.

  7. The appliance checks that both secret-share-split and secret-share-combine are available.

  8. Generate the backup material. The appliance creates the Stream backup payload with configuration and database material.

  9. The appliance stages the current runtime license when one is present and readable.

  10. The appliance stages selected backup payload files and generated recovery artifacts when available.

  11. The appliance creates a plaintext internal bundle and records its SHA-256 hash.

  12. The appliance generates a random bundle secret.

  13. The appliance encrypts the internal bundle into a secure .enc archive.

  14. The appliance splits the generated secret into share files named like backup-bundle-<timestamp>.share-XX-of-YY.txt.

  15. The appliance writes bundle metadata with archive hash, plaintext hash, payload entries, Shamir share manifest, cipher, digest, PBKDF2 iteration count, share count, threshold, and the per-share password verifier parameters when enabled.

  16. The appliance writes the detached metadata HMAC sidecar.

  17. Export custody material. The appliance exports or stores the share files according to the selected storage mode. When USB share storage is selected, each share can be copied to controlled removable media as part of the custody workflow.

    Shamir share USB mount prompt
  18. The appliance generates a recovery kit when bundle outputs are available.

  19. Move the generated .enc, .metadata.json, .metadata.json.hmac, recovery kit, and share files to approved custody.

  20. Record file names, media labels, SHA-256 hashes, share count, threshold, storage mode, and custodian assignment.

The completion confirmation is the operator checkpoint before leaving the backup flow.

Shamir backup bundle completion confirmation

For a Shamir-protected bundle, the USB move prompt can include the encrypted archive, metadata, HMAC sidecar, recovery kit, and share files.

Shamir backup files USB move prompt

Generated outputs

The expected file set uses the following pattern:

backup-bundle-<timestamp>.enc
backup-bundle-<timestamp>.metadata.json
backup-bundle-<timestamp>.metadata.json.hmac
backup-bundle-<timestamp>.share-XX-of-YY.txt
Output Description Custody note

backup-bundle-<timestamp>.enc

Encrypted secure backup bundle.

Store with the backup set. It cannot be decrypted without the threshold number of shares.

backup-bundle-<timestamp>.metadata.json

Restore metadata containing:

  • Archive hash

  • Payload hashes

  • Encryption settings

  • Share manifest

Store with the encrypted bundle and verify the filename in the recovery kit.

backup-bundle-<timestamp>.metadata.json.hmac

Detached HMAC over the metadata.

Store with the metadata. Restore fails authentication if the HMAC does not match the reconstructed secret.

backup-bundle-<timestamp>.share-XX-of-YY.txt

Share generated by secret-share-split. It is plaintext only when the operator selected no share password; otherwise it is an encrypted base64 envelope.

Assign each share and its associated password, when enabled, to an approved custodian. Do not paste share values or passwords into reports.

Recovery kit

Printable record and restore guidance generated for the backup.

Store with the ceremony record. It must describe file roles and hashes without containing secrets.