A side-project experimenting with encryption.
It uses a shared private key, hence a secure back-channel is required for communication of the key, but that is currently outside the scope of this project.
As far as I can see, this algorithm is reasonably secure, provided the key is long enough.
Also, this algorithm is blazingly fast, completing encryption and decryption in a few micro-seconds.
- Split the string into random length parts, delimited by sets of 5 spaces.
- Variation on ROT, changing 'space' characters as well.
- One-time pseudo-random pad which is cryptographically secure, and not reliant on a human-given seed. A delimiter of pseudo-random characters is placed in between the string and the pad, using a given seed.
- Variation on ROT.
- Shuffle the string.
- A pseudo-random number of rounds, repeating steps 4 and 5. Also not reliant on a human-given seed.
Reverse of the above.
The number of rounds in encryption does not need to be known.
There is, very roughly, a 1 in 96 quintillion chance that decryption will fail, however this is due to the design and is incredibly unlikely to ever happen.
Read through the code for more details.