Skip to main content

Module shares

Module shares 

Source
Expand description

K-of-N codex32 Shamir share encoding (ms v0.2).

A secret (entr or mnem) splits into N shares, any K of which recombine to the original — using codex32’s native threshold(k)+index Shamir mechanism, NOT a payload byte (SPEC_ms_v0_2_kofn §1). The codex32 header threshold char is the share-vs-single discriminator; the prefix byte (0x00=entr / 0x02=mnem) remains the payload-KIND discriminator, recovered only on the secret-at-S after interpolation.

v0.1/mnem single-strings stay byte-identical: encode_shares(tag, ZERO, 1, &p) reduces to the exact package()/encode() construction (the Phase-0 gate).

Structs§

Threshold
A codex32 share threshold.

Functions§

combine_shares
Recombine k (or more) distributed shares of a K-of-N share-set into the original secret (Tag, Payload).
encode_shares
Split a secret (entr or mnem) into n codex32 K-of-N shares.