Computing A*B (mod N) efficiently in ANSI C

  • Authors:
  • Henry G. Baker

  • Affiliations:
  • -

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

Abstract

The modular product computation A*B (mod N) is a bottleneck for some public-key encryption algorithms, as well as many exact computations implemented using the Chinese Remainder Theorem. We show how to compute A*B (mod N) efficiently, for single-precision A, B, and N, on a modern RISC architecture (Intel 80860) in ANSI C. On this architecture, our method computes A*B (mod N) faster than ANSI C computes A%N, for unsigned longs A and N.