Skip to content

Read FROST shares stored before group subkeys - #1003

Merged
kwsantiago merged 1 commit into
mainfrom
read-older-shares
Oct 6, 2026
Merged

kwsantiago merged 1 commit into
mainfrom
read-older-shares

Conversation

@kwsantiago

Copy link
Copy Markdown
Contributor

FROST shares stored by any earlier release could not be read: keep frost list and every command that loads a share failed with Serialization error: tag for enum is not valid. #963 added group_subkey_secret to ShareMetadata, which is stored with bincode inside the KSH1 v1 blob. bincode is positional, so #[serde(default)] cannot supply the missing field, and older blobs were read with the bytes after did_backup shifted.

  • New writes use format version 2, the current layout.
  • v1 and unprefixed blobs are read through a frozen copy of the pre-change ShareMetadata, with no subkey.
  • The legacy-blob tests built their "old" blobs from the current struct, which is why they passed; they now use the frozen layout. New tests cover a v1 blob (every metadata field and the ciphersuite carried over) and a subkey round trip in the current layout. The v1 test fails with the old decoding.

Checked with the released binaries: vaults written by v0.7.5 and v0.9.2 fail to list their shares on main, and with this change list them, sign with them, and the signatures verify. KeyRecord, SecretRecord, ThresholdSeal and StoredShare itself are unchanged since v0.9.2, and the other vault records are JSON.

Shares written by this version are v2, which earlier releases cannot read.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4df293a0-bb84-4c14-8627-a147a01310ed
📥 Commits

Reviewing files that changed from the base of the PR and between f72c8b1 and fd6b5e9.

📒 Files selected for processing (1)
  • keep-core/src/storage.rs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kwsantiago
kwsantiago merged commit e387240 into main Oct 6, 2026
12 checks passed
@kwsantiago
kwsantiago deleted the read-older-shares branch October 6, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant