Refreshing to see "crypto" meaning cryptography, not cryptocurrencies... And also good that they mention right from the start that you shouldn't use your (or their) self-made cryptography in production (although they could have emphasized it a bit more).
I guess the advice to "not roll your own crypto" can be safely considered compromised and hostile, especially after it came out that the winning curves in some competitions were selected by the NSA. Do roll your own crypto if you have nation state actors as potential attackers. Make life hard for them.
Rolling your own crypto: Everything you need to build AES from scratch
21–30 of 92 posts
Re: Rolling your own crypto: Everything you need to build AES from scratch
#22Earlier quoted context omitted.
It’s absolutely worth it to roll your own crypto if you want to learn from it. I feel like there is almost a stigma against articles like these because we’ve all been conditioned so much to avoid even thinking about it lol. I did some deep dive into AES and RSA at some point in a distant past, it was a learning experience that to this day allows me to make much better decisions when choosing algorithms.
> It’s absolutely worth it to roll your own crypto if you want to learn from it No. If you want to "learn from it", the first thing you should do is buy a copy of Bruce Schneier's Applied Cryptography . Just reading (and fully understanding !) that book will alone put you in a position where you already know more about cryptography than 90% of other people. If after that you still want to play around with rolling you…
Just about worst thing these absurd rules achieve is that effectively only rule breakers are allowed in.
Re: Rolling your own crypto: Everything you need to build AES from scratch
#23Re: Rolling your own crypto: Everything you need to build AES from scratch
#24Earlier quoted context omitted.
> It’s absolutely worth it to roll your own crypto if you want to learn from it No. If you want to "learn from it", the first thing you should do is buy a copy of Bruce Schneier's Applied Cryptography . Just reading (and fully understanding !) that book will alone put you in a position where you already know more about cryptography than 90% of other people. If after that you still want to play around with rolling you…
Just no. This idea that people are not allowed to learn by doing things and must read huge books first is absurd. The guidelines for learning you gave here are impractical for majority of people who are interested. It is actually good when people are trying to learn about security. Just about worst thing these absurd rules achieve is that effectively only rule breakers are allowed in.
No, its not absurd.
Sure, I agree, for many things in life you can "learn by doing".
But this is cryptography.
There is no escaping that cryptography IS mathematics and an algorithm built on top of that mathematics.
Unfortunately the only way to learn the theory is by reading and understanding books or academic papers.
Otherwise you are just taking shortcuts based on a summary that someone else has written for you on a short blog or forum post. Which, aside from the fact that you are skipping the detail and hence not really learning, also brings us into the region of trust...
If you have no interest in learning the dry theory behind the cryptography, then you have no business rolling your own crypto. Because if you are not willing to understand the theory then you are going to make serious mistakes.
Re: Rolling your own crypto: Everything you need to build AES from scratch
#25Re: Rolling your own crypto: Everything you need to build AES from scratch
#26Earlier quoted context omitted.
> you shouldn't use your (or their) self-made cryptography in production Absolutely, and that was the very first thing I thought when I saw the title. For some reason I've got the "don't roll your own crypto" commandment heavily ingrained into my brain (even though I've never been in any context where I might have tried), together with "don't let the frying pan handle stick out over the edge of the cooker in case a k…
I always found this "mantra" shortsighted and damaging on the long run - if nobody does their own crypto then who does their crypto? You are incentivizing people against learning this by that and a very significant part of learning something is actually using it in practice.
Re: Rolling your own crypto: Everything you need to build AES from scratch
#27It's much more interesting to implement AES without the table lookups-- as doing so requires constructing a boolean circuit that computes the same result as the tables, more useful too since the table lookups result in security killing side channels. :) The author might be surprised at how often someone's random "learn 2 crypto" ends up in use in production. Kudos for the warnings, though I doubt that actually accomp…
Re: Rolling your own crypto: Everything you need to build AES from scratch
#28It's much more interesting to implement AES without the table lookups-- as doing so requires constructing a boolean circuit that computes the same result as the tables, more useful too since the table lookups result in security killing side channels. :) The author might be surprised at how often someone's random "learn 2 crypto" ends up in use in production. Kudos for the warnings, though I doubt that actually accomp…
Isn't table lookup constant time?
Re: Rolling your own crypto: Everything you need to build AES from scratch
#29Earlier quoted context omitted.
Just no. This idea that people are not allowed to learn by doing things and must read huge books first is absurd. The guidelines for learning you gave here are impractical for majority of people who are interested. It is actually good when people are trying to learn about security. Just about worst thing these absurd rules achieve is that effectively only rule breakers are allowed in.
> Just no. This idea that people are not allowed to learn by doing things and must read huge books first is absurd. No, its not absurd. Sure, I agree, for many things in life you can "learn by doing". But this is cryptography. There is no escaping that cryptography IS mathematics and an algorithm built on top of that mathematics. Unfortunately the only way to learn the theory is by reading and understanding books or…
As someone who wholeheartedly buys into the “thou shalt not roll thine own crypto” mantra, this attitude is just sad. Everyone who wants to has all the business rolling their own crypto for learning purposes, and you have no business telling them they shouldn’t. Stifling this sort of exploration is fundamentally wrong.
Re: Rolling your own crypto: Everything you need to build AES from scratch
#30The article and code is more about understanding the math, which is great and fundamental, but it is not really about the implementation side of things.
https://www.intel.com/content/www/us/en/docs/intrinsics-guid...
https://developer.arm.com/documentation/ddi0596/2020-12/SIMD...