Does somebody have knowledge of
node:crypto module or could point out any fine resources? I’m struggling with Cryptopals challenges, and wanted to do it with Nodejs tools. It feels like there is some intricate interplay between Nodejs and OpenSSL, which isn’t described at https://nodejs.org/docs/latest-v16.x/api/crypto.html#class-decipher or in OpenSSL docs, but which prevents correct solving of the challenge.
I already debugged own solution in all the ways I could think of. Then rewrote their own Python solution to Nodejs, and still with no luck. Of course, there is a great chance of plain mistake in both of my attempts: they can be find in a codesandbox. The question is how does aes-cbc exactly works with
.setAutoPadding(true)? Is there any built-in protection from padding oracle attack that should be bypassed? Sad enough all solutions I could find that made it up to this challenge are in other languages, or use own functions (which is great for learning to write, but it’s equally great to learn to use conventional tools).
PS An honor mention of @mahneh , who expressed interest in these, and could add something to the topic.