logoalt Hacker News

RunSettoday at 12:27 PM4 repliesview on HN

If no one rolled their own crypto then there would be none.

"Don't roll your own crypto." sounds a lot like "Don't you worry about crypto. Let _me_ worry about crypto."


Replies

svpktoday at 12:51 PM

That's not really the point of the saying though. The point is more so that if you are the kind of person who is in a position to roll your own crypto you probably have a PhD and have worked with cryptography for years. And the thing that you're setting out to do is to produce a cryptography library.

If you're that kind of person, then sure go for it! But if you're a top person in the field of cryptography you didn't need anyone to tell you if you were fit to make a cryptography library anyway.

And if you're not that kind of person you do need someone to tell you because the whole field is a minefield where subtle oversights break the whole thing. If you want to just implement cryptography as a fun learning experience that's great. But actual implementations that people will actually depend on need to be handled by experts.

cure_42today at 1:18 PM

They did. And it was broken. And we iterated like crazy with people devoting their lives to studying the incredibly advanced mathematics underpinning modern cryptography. But please, roll your own using an LLM and show us all how wrong we are :)

flirtoday at 1:02 PM

The necessary computer science, you could probably implement. The necessary computer engineering, however...

benj111today at 2:00 PM

The point is that crypto is hard.

Therefore many people need to check it, to ensure it is correct.

The crypto you rolled yourself is unlikely to have been extensively tested.

It's like alpha software. It may have no known bugs, but it hasn't been tested in the wild. Once it has been tested and the bugs fixed, because there will be bugs, you can release a stable version.

You shouldn't rely on alpha software for critical things, like keeping secrets, secret.

So yes, write a crypto algorithm, but don't represent it as working correctly if you don't know it is or force others to use it, and don't use crypto that hasn't been extensively tested.