4 ms·
Let's say you wanted to implement a more modern, not (yet?) broken algorithm instead of RC4. Are there any which could fit into a similarly small amount of code
by mikeash 11y ago
Let's say you wanted to implement a more modern, not (yet?) broken algorithm instead of RC4. Are there any which could fit into a similarly small amount of code?
- swiley 11y agoRSA is pretty short (just modular exponentiation). The problem is all the stuff that goes around it: key generation, padding etc.
- JoachimSchipper 11y agoWith Intel's instructions, AES-GCM is decently short. ;-)
- mikeash 11y agoThat is both hilarious and practical.
- Rebelgecko 11y agoMaybe not quite that small, but if you look up some "lightweight block ciphers", you can find some candidates.
- lisper 11y agoI like TEA (or XTEA or XXTEA). Not quite as small as RC4 but still pretty compact. https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm
- hatsunearu 11y agohttps://en.wikipedia.org/wiki/Speck_%28cipher%29 https://en.wikipedia.org/wiki/Speck_%28cipher%29 Speck's pretty nice and tiny, but who knows if it's backdoored or not :)
- mikeash 11y agoThat is a pretty sweet reference implementation. Thanks for the link.