Live data from Hacker News

Horcrux: Split your file into encrypted fragments

github.com

101–110 of 153 posts

Re: Horcrux: Split your file into encrypted fragments

#101
post #68

Since we're sharing implementations, here's mine: https://francoisbest.com/horcrux

And here's mine: https://github.com/sowbug/b39tools This is specifically for an SSSS-based distributed physical backup of a BIP-39 wallet seed and passphrase.

Not mine, but http://point-at-infinity.org/ssss/ is another good one, with Debian packages.

Re: Horcrux: Split your file into encrypted fragments

#102
post #27
post #19

> Q) This isn't really in line with how horcruxes work in the harry potter universe! > A) It's pretty close! You can't allow any one horcrux to be used to resurrect the original file (and why would you that would be useless) but you can allow two horcruxes to do it (so only off by one). Checkmate HP fans. Well the whole point of hurcruxes is to have backup in several places. This tool to backup your backups in severa…

Yes, but no! Technically, horcruxes were backups, but the emotional weight of the concept came from splitting your soul, lessening your essence as you hedge against danger. Partial backups follow the spirit of the idea better. As an aside, I read the concept as an attack on promiscuity. "Whore crux". Contrast to Lord of the Rings' assault on marriage, where wearing the ring makes you invisible and slowly fade into no…

> Contrast to Lord of the Rings' assault on marriage, where wearing the ring makes you invisible and slowly fade into nothingness, "like butter being scraped over too much bread".

That’s an interpretation I’ve never encountered before. That’s not a canonical interpretation.

Re: Horcrux: Split your file into encrypted fragments

#103
post #36

I can think of several ways to "take a password encrypted file and split it up in such a way that you can re-assemble it without all of its parts" but being able to do so without a password is where it's piqued my interest. This is one of those things that looks interesting to me as someone who enjoys security topics, algorithms and the like. I can see digging into the source code/reading about the techniques involve…

What about using it to share information with people for them to use in an emergency. Data is stored in multiple locations, but only someone with access to 3 of them would be able to read the data. The existing physical access controls would be the actual safety mechanism. A thief would have to break into 3 locations in order to get the data. We could just encrypt the data and then split the password into three piece…

Except that there are problems with the emergency scenario on both sides:

- In an actual urgent emergency, getting in touch with the 3 people and getting the data might be difficult and take days/weeks. One is on vacation, another is going to take a couple of days to try to remember where they stored the USB key...

- And nothing limits it to emergencies. The 3 people can just get together immediately and examine the valuable information inside, whether it's account numbers, crypto keys, a will, etc.

So the only value here is in not having to remember a separate password. But I expect it's just as likely for people to lose the files entirely as much as it is for them to lose passwords. If you share a password-encrypted file with 5 friends, I wouldn't be surprised if 10 years later, only 1 of them still had it. In that case, better to store file+password per-person, rather than require 3 of them to keep it.

Re: Horcrux: Split your file into encrypted fragments

#104
post #60

Earlier quoted context omitted.

Well, I think that's ostensible, as any reading of the author's biography can attest.

I couldn't disagree more. You can easily twist his letters to his son to create this narrative. If you read it as a whole his message isn't at all anti-marriage, he was a devout Christian who believed wholeheartedly in marriage. His message was that marriage takes sacrifice, faith, and a conscious effort (in his opinion specifically on the side of the man). It's a bit Kierkegaardian.

Yeah, I agree. There’s no way it was intended as a criticism of marriage.

Re: Horcrux: Split your file into encrypted fragments

#105
post #87

Earlier quoted context omitted.

Well, when it's put like that ^^. It's just that I never thought about it in that way, that outlook took me by surprise :). I read the Howard Carter biography more than 25 years ago and I don't remember much about that aspect, I was more geeking about lotr at that time than Tolkien's opinions.

Gollum is what really sells me on LotR being about marraige. He's a caricature of a woman hungry for commitment. I've seen the "gollum look" a few times in real life, and they captured it pretty damn accurately in the movies (more monstrous ofc)...

[dead]

Re: Horcrux: Split your file into encrypted fragments

#106
post #60

Earlier quoted context omitted.

Well, I think that's ostensible, as any reading of the author's biography can attest.

I couldn't disagree more. You can easily twist his letters to his son to create this narrative. If you read it as a whole his message isn't at all anti-marriage, he was a devout Christian who believed wholeheartedly in marriage. His message was that marriage takes sacrifice, faith, and a conscious effort (in his opinion specifically on the side of the man). It's a bit Kierkegaardian.

I think that might mean we agree. I guess I should have said I thought it ostensibly false.

Re: Horcrux: Split your file into encrypted fragments

#107
post #26

I was just thinking about something like this problem. At $work, we use multi-signature signing to move cryptocurrency around, so that at least N of M officers of the company need to sign, to prove that "the company" actually intends a movement of funds to happen. This ensures that no single officer can embezzle funds; and it also ensures that an attacker would have to do some kind of multi-target simultaneous coordi…

You don't need FHE to do this – what you're describing is generically a multi-party compute scheme that can be solved by other means.

Since you have familiarity with signatures, I'll plant the seed of how this particular MPC scheme works, in parts: Distributed Key Generation, and Circuit Creation and Execution

The first step is securely generating a key – but how do you know it was done correctly with SSS? SSS follows what is called a "trusted dealer" model, where you assume what generates the Shamir splits has operated correctly, but can we do better than that? Thankfully, yes! Feldman Verifiable Secret Sharing is an enhancement over SSS, where the splits generated are committed to by raising the coefficients of the SSS polynomial to a public generator of an additively-homomorphic group, or in other words, treating the coefficients like private keys, and producing the public keys (as in elliptic curve cryptography, the private key is just a large scalar number, the public key is produced by performing scalar multiplication of the private key against a known public point – the generator, part of the public parameters of a particular curve). By having the public points (A_0, A_1, ..., A_n) corresponding to the coefficients (a_0, a_1, ..., a_n, where a_0 = secret), you can calculate the secret's commitment by using x=0, as P(x)=A_nx^n+...+A_1x+A_0 where x=0 cancels out all terms besides the secret's commitment. Similarly, you can verify your share split by using x=(your share identifier), then raise your share to the same generator. And finally, to prove that all shares are valid, each person of course must verify their share matches their commitment, but then you can do Lagrange interpolation in the exponent (because the only operations you do over the commitments are multiplying by publicly available scalars (the share identifiers), and adding public points together) across any threshold combination of commitments, they should all resolve to P(0). That's FVSS in a nutshell.

But this still requires a trusted dealer! You have to trust that the dealer itself is not corrupted and exfiltrating secrets. How can we remove the trust component? By having all share holders perform FVSS – each party creates a random polynomial, samples shares accordingly, sends the shares (securely, of course) to each corresponding party, then everyone individually adds their provided (and self-sampled) polynomial samples. Because polynomials can be added together, you have effectively combined the random polynomials of all parties, without any one party knowing the real coefficients. Then verification involves each party raising their shares to a generator like in FVSS, and publishing their public commitments. The same Lagrange interpolation process is performed to verify all threshold combinations of public points resolve to the same public point – essentially confirming the secret was generated correctly without having to reveal the secret.

Now, to use the secret – execution. The technique for this is called Oblivious Transfer – it essentially leverages the same intractability problem of a given cryptosystem (discrete log for elliptic curves) to bootstrap a circuit garbling technique. There's many ways to do this, I'll explain the simplest form, for two parties:

Party 1 generates a public key, private key pair (a, A), and has two choices for messages (m_0, m_1), and sends A to Party 2.

Party 2 generates a private key (b), and a choice bit (c), and depending on c:

  c == 0: Party 2 generates B = b \* A

  c == 1: Party 2 generates B = b \* G + A, where G is the generator of the curve.
Party 2 sends B to Party 1

Party 1 calculates:

  e_0 = Hash(a \* B)

  e_1 = Hash(a \* (B - A))
Party 1 encrypts m_0 with e_0, m_1 with e_1, and sends both encrypted messages.

Party 2 calculates:

  e_c = Hash(b \* A)
Party 2 decrypts m_c with e_c.

Because Party 2 does not know a, they cannot calculate the encryption key for the message they did not choose, as the encryption keys calculated by Party 1 are contingent on an operation on B that cancels out the respective values produced when creating B from the choice, multiplied by the private scalar a.

Additionally, because Party 1 does not know b, they cannot determine which choice Party 2 actually made.

Now, for a simple choice between messages this seems silly, but this is actually sufficient to bootstrap a logical circuit – any computable circuit can be evaluated through this process of oblivious transfer. What does that give us? The ability to jointly compute operations over data required to be kept private by each side, such as an HMAC. Since HMACs are generally used in idempotent operations, generating the HMAC for a request using an OT circuit is sufficient to do what you're wanting.

For basic authentication, you'd need to extend the OT circuit evaluation all the way out to TLS frame construction itself, but is still possible.

NB: I am creating a decentralized network, Quilibrium, to make it easy to build and deploy applications that evaluate as OT circuits – MPC TLS is on the roadmap.

Re: Horcrux: Split your file into encrypted fragments

#108

There was a post about shamir secret sharing recently by levchin (and chaos that it caused at paypal): https://max.levch.in/post/724289457144070144/shamir-secret-s... This is 100% one of my favorite algorithms, but I have to say I've started to wonder if I just have an academic fascination with it and the practical use cases are more limited (limiting?) than I think

> I've started to wonder if I just have an academic fascination with it and the practical use cases are more limited (limiting?) than I think

I'm currently writing an entire book based on this concern: pmfpbook.org

Re: Horcrux: Split your file into encrypted fragments

#109

Does anyone know of a tool like this that’s maintained? I actually would like to use this for a fairly out there use case but it hasn’t been updated in 3 years and it doesn’t look like the author has even been active on GitHub since that time.

That was the problem for me too. There are many implementations of Shamir Secret Sharing out there, but they're all idiosyncratic and impossible to vet unless you have a background in cryptographic security, and like you said nearly all are not actively maintained. The types of things you would go to the trouble of Shamir Secret Sharing, are also the types of things that might surface decades later (e.g. crypto keys)…

The author of this tool basically took the Shamir code from Hashicorp Vault, which is pretty mainstream. If you're looking for a solid implementation, I would start there[0]. I wouldn't use the Shamir code from this repo, as it's an old version of the vault code using field arithmetic that doesn't run in constant time.

[0]: https://github.com/hashicorp/vault/blob/main/shamir/shamir.g...

Re: Horcrux: Split your file into encrypted fragments

#110
post #40

Earlier quoted context omitted.

To be fair, the creator of HP is a crazy conservative. So, the idea of "Whore crux" being an attempt of fighting promiscuity isn't surprising.

This is a ridiculous take, Rowling is basically a cookie cutter late-second wave feminist, exactly the kind of person you'd expect a liberal in the 80s to be. And since I assume you're inferring she's conservative from the popular opinion that she's anti-trans, if you read her political views, she supports transgender rights unequivocally but doesn't like what she perceives as MtF support encroaching on support syste…

There's also that one of her pen names was also the name of the guy who decided that gay conversion therapy didn't have enough electroshock involved.

https://en.wikipedia.org/wiki/Robert_Galbraith_Heath

Post reply on HN