4 ms·
One metric that is seldom mentioned for crypto algos is code complexity. I really wish researchers would at least pay lip service to it. TEA (an unfortunately
by ur-whale 3y ago
One metric that is seldom mentioned for crypto algos is code complexity.
I really wish researchers would at least pay lip service to it.
TEA (an unfortunately somewhat weak symmetric cipher) was a very nice push in that direction.
TweetNaCl was another very nice push in that direction by djb
Why care about that metric you ask?
Well here are a couple of reasons:
- algo fits in head
- algo is short -> cryptanalysis likely easier
- algo is short -> less likely to have buggy implementation
- algo is short -> side-channel attacks likely easier to analyse
- algo fits in a 100 line c++ header -> can be incorporated into anything
- algo can be printed on a t-shirt, thereby skirting export control restrictions
- algo can easily be implemented on tiny micro-controllers
etc ...
- oconnor663 3y agoWe put a lot of effort into section 5.1.2 of https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blak..., and the complicated part of BLAKE3 (incrementally building the Merkle tree) ends up being ~4 lines of code. Let me know what you think.
- rstuart4133 3y ago> One metric that is seldom mentioned for crypto algos is code complexity. ... TEA (an unfortunately somewhat weak symmetric cipher) was a very nice push in that direction. Spec is also a push in that direction [0]. It's code looks to be as complex as TEA's (1/2 a page of C), blindingly fast, yet as far I know has no known attacks despite being subject to a fair bit of scrutiny. About the only reason I can see for it not being largely ignored is it was designed by NSA. SHA3 is also a simple algorithm. Downright pretty, in fact. It's a pity it's so slow. [0] https://en.wikipedia.org/wiki/Speck_(cipher) https://en.wikipedia.org/wiki/Speck_(cipher)