Skip to content

Instantly share code, notes, and snippets.

@NULLx76
Created October 26, 2019 20:17
Show Gist options
  • Save NULLx76/d6d3d6055b0e63f34789c664e5a844bf to your computer and use it in GitHub Desktop.
Save NULLx76/d6d3d6055b0e63f34789c664e5a844bf to your computer and use it in GitHub Desktop.
Bogocrypt

Bogocrypt

Encryption

  1. plaintext xor /dev/urandom

Decryption

  1. Ciphertext xor /dev/urandom
  2. Retry until plaintext matches valid english words
  3. hope that it is correct

Advantages

  1. Easily multithreaded
  2. Theoretically informationally secure
  3. Malicious users have equal chance of decryption as the intended recipient (estimated to be "fuck all")
  4. it's like xor pads without the need of remembering those pesky keys

Disadvantages

  1. Can be slow on systems with no good random source

Quantumbogocrypt

Encryption

  1. Quantumly generate a random bitstring and xor it with your plaintext

Decryption

  1. Quantumly generate a random bitstring and xor it with your ciphertext
  2. If your output does not match english words destroy the universe (implementation left as an excercise to the reader)
  3. Only the universes where it is decrypted correctly will remain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment