Discussion
Loading...

#Tag

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Hacker News
Hacker News
@h4ckernews@mastodon.social  ·  activity timestamp 5 days ago

Faster Practical Modular Inversion

https://purplesyringa.moe/blog/faster-practical-modular-inversion/

#HackerNews #Faster #Modular #Inversion #Practical #Algorithms #Cryptography #Tech #News

purplesyringa's blog

Faster practical modular inversion

Last year, Lemire wrote about an optimized variation of the Euclidean algorithm for computing the greatest common divisor of two numbers, called binary Euclidean algorithm or Stein’s algorithm. It’s a best-of-class implementation, though it’s currently only used by libc++. The post also briefly mentions the extended Euclidean algorithm, a related algorithm most often used to compute the modular multiplicative inverse (given a remainder a and a modulus m , find x such that a ⋅ x mod m = 1 ): There is also a binary version of the extended Euclidean algorithm[,] although it is quite a bit more involved and it is not clear that it […] can be implemented at high speed, leveraging fast instructions, when working on integers that fit in general-purpose registers. […] My implementation of the binary extended Euclidean algorithm is quite a bit slower and not recommended. I expect that it should be possible to optimize it further. That’s a big shame, because the extended Euclidean algorithm can be optimized in a very similar manner, and the underlying ideas were described in a 2020 paper. It’s probably not well-known because the paper focuses on constant-time evaluation and long arithmetic, so people might have assumed it’s irrelevant. I’m hoping to bring justice to the extended Stein’s algorithm with this post. I’ll cover how the algorithm works, its limitations, some optimizations compared to Pornin’s paper, and potential further improvements. My implementation is available on GitHub as part of a Rust modular arithmetic library.
  • Copy link
  • Flag this post
  • Block
Jona
Jona
@_jona@freiburg.social  ·  activity timestamp 2 months ago

Einer der schönsten Aussichtspunkte des Südschwarzwalds für einen beeindruckenden Alpenblick ist und bleibt der Belchen (1414m) - die zweitletzte, größere Erhebung Richtung Süden gesehen.

Auch wenn ich diesen Berg schon unzählige Male - sowohl mit Wanderschuhen als auch mit Touren-Ski, bestiegen habe, ist es immer wieder aufs Neue ein Erlebnis - das richtige Wetter vorausgesetzt.
Wenn man sich dann noch einen Tag herauspickt, an dem die Belchenbahn Revision hat, hält es sich mit dem Andrang auf dem Gipfel auch in Grenzen.

Das Foto entstand vor fast einem Jahr im Dezember, als noch kein Schnee lag und eine Inversionswetterlage Traumblicke in alle Richtungen gewährte.

Mehr Fotos: https://beyondshatteredmoments.de/2024/12/10/belchen-1414m-2/

#throwback #belchen #südschwarzwald #schwarzwald #blackforest #hiking #öffis #öffitour #wandern #alpenblick #inversion #nature #naturelover #mountains #mountainlover

Zu sehen ist im Vordergrund eine Wiesenhang mit vereinzelnden Nadelbäumen, der nach und nach in bewaldete, tieferliegende Täler sowie Berge übergeht. Im Hintergrund ist Nebel in der Ebene zu sehen, dahinter ragt ein Hochgebirge in den blauen Himmel empor.
Zu sehen ist im Vordergrund eine Wiesenhang mit vereinzelnden Nadelbäumen, der nach und nach in bewaldete, tieferliegende Täler sowie Berge übergeht. Im Hintergrund ist Nebel in der Ebene zu sehen, dahinter ragt ein Hochgebirge in den blauen Himmel empor.
Zu sehen ist im Vordergrund eine Wiesenhang mit vereinzelnden Nadelbäumen, der nach und nach in bewaldete, tieferliegende Täler sowie Berge übergeht. Im Hintergrund ist Nebel in der Ebene zu sehen, dahinter ragt ein Hochgebirge in den blauen Himmel empor.
  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-alpha.41 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct