DEV Community

skaunov
skaunov

Posted on

Cryptopals #46: want a write-up?

I wonder if anybody is interested in https://cryptopals.com/sets/6/challenges/46 write-up? I'm finishing it with Nodejs, and it seems like you can easily find code for the challenge, but no actual write-up in English.

It's mostly about how artificial it is (they warned) so I couldn't find a realistic something in OpenSSL or to act as victim.

Top comments (1)

Collapse
 
skaunov profile image
skaunov

So, actually there is a write-up for this challenge, but it's kinda "cryptic?" ;) It just doesn't mention the challenge directly, but concisely describe the solution: crypto.stackexchange.com/questions.... And if you want extended explanation I won't do it better than https://www.youtube.com/watch?v=ezjDAOn7A94&t=11201s.

It turned out that catching OpenSSL error lets to employ at least node:crypto.privateDecrypt() (don't forget the option {padding: constants.RSA_NO_PADDING}), but I didn't found how to set standard OpenSSL to let its safeguards encrypt such a vulnerable setting.

Most of my time sunk to find out a not-so-well-documented catch-up of Nodejs, which isn't straightly cryptographic, and is now buried in Stackoverflow site.

Also it should be mentioned just in hope it would be corrected sometime. There is a typo in the challenge text: "modulus is a prime number". Obviously, it's odd as it's a multiplication of two big prime numbers. Quite strange I encountered only corrections of the citations from there, but not addressing the source text of the challenge.