Bach's algorithm

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description Bach's algorithm is a probabilistic polynomial time algorithm for generating random numbers along with their factorizations. It was published by Eric Bach in 1988. No algorithm is known that efficiently factors random numbers, so the straightforward method, namely generating a random number and then factoring it, is impractical.[1]

The algorithm performs, in expectation, Template:Math primality tests. A simpler but less-efficient algorithm (performing, in expectation, Template:Math primality tests), is due to Adam Kalai.[2][3]

Bach's algorithm may be used as part of certain methods for key generation in cryptography.[4]

Overview

Bach's algorithm produces a number x uniformly at random in the range N/2<xN (for a given input N), along with its factorization. It does this by picking a prime number p and an exponent a such that paN, according to a certain distribution. The algorithm then recursively generates a number y in the range M/2<yM, where M=N/pa, along with the factorization of y. It then sets x=pay, and appends pa to the factorization of y to produce the factorization of x. This gives x with logarithmic distribution over the desired range; rejection sampling is then used to get a uniform distribution.[1][5]

References

Template:Reflist

Further reading

  • Bach, Eric. Analytic methods in the Analysis and Design of Number-Theoretic Algorithms, MIT Press, 1984. Chapter 2, "Generation of Random Factorizations", part of which is available online here.

Template:Algorithm-stub

  1. a b Script error: No such module "Citation/CS1".
  2. Script error: No such module "Citation/CS1".
  3. Script error: No such module "citation/CS1".
  4. Script error: No such module "citation/CS1".
  5. Script error: No such module "citation/CS1".