Hacker News new | past | comments | ask | show | jobs | submit login
Asemica: An asemic Markov-chained cipher (github.com/linenoise)
38 points by photon12 on Sept 4, 2020 | hide | past | favorite | 8 comments



If I wanted to produce plaintext like ciphertexts, I'd:

1. Encrypt the plaintext with a standard cipher, producing uniformly random bytes

2. Build a language model which predicts the probability of the next symbol (nowadays you'd probably use a neural network for that).

3. Run an arithmetic decoder (or similar) for that model on the ciphertext. This translates random bytes into language. The quality of the output depends on the quality of the language model.


I've wanted something like this for barcodes. My company depends on our users to enter in a 16 digit barcode correctly. It would be great if the 16 digit barcode can somehow be bi-directionally translated into a sentence (grammatically correct sentence would be even better). While this will probably take the user more keystrokes to type out, it should reduce entry errors.


If you drop the grammar requirement, you can easily use one of the many dictionaries made for this purpose (e.g. diceware or a bip39 wordlist which even has support for many languages).

If you feel fancy, you could make it order independent or add error correcting codes to compensate for a limited number of mistakes at the cost of an extra word or two.



Interesting!

You want secure asemic cipher? say hello to Format-preserving encryption.

https://en.wikipedia.org/wiki/Format-preserving_encryption


I'd rather consider this an encoding than a cipher


Why? It has a secret key. Doesn’t that qualify it as a cipher?


I'd treat that file as merely a style template, not as a key.

Selling it as a cipher opens it up to criticism, since from the description it sounds like a simple substitution cipher with decoy symbols, which is obviously not secure.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: