frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

RSA and Python

https://xnacly.me/posts/2023/rsa/
12•ibobev•3d ago

Comments

ashwinnair99•1h ago
RSA is one of those algorithms where understanding it once actually sticks.
gmiller123456•1h ago
One of the bigger hurdles in implementing RSA is having an algorithm which can multiply the large numbers in real time. If you try a niave multiplication algorithm, you might find you'll never get an answer. A lot of hardware now comes with special instructions which implement efficient algorithms for doing this.
MattPalmer1086•51m ago
Sure, you can't use built in multiplication, but it isn't a very big hurdle. Just use repeated squares, it's fairly trivial to implement. I've worked on software that did this on very low power mobile payment devices.
SkiFire13•22m ago
Repeated squares is a way to implement exponentiation, not multiplication.
dfboyd•46m ago
The way the article uses RSA is no better than a simple substitution cipher. Both the "l"s in "hello" are enciphered to 2575. It's a newspaper cryptogram.

You're supposed to concatenate all the input numbers, to create a message that has hundreds or thousands of digits; then RSA-encrypt that number.

pfortuny•8m ago
And pad! Padding for RSA is like CDM (?) for AES.
nayuki•38m ago
I have a different take on the same topic: https://www.nayuki.io/page/java-biginteger-was-made-for-rsa-...

My article isn't written as a step-by-step tutorial and doesn't come with example numbers. But mine fills in certain things that xnacly doesn't cover: random prime generation, efficiently calculating the decryption exponent d from (n, e) by using a modular inverse, using modular exponentiation instead of power-then-modulo.

By the way for Python, modular exponentiation is pow(x, y, m) (since 3.0), and modular inverse is pow(x, -1, m) (since 3.8, Oct 2019). https://docs.python.org/3/library/functions.html#pow

Founder of GitLab battles cancer by founding companies

https://sytse.com/cancer/
197•bob_theslob646•1h ago•48 comments

Linux is an interpreter

https://astrid.tech/2026/03/28/0/linux-is-an-interpreter/
70•frizlab•2h ago•6 comments

Further human + AI + proof assistant work on Knuth's "Claude Cycles" problem

https://twitter.com/BoWang87/status/2037648937453232504
19•mean_mistreater•33m ago•0 comments

AI overly affirms users asking for personal advice

https://news.stanford.edu/stories/2026/03/ai-advice-sycophantic-models-research
381•oldfrenchfries•5h ago•301 comments

I Built an Open-World Engine for the N64 [video]

https://www.youtube.com/watch?v=lXxmIw9axWw
254•msephton•7h ago•33 comments

I decompiled the White House's new app

https://thereallo.dev/blog/decompiling-the-white-house-app
186•amarcheschi•3h ago•59 comments

Spanish legislation as a Git repo

https://github.com/EnriqueLop/legalize-es
613•enriquelop•7h ago•187 comments

rpg.actor Game Jam

https://rpg.actor/jam
33•Kye•2h ago•3 comments

Cocoa-Way – Native macOS Wayland compositor for running Linux apps seamlessly

https://github.com/J-x-Z/cocoa-way
239•OJFord•9h ago•80 comments

Undroidwish – a single-file, batteries-included Tcl/Tk binary for many platforms

https://androwish.org/home/wiki?name=undroidwish
13•smartmic•2h ago•1 comments

CERN uses ultra-compact AI models on FPGAs for real-time LHC data filtering

https://theopenreader.org/Journalism:CERN_Uses_Tiny_AI_Models_Burned_into_Silicon_for_Real-Time_L...
251•TORcicada•11h ago•118 comments

C++26: A User-Friednly assert() macro

https://www.sandordargo.com/blog/2026/03/25/cpp26-user-friendly-assert
45•jandeboevrie•3d ago•22 comments

Folk are getting dangerously attached to AI that always tells them they're right

https://www.theregister.com/2026/03/27/sycophantic_ai_risks/
201•Brajeshwar•4h ago•150 comments

Circuit-level PDP-11/34 emulator

https://github.com/dbrll/ll-34
16•elvis70•2h ago•0 comments

Improved Git Diffs with Delta, Fzf and a Little Shell Scripting

https://nickjanetakis.com/blog/awesome-git-diffs-with-delta-fzf-and-a-little-shell-scripting
73•nickjj•4d ago•28 comments

Detecting file changes on macOS with kqueue

https://www.vegardstikbakke.com/kqueue/
8•benhoyt•3d ago•0 comments

StationeryObject

https://stationeryobject.com/archive/
25•NaOH•3d ago•1 comments

Go hard on agents, not on your filesystem

https://jai.scs.stanford.edu/
529•mazieres•18h ago•296 comments

Improving personal tax filing with Claude CLI and Obsidian

https://www.mrafayaleem.com/blog/improving-personal-tax-filing-with-claude-obsidian
3•iamspoilt•51m ago•2 comments

Toma (YC W24) is hiring a Senior/Staff Eng to build AI automotive coworkers

https://www.ycombinator.com/companies/toma/jobs/2lrQI7S-sr-staff-software-engineer
1•anthonykrivonos•7h ago

AMD's Ryzen 9 9950X3D2 Dual Edition crams 208MB of cache into a single chip

https://arstechnica.com/gadgets/2026/03/amds-ryzen-9-9950x3d2-dual-edition-crams-208mb-of-cache-i...
267•zdw•16h ago•147 comments

Paper Tape Is All You Need – Training a Transformer on a 1976 Minicomputer

https://github.com/dbrll/ATTN-11
98•rahen•3d ago•17 comments

The bee that everyone wants to save

https://naturalist.bearblog.dev/the-bee-that-everyone-wants-to-save/
221•nivethan•3d ago•77 comments

RSA and Python

https://xnacly.me/posts/2023/rsa/
12•ibobev•3d ago•7 comments

A single-file C allocator with explicit heaps and tuning knobs

https://github.com/xtellect/spaces
52•enduku•3d ago•37 comments

Make macOS consistently bad unironically

https://lr0.org/blog/p/macos/
491•speckx•23h ago•335 comments

Go Naming Conventions: A Practical Guide

https://www.alexedwards.net/blog/go-naming-conventions
72•yurivish•3d ago•45 comments

Arm releases first in-house chip, with Meta as debut customer

https://www.cnbc.com/2026/03/24/arm-launches-its-own-cpu-with-meta-as-first-customer.html
85•goplayoutside•3d ago•24 comments

Gerard of Cremona

https://en.wikipedia.org/wiki/Gerard_of_Cremona
25•teleforce•2d ago•13 comments

Anatomy of the .claude/ folder

https://blog.dailydoseofds.com/p/anatomy-of-the-claude-folder
568•freedomben•1d ago•243 comments