Re: primality



Sebastian Gottschalk <seppi@xxxxxxxxx> (07-04-02 00:08:40):

Normally one would do some quick fermat tests to get a high
probability, and the contrary being proven when the RSA or whatever
crypto scheme fails to work properly.

Rabin-Miller is for ensuring corner cases like Carmichael numbers,
which are unlikely to occur if the number was generated randomly.


Trying whether RSA works is equivalent to Fermat's test. Doing Fermat
tests alone is discouraged. Yes, Carmichael numbers are seldom, but
consider this: Since a Miller-Rabin employs two modular
exponentiations, where Fermat employs only one, a Fermat interation is
twice as fast as a Miller-Rabin iteration.

But on the other hand, each Miller-Rabin iteration with a negative (i.e.
not composite) result lowers the probability of the number being
composite by a factor of 4, where Fermat lowers it only by 2. And as an
extra, it does detect Carmichael numbers.


Regards,
Ertugrul Söylemez.


--
From the fact that this CGI program has been written in Haskell, it
follows naturally that this CGI program is perfectly secure.
.



Relevant Pages

  • Re: primality
    ... probability, and the contrary being proven when the RSA or whatever ... Trying whether RSA works is equivalent to Fermat's test. ... Doing Fermat ... the chance of a composite passing one round is less than 1/4. ...
    (sci.crypt)
  • Re: primality
    ... crypto scheme fails to work properly. ... Trying whether RSA works is equivalent to Fermat's test. ... If you're accidentially using a Carmichael number instead of a prime, ... RSA fails with a high probability ). ...
    (sci.crypt)
  • Re: primality
    ... Don't Carmichael numbers show that it is false? ... Maybe it's just a sloppy statement: The *mean* probability is indeed ... RSA works just fine if one of the "primes" you picked ... RSA works iff m is square-free and for every ...
    (sci.crypt)
  • Re: -- f(k) = k^(n-1) (mod n)
    ... recasting it as an iff criterion for Carmichael ... prime or n is a Carmichael number. ... Then fis congruent to 0 modulo p unless p - 1 divides n. ... the probability that g ...
    (sci.math)
  • Re: -- f(k) = k^(n-1) (mod n)
    ... recasting it as an iff criterion for Carmichael ... prime or n is a Carmichael number. ... Then fis congruent to 0 modulo p unless p - 1 divides n. ... the probability that g ...
    (sci.math)

Quantcast