florinpop17 / 100Days100Projects

Creating 100 Projects in 100 Days Challenge
MIT License
605 stars 87 forks source link

One Time Pad #17

Open GeorgeWL opened 4 years ago

GeorgeWL commented 4 years ago

A old fashioned form of crypto, which is quite literally unbreakable, except by human error (using the same password twice or starting every message with the same sentence.)

The way they work is simple

  1. the user gives an input
  2. it's encoded from a very long password (in old times, this was done with Enigma machines and a man operating them)
  3. they send the encoded message over unencrypted channels, cause it's nonsense if you don't have the code
  4. They send the password by encrypted channels (this used to be a man back in the day)
  5. The message is decoded from the password
  6. the password should only be used once to encode and once to decode, then thrown in the bin.

The simplest form is a replacement cipher, which is where you replace every letter with a different letter or number. There's even fancier ways though.