News for hackers. Stuff that matters.
Re:Implementing RSA from Scratch in JavaScript by tyingq on Thursday February 29, 2024 @08:22AM (#39548946)
I see the peer comments regarding big ints, but the OP is still right in that the presented code doesn't work, for more than one reason.
Re:Implementing RSA from Scratch in JavaScript by shiomiru on Thursday February 29, 2024 @08:38AM (#39549125)
Besides, the code does not use BigInts at all, so the fact that JavaScript has them does not help much.

I agree with the sibling commenter that this seems to be automatically generated. The disclaimer is weird, you don't just use a random rsa implementation found in a blog post "with careful consideration and expert guidance". The article's structure is weird, it's just a bullet list of steps and then code dump. It gets many details wrong (code won't run, explanation seems to be mixing up euler & carmichael totients, ...). etc.

It is somewhat scary that this got to the front page at all.

Re:Implementing RSA from Scratch in JavaScript by throwayaw84330 on Thursday February 29, 2024 @09:26AM (#39549670)
100% agree.

Many red flags here:

- Look at the text below the headers "Explaining RSA Cryptography" and "Explaining RSA Cryptography with JavaScript". Both paragraphs start with the exact same text. I believe there are far more chances that this was generated by a machine rather than a human.

- Look at the math! There is a code block where it says "scssCopy" -- the "Copy" is generally garbage from machine generated text+code snippets.

- The code has a missing function, `lcm`. Author has forgotten to include it, which can be a human or machine error.

This kind of episode makes me wonder if I should continue posting, suggest that people filter everything through an LLM, or just resign to the botspamcallypse.