After some poking around at the math, I do see that the 13 character generator (for regular sized shares) is reasonably "smooth", having roots at T{11}, S{16}, and C{24}. This means we could build a "quick check" worksheet to evaluate the string modulo (x - T) to verify a 5 bit checksum, whose operation would be similar to the existing checksum worksheet in structure but significantly less work. Perhaps 5 bits is too short, and it is more reasonable working modulo (x - T)*(x - S) to get a 10 bit checksum. A worksheet for a 15 bit checksum is also an option, and possibly others well depending on the size of the other factors. I think this process is would be about as simple as any other comparable hand operated checksum over the bech32 alphabet would be. I haven't looked into the smoothness of the long generator for seeds that are greater than 400 bits. If it isn't smooth and smoother options are available, perhaps it should be changed. On Wed, Feb 22, 2023 at 11:29 AM Peter Todd via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > On Sun, Feb 19, 2023 at 10:12:51PM +0000, Andrew Poelstra via bitcoin-dev > wrote: > > > What really did catch my attention, but which was kind of buried in the > > > project documentation, is the ability to verify the integrity of each > > > share independently without using a computer. For example, if I store > a > > > share with some relative who lives thousands of kilometers away, I'll > be > > > able to take that share out of its tamper-evident bag on my annual > > > holiday visit, verify that I can still read it accurately by validating > > > its checksum, and put it into a new bag for another year. For this > > > procedure, I don't need to bring copies of any of my other shares, > > > allowing them (and my seed) to stay safe. > > > > > > > This is good feedback. I strongly agree that this is the big selling > > point for this -- that you can vet shares/seeds which *aren't* being > > actively used, without exposing them to the sorts of threats associated > > with active use. > > > > We should make this more prominent in the BIP motivation. > > I don't think that use-case is a good selling point. The checksum that > Codex32 > uses is much more complex than necessary if you are simply verifying a > share by > itself. > > A *much* simpler approach would be to use a simple mod N = 0 checksum, > either > by creating the seed such that each share passes, or by just storing an > additional word/symbol with the seed in such a way that sum(words) mod N = > 0 > passes. This approach is not only possible to compute by hand with a > word/symbol->number lookup table, and pen and paper or a calculator. It's > so > simple they could probably *remember* how to do it themselves. > > > Secondly, if all shares have mod N checksums, it may be sufficient for > everyone > to write down the checksums of the *other* shares, to verify they are the > correct ones and a different (otherwise correct) share hasn't accidentally > been > substituted. > > Indeed, with some brute forcing and small checksums, I'd expect it to be > mathematically possible to generate Shamir's secret sharing shards such > that > every shard can share the *same* checksum. In which case the share > verification > procedure would be to simply ask every share holder to verify the checksum > manually using the mod N procedure, and then verify that each share holder > has > the same checksum. This would be less error prone in terms of leaking > information accidentally if the checksum was obviously *not* part of the > share: > eg by encoding the share with words, and the checksum with a number. > > Obviously, small checksums aren't fool proof. But we're probably better off > creating a relatively easy procedure with a 1-in-1000 chance of an error > going > undetected than a complex procedure that people don't actually do at all. > > -- > https://petertodd.org 'peter'[:-1]@petertodd.org > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev >