3 ms·
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
by technion 6y ago
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.