My Squaring Algo Beats Karatsuba and FFT for Real-World Cryptography

0 points by SvenSchnieders | Posted on Apr 20, 2025

Hi HN, I’m Krishil Rohit Sheth, and over the last 4 years I’ve developed a new algorithm (RPF) for squaring large numbers — and it outperforms Karatsuba, and even FFT-based methods for numbers under 800 digits.
Raw performance: RPF beats Karatsuba in execution time and scales better with input size. With GMP enhancements: Even after both are optimized with GMP, RPF still maintains a performance edge. Better than FFT for mid-size inputs: Up to 800 digits, RPF is also faster than FFT-based multiplication, which usually kicks in beyond this range.

I’ve attached benchmark charts and comparisons here:
-https://drive.google.com/file/d/1aZ-JR0Oq5KnY4xKd2tAPEvr1wFPowhSt/view?usp=drive_link

Hide hidden comments

SvenSchnieders on Apr 20, 2025 | #9 | 0 points
SvenSchnieders on Apr 20, 2025 | #10 | 0 points
It's an interesting phenomenon that you can observe with other things as well like tastes in music. I think it has something to do with people having access to about sixty years of people trying out just about everything they could think off. It's all been done before at this point and it's all available in new and fresh forms. So, it's no longer about collectively picking something that is genuinely new but individuals cherry-picking whatever that they like. And it helps of course that we're not funneling media through a handful of TV channels, newspapers, etc. anymore like we used to. So people cherry pick where they get their information as well.

Login with Twitter/X to comment.