News for hackers. Stuff that matters.
Re:Stanford JavaScript Crypto Library by technion on Monday June 15, 2020 @09:55PM (#23535190)
I haven't used this, so I went and read the documentation.

node-forge is a good example of giving a user too many options in my view. As a developer looking to secure something, you've apparently decided on AES-256 against options like "DES" and "RC2" that are on offer. That's a good step.

Now you get to choose between ECB, CBC, CFB, OFB, CTR. Which is a good idea? Which isn't? The documentation appears to just say "here is a great example of using CBC mode". That example is vulnerable to a padding oracle (uses PKCS#7 and has no form of MAC). From what I'm reading it's left as an exercise to the reader to record the iv somewhere. If you did want a hash, it helpfully suggests MD5 as reasonable.

This isn't a great example of crypto engineering.

There are no comments on this comment yet.