You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bytewords SSKR shares with legacy CBOR tag 309 (crypto-sskr) are rejected; only 40309 is accepted #12
seedtool --in sskr rejects standard Bytewords SSKR shares that use the legacy CBOR tag 309 (SSKR_SHARE_V1, crypto-sskr), even though it accepts that legacy tag for URs. The only message is Error: Insufficient or invalid SSKR shares., which hides the real cause.
Generate 2-of-3 shares with sskr-tool split 2of3 1 (Bytewords, tag 309), or take the test vector from BCR-2020-011 and encode it with tag 309 (header d9 0135 55).
Put two of the shares in a file, one per line, and run seedtool --in sskr --out hex < shares.txt.
Actual result
Error: Insufficient or invalid SSKR shares. for all three pairs of shares.
Expected result
The shares are recovered, as they already are for ur:crypto-sskr shares (parse_ur(input, tags::TAG_SSKR_SHARE_V1, true)).
Analysis
In src/formats/sskr.rs, from_tagged_cbor_shares (the Bytewords path) calls try_into_expected_tagged_value(tags::TAG_SSKR_SHARE), which is tag 40309. There is no fallback to TAG_SSKR_SHARE_V1 (309) on this path.
BCR-2020-011 says version 2 sskr "differs from version 1 crypto-sskr only in the CBOR tag and UR type" and that version 1 "may still be supported for backwards compatibility".
I changed only the tag bytes of the shares and recomputed the Bytewords CRC. After that, seedtool recovers shares generated by sskr-tool for 2-of-3, 3-of-5 and two-group configurations. In the other direction, sskr-tool recovers seedtool shares once their tag is rewritten to 309. So the secret sharing, metadata and Bytewords layers are compatible. The tag is the only difference.
The BCR-2020-011 test vector is recovered by seedtool with tag 40309 and rejected with tag 309.
parse_bytewords uses filter_map(... .ok()) on the decoded lines. A line that fails to decode is silently dropped, so all failure causes end in the same generic message.
Suggested changes
In the Bytewords input path, also accept tag 309, as is already done for URs.
Add a test that recovers the BCR-2020-011 vector from Bytewords shares encoded with tag 309.
Optionally, report which line failed (invalid word, bad CRC, wrong tag) instead of the generic message.
For people who land here with shares from sskr-tool 0.1.2: a small workaround exists while the tag
difference stands.
sskr-retag rewrites the CBOR tag of standard Bytewords shares
from 309 to 40309 and recomputes the CRC, so they can be passed to seedtool --in sskr. It is a single
Python file with no dependencies. I tested it in both directions with synthetic data only.
To be clear, I am not asking seedtool-cli to write the deprecated tag. The question from the issue still
stands: would you consider reading tag 309 as a fallback for Bytewords input, with a deprecation warning?
If not, the workaround above is enough for my case and this can stay as documentation.
Activity
rimneo commentedon Nov 11, 2026
For people who land here with shares from
sskr-tool0.1.2: a small workaround exists while the tagdifference stands.
sskr-retag rewrites the CBOR tag of standard Bytewords shares
from 309 to 40309 and recomputes the CRC, so they can be passed to
seedtool --in sskr. It is a singlePython file with no dependencies. I tested it in both directions with synthetic data only.
To be clear, I am not asking seedtool-cli to write the deprecated tag. The question from the issue still
stands: would you consider reading tag 309 as a fallback for Bytewords input, with a deprecation warning?
If not, the workaround above is enough for my case and this can stay as documentation.