This is unsafe and should not be used.<p>This is simply splitting the key in multiple pieces, thus for every piece you have, you gain additional information about the key, allowing for exponentially easier brute-forcing of the remaining key.<p>Example: Assume someone creates 3 horcruxes and you can get your hands on 2 of them. This gives you 85 bits of the full 128 bit key, thus you only need to brute force 43 bits for the rest. Of course you don't have the full data anyways, but you still learn about 2/3 of it.<p>A better tool is ssss which uses Shamir's Secret Sharing.
<a href="http://point-at-infinity.org/ssss/" rel="nofollow">http://point-at-infinity.org/ssss/</a>
Instead of splitting the key into substrings or using Reed-Solomon codes I’d recommend something like Adi Shamir’s secret sharing scheme.<p>Using something like that allows you to say “split into seven shards but only require three to reconstitute”, and possessing less than the minimum number of shards yields no new information.
Hello all! Based on the feedback I've received in the last day I've made some improvements:<p>I'm now making use of Samir's Secret Sharing Scheme meaning you can now specify a threshold of horcruxes required to resurrect the original file (hopefully putting me in better standing among the HP crowd)<p>If your threshold equals the total number of horcruxes, I'll divide the content evenly between each horcrux to reduce file size. Otherwise each horcrux will contain the same encrypted content<p>As I've mentioned in another comment I no longer load files into memory so the program runs pretty fast<p>Thanks for the valuable feedback everyone!
This is a great idea, though I don't think it will be useful practically until it includes reed-solomon encoding support for both files and keys, so that you can lose a portion of your data and still be safe.
Similar idea with (very) similar name: <a href="https://github.com/kndyry/horcrux" rel="nofollow">https://github.com/kndyry/horcrux</a>