• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

example/H03-May-2022-

pkg/H14-Jun-2020-894672

src/github.com/jesseduffield/horcrux/H03-May-2022-

.goreleaser.ymlH A D14-Jun-20201.3 KiB6357

LICENSEH A D14-Jun-20201 KiB2117

README.mdH A D14-Jun-20202.4 KiB6141

go.modH A D14-Jun-202049 42

main.goH A D14-Jun-20201.4 KiB6554

README.md

1# horcrux
2
3Split your file into encrypted horcruxes so that you don't need to remember a passcode
4
5![](https://i.imgur.com/TijN4YP.png)
6
7
8## How it works
9
10`horcrux` has two commands, `split` and `bind`.
11
12### Splitting
13
14If I have a file called `diary.txt` in my current directory I can call
15```
16horcrux split diary.txt
17```
18and it will prompt me for how many horcruxes I want, and how many will be needed to resurrect the original file. For example I might want 5 horcruxes with the ability to resurrect the file if I have any 3. The horcrux files will be created like so:
19```
20diary_1_of_5.horcrux
21diary_2_of_5.horcrux
22...
23```
24Now you just need to disperse the horcruxes around the house on various USBs or online locations and hope you can recall where they all are!
25
26### Binding
27
28To bind the horcruxes back into the original file just call
29```
30horcrux bind
31```
32in the directory containing the horcruxes (or pass the directory as an argument).
33
34## Installation
35
36via homebrew:
37```
38brew install jesseduffield/horcrux/horcrux
39```
40
41via [binary release](https://github.com/jesseduffield/horcrux/releases)
42
43## Who this is for:
44* People who need to encrypt a big sensitive file like a diary and don't expect to remember any passwords years from now (but who paradoxically will be capable of remembering where they've hidden their horcruxes)
45* People who want to transmit files across multiple channels to substantially reduce the ability for an attacker to intercept
46* People named Tom Riddle
47
48## FAQ
49Q) This isn't really in line with how horcruxes work in the harry potter universe!
50
51A) 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.
52
53Q) How does this work?
54
55A) This uses the (Shamir Secret Sharing Scheme)[https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing] to break an encryption key into parts that can be recombined to create the original key, but only requiring a certain threshold to do so. I've adapted Hashicorp's implementation from their (vault repo)[https://github.com/hashicorp/vault]
56
57## Alternatives
58
59* (ssss)[http://point-at-infinity.org/ssss/]. Works for keys but (as far as I know) not files themselves.
60* horcrux[https://github.com/kndyry/horcrux]. Looks like somebody beat me to both the name and concept, however this repo doesn't support thresholds of horcruxes
61