jesseduffield / horcrux

Split your file into encrypted fragments so that you don't need to remember a passcode
MIT License
4.53k stars 116 forks source link

Pieces are larger than the original #16

Closed hawicz closed 3 years ago

hawicz commented 3 years ago

One of the properties described at https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing is that SSS is "Minimal: The size of each piece does not exceed the size of the original data." However, looking at the examples, each piece is 2.23 KB, larger than the original 1.75 KB. Is that discrepancy an indication of a bug somewhere?

wopian commented 3 years ago

There's a ~350 byte message on each file explaining what it is and where to get the decompiler, which would increase 1.75 KB to 2 KB


# 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

-- HEADER --
-- BODY --
hawicz commented 3 years ago

Oh, right, I wasn't expecting a few lines of text to add up quite so quickly. Stripping that off I end up with a file that's the same size as the input.