r/crypto•
lpsmith

Practical Threshold Cryptography

I'm familiar with Shamir Secret Sharing, but I'm more interested in what the cryptocurrency community calls Schnorr Signatures, which seems to be slightly different notion of the term than used in the cryptography community. I'm interested in both threshold decryption and threshold signatures, though I'm probably more immediately interested in threshold decryption.

Ideally, I want to generate a public key, indistinguishible from "normal" public keys, so that m-of-n private keyholders can choose to decrypt a message sent to that public key without ever reconstituting the private key in any one place. In my intended application, interactive protocols between the private keyholders are perfectly acceptable, almost expected.

Of course, a much more conservative approach would be to:

  1. generate a random password per message
  2. use age to encrypt the message, keyed to the password
  3. use Shamir Secret Sharing to split the password into pieces
  4. use age to encrypt the pieces, each keyed to a public key.

And honestly, this would probably almost work for me too.

This is an internal auditing system. i.e. there isn't going to be a huge amount of inertia between multiple parties if this system needs to be modified, at least not for a while.

  1. Message rates can be quite high.
  2. Messages themselves can be quite small.
  3. Most messages will never be decrypted.
  4. In most cases, I'm simply trying to do certain things more securely than current best practices, so in those cases doing something is more probably more important than absolute correctness
  5. In all cases, even in cases where this auditing system would introduce novel(-ish) risks that I'm more reliant on these techniques to mitigate, it's all in service to an attempt to do things more securely than commonly practiced today.

So, the age sketch of a solution has a few problems. Taken literally, any key stretching on the password KDF is both too expensive and unnecessary. I'd also worry about having to spawn n+1 (probably typically 4 to 6, possibly 2x that in some cases) age subprocesses per message. These are more easily fixed implementation details, and I could at least demo and limp along with that scheme for a bit. But more fundamentally, because messages can potentially be quite short, and in some cases it would be very undesirable to even consider "batching" these short messages into a larger cryptographic envelope, any additional per-message overhead is very costly in the long run (though possibly tolerable in the short run.) Also, I think that minimizing the utility of the metadata to an attacker is a very worthy goal, and my "ideal" threshold decryption would serve that goal better than the age sketch.

I know that (most) cryptocurrency communities tend to play relatively fast and loose with underlying cryptographic work, so I'm curious what people here would choose if they needed to stand something reasonable up, quickly, and what they might hope to move to in the longer run.

Posted Jul 8, 2021, 4:30 PM UTC · edited

1432
Loading comments…