5 ms·
RC4 in x86 assembly – 77 bytes
- fleitz 11y agoBrilliant! Great work!
- lisper 11y ago[EDIT:] For those who didn't read the article, this is a cute parlor trick, but RC4 is broken and should not be used. If you really want a small cipher, use TEA or one of its more recent variants. https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm
- random778 11y agoTo be fair, the introduction states that it is broken and links to two papers as to why.
- lisper 11y agoGood point. I edited my comment to reflect this.
- 0x4a42 11y ago>but RC4 is broken and should not be used. I think the author is pretty clear about that in the first chapter. And it's not because it's "broken" that it's not interesting to study it.
- lisper 11y agoGood point. I edited my comment to reflect this.
- tedunangst 11y agoIs TEA less broken than RC4? It's also bigger. RC4 is remarkable because it's so small. TEA does somewhere around ~8 times more work.
- lisper 11y agoYes, TEA is less broken than RC4. This is not to say that it is inherently more secure, just that no effective attacks on it are currently widely known the way they are with RC4. But this could just be because no one uses TEA and so it has received comparatively little cryptanalytical attention.
- cperciva 11y agoRC4 is remarkable because it's so small. With AESNI, you could probably make a pretty small AES implementation too...
- JulianMorrison 11y agohttps://en.wikipedia.org/wiki/Treyfer https://en.wikipedia.org/wiki/Treyfer seems exceptionally short, even more so than RC4, and simple enough to memorize. Googling around suggests it's still okay to use, too (but don't use it as a hash).
- odzhan 11y agoI wrote implementation of Treyfer today out of curiosity but haven't completely optimized it. https://odzhan.wordpress.com/2015/11/13/asmcodes-treyfer/ https://odzhan.wordpress.com/2015/11/13/asmcodes-treyfer/
- JulianMorrison 11y agoYou should edit your decrypter into Wikipedia.
- mtgx 11y agoCan we stop promoting the use of a broken cipher?