Horcrux (jesseduffield)

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{FormatInfo |formattype=electronic |subcat=Encryption |extensions={{ext|horcrux}} }} A '''Horcrux''' is a concept from the Harry Potter universe whereby a dark wizard's soul ...")
 
 
(4 intermediate revisions by one user not shown)
Line 4: Line 4:
 
|extensions={{ext|horcrux}}
 
|extensions={{ext|horcrux}}
 
}}
 
}}
A '''Horcrux''' is a concept from the Harry Potter universe whereby a dark wizard's soul is split into parts to make it more difficult to kill him. This format, from GitHub user jesseduffield, is one of two known implementations of a concept of file encryption and splitting inspired by this. (The other is [[Horcrux (kndyry)]].)
+
A '''Horcrux''' is a concept from the Harry Potter universe whereby a dark wizard/witch's soul is split into parts to make it more difficult to kill him/her. This format, from GitHub user jesseduffield, is one of two known implementations of a concept of file encryption and splitting inspired by this. (The other is [[Horcrux (kndyry)]].)
  
When you create a set of horcruxes from a file (using a command-line-based program that is distributed as open-source and has compiled executables for several systems), you can choose how many horcruxes to create and how many of them need to be gathered in order to reconstitute the file. For instance, you may have 5 horcruxes of which 3 are needed, so that any three of the horcruxes can be used to regenerate the original file. No additional decryption key is needed, since the key itself is rebuilt from the file headers.
+
When you create a set of horcruxes from a file (using a command-line-based program that is distributed as open-source and has compiled executables for several systems), you can choose how many horcruxes to create and how many of them need to be gathered in order to reconstitute the file. For instance, you may have 5 horcruxes of which 3 are needed, so that any three of the horcruxes can be used to regenerate the original file. No additional decryption key is needed, since the key itself is rebuilt from the file headers. [[Shamir's Secret Sharing]] is used to divide the key.
  
Each of the horcrux files is the same length as the original file.
+
Each of the horcrux files is (usually) the same length as the original file. (This may not be the case if the original file was very small.)
  
 
== Identification ==
 
== Identification ==
Line 23: Line 23:
  
 
This is followed by a <code>-- HEADER --</code> and <code>-- BODY --</code> section.
 
This is followed by a <code>-- HEADER --</code> and <code>-- BODY --</code> section.
 +
 +
The header is in [[JSON]] format with this structure (as given in the [[Go]] language source code):
 +
 +
:type HorcruxHeader struct {
 +
:: OriginalFilename string `json:"originalFilename"`
 +
:: Timestamp        int64  `json:"timestamp"`
 +
:: Index            int    `json:"index"`
 +
:: Total            int    `json:"total"`
 +
:: Threshold        int    `json:"threshold"`
 +
:: KeyFragment      []byte `json:"keyFragment"`
 +
: }
  
 
== Sample files ==
 
== Sample files ==

Latest revision as of 04:10, 22 August 2020

File Format
Name Horcrux (jesseduffield)
Ontology
Extension(s) .horcrux

A Horcrux is a concept from the Harry Potter universe whereby a dark wizard/witch's soul is split into parts to make it more difficult to kill him/her. This format, from GitHub user jesseduffield, is one of two known implementations of a concept of file encryption and splitting inspired by this. (The other is Horcrux (kndyry).)

When you create a set of horcruxes from a file (using a command-line-based program that is distributed as open-source and has compiled executables for several systems), you can choose how many horcruxes to create and how many of them need to be gathered in order to reconstitute the file. For instance, you may have 5 horcruxes of which 3 are needed, so that any three of the horcruxes can be used to regenerate the original file. No additional decryption key is needed, since the key itself is rebuilt from the file headers. Shamir's Secret Sharing is used to divide the key.

Each of the horcrux files is (usually) the same length as the original file. (This may not be the case if the original file was very small.)

[edit] Identification

Files start with this ASCII sequence: (with lines separated by linefeeds and the # character on the first character of each line)

# THIS FILE IS A HORCRUX.
# IT IS ONE OF 5 HORCRUXES THAT EACH CONTAIN PART OF AN ORIGINAL FILE.
# THIS IS HORCRUX NUMBER 1.
# IN ORDER TO RESURRECT THIS ORIGINAL FILE YOU MUST FIND THE OTHER 4 HORCRUX(ES) AND THEN BIND THEM USING THE PROGRAM FOUND AT THE FOLLOWING URL
# https://github.com/jesseduffield/horcrux

(where the numbers will vary depending on how the files were created)

This is followed by a -- HEADER -- and -- BODY -- section.

The header is in JSON format with this structure (as given in the Go language source code):

type HorcruxHeader struct {
OriginalFilename string `json:"originalFilename"`
Timestamp int64 `json:"timestamp"`
Index int `json:"index"`
Total int `json:"total"`
Threshold int `json:"threshold"`
KeyFragment []byte `json:"keyFragment"`
}

[edit] Sample files

[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox