TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

I made an app that lets you split a file into horcruxes

243 pointsby jesseduffieldalmost 5 years ago

17 comments

sudhirjalmost 5 years ago
One related scheme is fountain codes, where you can split a file into a pseudo infinite stream of blocks such that finding N blocks will almost certainly allow reconstruction. Very useful in UDP &#x2F; satellite transmission, where you can keep broadcasting these blocks and clients can listen at their convenience.<p>The state of the art codec is RaptorQ, I’ve got a Go library that uses the slightly older Raptor standard to do chunking<p><a href="https:&#x2F;&#x2F;github.com&#x2F;sudhirj&#x2F;pump" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sudhirj&#x2F;pump</a>
评论 #24028601 未加载
评论 #24029494 未加载
评论 #24028653 未加载
widforssalmost 5 years ago
I was almost posting a snarky comment about how this is just Shamir&#x27;s Secret Sharing, which is in no way new.<p>But, hey, this is really cool. It was probably really fun to write, and luminates a cool scheme that too few know anything about.
评论 #24030912 未加载
k_szealmost 5 years ago
1. Write your will;<p>2. Split it into N + 1 horcruxes and distribute them to your N children; and a remaining piece to a lawyer;<p>3. Force them to all come together to decrypt the will for fairness.
评论 #24029497 未加载
评论 #24030954 未加载
评论 #24029499 未加载
评论 #24029646 未加载
tyingqalmost 5 years ago
Interesting. Feels like you could accomplish the same effect with regular encryption though.<p>Base64 encode the key, pad it with random data that matches the size of splitting into N-1 parts. Then split the encrypted file into N-1 b64 encoded parts. For lowish values of &#x27;N&#x27;, you could then just decrypt with each &quot;key&quot; until something readable emerges. The key size, algo, etc, could be prepended to each part in plaintext.<p>Or, if you want a variation where no parts are optional, a piece of the key in every split part, with a sufficiently long key.
评论 #24031120 未加载
评论 #24030878 未加载
nanomonkeyalmost 5 years ago
See also Dark Crystal[<a href="https:&#x2F;&#x2F;darkcrystal.pw" rel="nofollow">https:&#x2F;&#x2F;darkcrystal.pw</a>], which uses Shamir&#x27;s Secret Sharing to break your secret into &quot;shards&quot;, allowing you to also set a number of friends that are needed to recreate the secret (less than the total number of shards). Sharing is done over your social network (currently Briar and Secure Scuttlebutt).
nikeeealmost 5 years ago
There is also the CLI tool ssss that uses shamir secret sharing to split data:<p><a href="https:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;1&#x2F;ssss" rel="nofollow">https:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;1&#x2F;ssss</a>
评论 #24029325 未加载
hirundoalmost 5 years ago
&gt; Q) This isn&#x27;t really in line with how horcruxes work in the harry potter universe!<p>&gt; A) It&#x27;s pretty close! You can&#x27;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.<p>Not buying it, and the fact that this is the first FAQ is evidence that the author doesn&#x27;t really either. A better fit to Tom Riddle&#x27;s horcrux would simply be a lossy compression copy of the file. Which would admittedly be pretty useless, maybe unless the copy contains a lossy copy of your soul.<p>But then Virgin Galactic is also a pretty good name even though they haven&#x27;t yet left the solar system. That should be his defense: it&#x27;s just a cool name.
评论 #24030031 未加载
评论 #24030624 未加载
评论 #24029790 未加载
评论 #24029255 未加载
评论 #24030159 未加载
Tominoalmost 5 years ago
Very cool! I built something similar for patent application about 5 years ago for proximity image encryption. Idea was that image was split into X number of encrypted pieces each still being a valid image (disorted or something custom). If you wanted to see the image again, you had to be in close proximity to other parties that have these parts. BLE beacon served as the proximity for the prototype.
sneeuwpopsneeuwalmost 5 years ago
A friend of mine has made something like this for a blockchain hackathon once, around 2 years ago. The technics he used where relatively simple. It stats with some Elliptic-curve cryptography math to split up a single main key into multiple keys. Every person would than have a full copy of the encrypted files and when enough people combine there keys on the blockchain they would get the main key to decrypt the files and from then on it would be public that the files have been opened and by who.<p>This app seams to use Shamir&#x27;s Secret Sharing, this is something where I am not familiar with, but from how far I understand the Wikipedia article about it. it works roughly the same but it is more general.<p>I&#x27;m interested to see if people will actually use this. If anyone has some additional explanations about the differences between these algorithms then that would be very appreciated.
compsciphdalmost 5 years ago
what is the difference between reed solomon erasure codes and shamir secret sharing?<p>i.e. if I just split the secret into a number of reed solomon error correcting blocks (where n blocks are sufficient to recover the full data), is that fundamentally different?
评论 #24029149 未加载
评论 #24028828 未加载
Multicompalmost 5 years ago
so is this an alternative to multipar &#x2F; quickpar &#x2F; par2 from the usenet days?<p>Looks good. I always try to build redundancy into my offline backups, as if the given backup in my hand is the last backup that hasn&#x27;t been cooked &#x2F; melted &#x2F; flooded etc. ...because one day, it just might! Talking about worst-worst-case scenario, with triple redundancy of online-offsite (can be ransomwared), offline-onsite (can be flooded&#x2F;burned), and online-onsite (1st line of defense, ie syncthing or a nas)
评论 #24029998 未加载
verroqalmost 5 years ago
How efficient are these splits? If a 100mb file is split in 5, with 3 needed to recombine, we’d expect the pieces to be at least 333mb won’t we?
评论 #24030700 未加载
r0rshrkalmost 5 years ago
Dropbox does something similar for cold storage: <a href="https:&#x2F;&#x2F;dropbox.tech&#x2F;infrastructure&#x2F;how-we-optimized-magic-pocket-for-cold-storage" rel="nofollow">https:&#x2F;&#x2F;dropbox.tech&#x2F;infrastructure&#x2F;how-we-optimized-magic-p...</a>
postitalmost 5 years ago
I love when the universe throws my own ideas back at me but with a slightly better implementation<p>The backstory on this was me freaking out when I had a newborn coming and I wanted my legacy to be handed to him at the right age if something happened to me.
enimodasalmost 5 years ago
Recently similar: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23541949" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23541949</a>
bokwoonalmost 5 years ago
heh, you seem to have messed up the bracket order for the markdown links. I memorise it as the mnemonic &quot;square bracket&quot;: first the square [], then the bracket ().
评论 #24030982 未加载
评论 #24033717 未加载
dougmwnealmost 5 years ago
It would be a fun modification to require 6&#x2F;7 or 5&#x2F;7 files so that you needed to bring a certain number of pieces, but not every piece. Inspired by RAID 5 algorithm that has enough parity to allow one drive failure in a group of 3 or more.
评论 #24028649 未加载