Better HN
topnewbestaskshowjobs
Log inSign up

Sjlver

5 karma · joined Dec 22, 2014 (11y ago) · 10 submissions

Writing software. Sometimes text too, at https://blog.purpureus.net.
Submissions

comment 2y ago · link · parent

For a start, it supports TypeScript. And it can install npm packages. And you get all the node.js APIs: for example, you can read/write files on the local hard drive.

comment 2y ago · link · parent

The tables are public knowledge. Memorizing them does not give you any extra security. It might hide the fact that you are using psst. This might make you less of a target for attacks (but probably has a very small or zero effect). It also increases the chance that your secret is lost, for example when your shares are accidentally thrown in the trash because they look like random pieces of paper.

For your other question: There is no weakness when using psst for long messages. That said, weaknesses can be introduced if you don't follow the protocol properly. For example, if you use the same dice throws for more than one psst instance, the system is no longer secure.

This page has further examples for things that could go wrong: https://github.com/Sjlver/psst/blob/main/docs/what-can-go-wr... It can give you a feeling for what kind of use is safe vs unsafe.

comment 2y ago · link · parent

Both versions of your code generate the same polynomials (i.e., rows of the table), but in a different order.

The order doesn't affect psst. This is why each page of the worksheet shows the polynomials in the order that's most convenient for the situation at hand.

The only place where the order matters is in choosing which dice throw is assigned to which polynomial. In psst, the dice throws correspond to share #1.

comment 2y ago · link · parent

Yes. The 25 rows of the table correspond to the 25 linear polynomials in GF(5), evaluated at x=0, 1, 2, 3, and 4.

GF(5) is the "field" that psst uses. It just means that all math is performed using only digits 0 to 4, and we take the remainder modulo 5 after each operation. A linear polynomial has the form `ax + b`. There are 25 of them because `a` and `b` can each take one of the five values.

For example, consider the polynomial `3x + 0`. If you evaluate it at x=0, the result is 0. At x=1, it's 3. At x=2, it's 6, which corresponds to 1 in GF(5). At x=3, the result is 4, and at x=4, the result is 2. These values (0 3 1 4 2) form the fourth line in the table above.

The table on the first page of the worksheet and the table on each share all have the same rows. They are just sorted differently, to make it easier to lookup a given row.

comment 2y ago · link · parent

Alas, psst can't help with that. With psst (or indeed any secret sharing scheme), there is a single secret which is only split while at rest. In order to actually make use of the secret, it needs to be recovered from the shares.

Your use-case would probably use other techniques, such as multi-signature schemes, multiparty computation, and zero knowledge proofs. Decentralized identity management is a difficult problem.

comment 2y ago · link · parent

Nice!

I like the idea of washers on a bolt. One could conceivably purchase five different sizes to make your idea compatible with psst. A similar idea also exists as a commercial product: https://jlopp.github.io/metal-bitcoin-storage-reviews/review...

At some point during the design of psst, I considered using GF(4) instead of GF(5). I chose GF(5) mainly because it supports up to four shares. It's also slightly more efficient to encode a-z text, and to obtain a random digit using a dice.

Good luck for the card-based encryption!

comment 2y ago · link · parent

Thanks for the link! I hadn't known about these projects. Superbacked and psst have a similar starting point, but end up being quite different:

Superbacked is a company selling you a backup service for small secrets. They offer a fair amount of features that are no doubt well thought through, albeit closed-source. As their user, you put some trust in the company, their product, and the expectation that they will still exist in a few years time, when you need to recover your secret.

Hyperbacked removes a few of these drawbacks by virtue of being open-source. It's easier (but not necessarily easy) to understand. It's probably easier to use than psst, although power users would want to set up an airgapped computer...

Psst, in contrast, is a humble open-source repo, giving you a PDF that you can fully understand and inspect, with no additional dependencies. I hope it's fun to use. It might even help some people with backing up secrets :)

comment 2y ago · link · parent

Very cool!

When designing psst, I considered implementing it as a self-contained website. The advantages would be (1) ease of use, and (2) more features.

In contrast, psst is a simpler design, so simple that the entire system fits on two pages of paper. I never quite managed to make a self-contained website that was small enough to understand/print/etc. Thus, psst is targeted towards people who want a system that they can fully understand and verify, whereas s4 is easier to use.

I was also worried that people might end up with enough shares, but no possibility to reconstruct them. With psst, shares are fully self-contained. A user with two shares has all they need to obtain the secret, plus typically some context that tells them what to do with the secret. With s4, this is a bit more tricky: imagine your heirs finding some papers with s4 shares; they would have to find the s4 website first. Maybe your domain name has since expired and they need to dig a copy out of archive.org...

Have you thought about ways to solve this? For example, it would be nice if s4 could generate zip files containing a share, and all the files needed to run the s4 decoder. (Assuming that zip, JavaScript, and WebAssembly are still easily usable in 2044.)

comment 2y ago · link · parent

One can use any finite field. GF(256) is popular, since it allows computers to split one byte at a time. Plus, there are many implementations of GF(256) operations, since the same field is also used in AES. In GF(256), the addition operation is indeed XOR, as you write.

If your field size is a prime number, the maths become simpler, since you can use "regular" integer addition and multiplication modulo the field size.

For psst, there is some information here about why we chose GF(5): https://github.com/Sjlver/psst/blob/main/docs/design-choices...

comment 11y ago · link · parent

This ranking uses a method called Borda Count (https://en.wikipedia.org/wiki/Borda_count). It can lead to quite arbitrary results, for a number of reasons. One example is that being 9th is three times better than being 11th, whereas being first is only marginally better (relatively spoken) than being third.

Better methods are readily available, for example Schulze's (https://en.wikipedia.org/wiki/Schulze_method). I wonder how much these rankings would change...