Live data from Hacker News

Rolling your own crypto: Everything you need to build AES from scratch

github.com

1–10 of 92 posts

Re: Rolling your own crypto: Everything you need to build AES from scratch

#2
It'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 accomplish much: People copying and pasting code usually have tremendous tunnel vision.

Re: Rolling your own crypto: Everything you need to build AES from scratch

#4
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).

Re: Rolling your own crypto: Everything you need to build AES from scratch

#6
post #4

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).

> 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 kid grabs it" (even though I have no kids, nor nephews etc), as well as trigger discipline and "every gun is loaded" (even though I've never touched a gun in my life and have never lived in the USA).

Re: Rolling your own crypto: Everything you need to build AES from scratch

#7
post #4

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).

> 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…

Those other mantras work but the crypto one is dangerous because it actually implicitly discourages people from playing with it and learning about it

Re: Rolling your own crypto: Everything you need to build AES from scratch

#8
My own introduction to AES and developing further variations was via the print version of the algorithm in 1981 edition of Computer Networks by Andrew S. Tanenbaum & David J. Wetherall, talking about combinatorics and groups at length with people good in that field, and then tinkering with extending early versions of Cayley [-1]

If you are going to dabble in cryptography it might be wise to approach it via the theory, work in the domain symbolically, and generate code that provably "works as designed" so that you can focus on attacks on the design in a symbolic domain.

You then have a secure element in a security eco-system ... which leaves the issue of wether the end-points of that element are insecure or indeed whether the entire security locale can be avoided [pi]

[-1] https://en.wikipedia.org/wiki/Magma_(computer_algebra_system...

[pi] insert picture of padlocked gate with no fence in otherwise open field.

Re: Rolling your own crypto: Everything you need to build AES from scratch

#9
post #4

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).

> 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 think the title was a nod to the fact that this is something everyone's been taught not to do. It metaphorically could have been titled "Running With Scissors."
Post reply on HN