Skip to content

Instantly share code, notes, and snippets.

@rossja
Last active February 25, 2020 23:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rossja/2d8a8ea07397d9c33fee636367493219 to your computer and use it in GitHub Desktop.
Save rossja/2d8a8ea07397d9c33fee636367493219 to your computer and use it in GitHub Desktop.
ECB CryptoLocker

ECB CryptoLocker Idea

Random musings from a 3 AM brain spin. Likely a very stupid idea :)

To Lock

  • create a list of files to lock
  • randomize the list order
  • generate a random 8 bit ascii hex string to use as an IV
  • store file list for unlocking later
    • cloud push?
    • use ${deviceID}.${IV} as the filename?
  • XOR the first 8 bits of the first file using the IV
  • take the XORd bits and use them to XOR the first 8 bits of the next file in the list
  • repeat until all files have been "locked"

To Unlock

  • retrieve list of files
  • start at the next-to-last file in the list
  • use first 8 bits of the file to XOR the first 8 bits of the last file
  • repeat until you reach the first file
  • XOR the first 8 bits of the first file using the IV

Notes

  • This doesn't actually "encrypt" the files at all, but it does render them unusable until they are unlocked (maybe?)
  • This process may be faster than actually encrypting the data, since only 8 bits per file are affected
  • If the system is a penguin, you might still see its shadow!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment