You can now make horcruxes out of your confidential files
github.com
github.com
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.
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.
A better tool is ssss which uses Shamir's Secret Sharing. http://point-at-infinity.org/ssss/
I'll also have a look into ssss, thanks :)
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.
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)
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
As I've mentioned in another comment I no longer load files into memory so the program runs pretty fast
Thanks for the valuable feedback everyone!
If you choose the same parameters for both algorithms, you can freely assign any key with any data shard and store those.
I thought it was a cute reference