-1

I have a thought. 1. Take a file. 2. Read number of bytes. If its less than 2048, padd it till 2048 3. Read each byte. And create a single file which contains the particular byte. Give a random name to the new file. 4. Do this for all the bytes. 5. Keep the order of the files which need to be joined in a text file secret.

This will make computationally infeasible to do permutate.

Will this work ?

  • Trust me when I say I hate to ask, but... what will your program do if the file is GREATER than 2048 bytes? Break it into blocks and pad the last one? – KnightOfNi Oct 17 '14 at 21:23
  • Thank u for ur comment. Asume all the files r used under or exact 2048 bytes. – user34694 Oct 17 '14 at 21:33

1 Answers1

4

The resulting secret value (the list of filenames to show the concatenation order) would take up more space than the original file. You'd be better off simply using a one-time pad, and keeping that secret... or even keeping the original file secret directly.

Your method would work in most cases, in the sense that anyone who possessed the randomly-named single-byte files but not the secret value would be unable to reconstruct the original file... but the task of keeping the secret value secret would be more difficult than the task of keeping the original file secret, and there would still be some possible attacks on the unordered list of bytes if the original file's structure was very predictable. You would also have to be careful about how you choose your padding, since a poorly-chosen padding method could make the file structure more predictable.

Brilliand
  • 297
  • 2
  • 7