Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/o0101/sillycrypt
Simplest possible cryptosystem
https://github.com/o0101/sillycrypt
Last synced: 15 days ago
JSON representation
Simplest possible cryptosystem
- Host: GitHub
- URL: https://github.com/o0101/sillycrypt
- Owner: o0101
- Created: 2020-06-08T12:23:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-08T12:38:42.000Z (over 4 years ago)
- Last Synced: 2024-02-01T16:06:06.409Z (10 months ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sillycrypt
Simplest possible cryptosystem
## Idea
Take a Unicode string convert to an ArrayBuffer (only reliable way is to use 32-bit code points).
If data is binary then don't do the first step.
Convert those words to base64.
Include a header that specifies whether string or binary was starting point, and also the byte length of the input.
Perform encryption using an s-box 6x6, and row/column transposition on a matrix of 1024 (32x32) letters.
Insecure version uses a static s-box and static transpositions.
Secure version uses a keyed s-box, and keyed transpositions.
Take the resulting base64 letters and convert them to base2.
Take that sequence of 'bits' and a source bitmap image, and combine them by first turning every color value in the bitmap to even by rounding down if it's odd. If it's even, then just leave it. Now for each 1 in the sequence of bits, turn that color value odd by rounding it up. To recover the sequence of 'bits', take the image and read off the even values, then reverse the process.