Probabilistic Analysis of JPV Prime Generation Algorithm and its Improvement

JPV 소수 생성 알고리즘의 확률적 분석 및 성능 개선

  • 박희진 (한양대학교 정보통신대학 정보통신학부 컴퓨터) ;
  • 조호성 (한양대학교 정보통신학과)
  • Published : 2008.02.15

Abstract

Joye et al. introduced a new prime generation algorithm (JPV algorithm hereafter), by removing the trial division from the previous combined prime generation algorithm (combined algorithm hereafter) and claimed that JPV algorithm is $30{\sim}40%$ faster than the combined algorithm. However, they only compared the number of Fermat-test calls, instead of comparing the total running times of two algorithms. The reason why the total running times could not be compared is that there was no probabilistic analysis on the running time of the JPV algorithm even though there was a probabilistic analysis for the combined algorithm. In this paper, we present a probabilistic analysis on the running time of the JPV algorithm. With this analytic model, we compare the running times of the JPV algorithm and the combined algorithm. Our model predicts that JPV algorithm is slower than the combined algorithm when a 512-bit prime is generated on a Pentium 4 system. Although our prediction is contrary to the previous prediction from comparing Fermat-test calls, our prediction corresponds to the experimental results more exactly. In addition, we propose a method to improve the JPV algorithm. With this method, the JPV algorithm can be comparable to the combined algorithm with the same space requirement.

Joye와 연구자들은 기존의 조합 소수 판단 검사에서 trial division 과정을 제거한 새로운 소수 생성 알고리즘 (이하 JPV 알고리즘)을 제시하였으며, 이 알고리즘이 기존의 조합 소수 생성 알고리즘에 비해 $30{\sim}40%$ 정도 빠르다고 주장하였다. 하지만 이 비교는 전체 수행시간이 아닌 Fermat 검사의 호출 횟수만을 비교한 것으로 정확한 비교와는 거리가 있다. 기존의 조합 소수 생성 알고리즘에 대해 이론적인 수행시간 예측 방법이 있음에도 불구하고 두 알고리즘의 전체 수행시간을 비교할 수 없었던 이유는 JPV 알고리즘에 대한 이론적인 수행 시간 예측 모델이 없었기 때문이다. 본 논문에서는 먼저 JPV 알고리즘을 확률적으로 분석하여 수행시간 예측 모델을 제시하고, 이 모델을 이용하여 JPV 알고리즘과 기존의 조차 소수 생성 알고리즘의 전체 수행시간을 비교한다. 이 모델을 이용하여 펜티엄4 시스템에서 512비트 소수의 생성 시간을 예측해 본 결과 Fermat 검사의 호출 횟수를 이용한 비교와는 달리 JPV 알고리즘이 기존의 조합 소수 생성 알고리즘보다 느리다는 결론을 얻었다. 이러한 이론적인 분석을 통한 비교는 실제 동일한 환경에서 실험을 통해서 검증되었다. 또한, 본 논문에서는 JPV 알고리즘의 성능 개선 방법을 제시한다. 이 방법을 사용하여 JPV 알고리즘을 개선하면 동일한 공간을 사용할 경우에 JPV 알고리즘이 기존의 조합 소수 생성 알고리즘과 비슷한 성능을 보인다.

Keywords

References

  1. R.L. Rivest, A. Shamir and L. Adleman, A method for obtaining digital signatures an public-key cryptosystems, Communications of the ACM 21(2) pp. 120-126 (1978) https://doi.org/10.1145/359340.359342
  2. T. ElGmal, A public key cryptosystem and a signature scheme based on discrete logarithms, IEEE Transactions on Information Theory 31(4), pp. 469-472 (1985) https://doi.org/10.1109/TIT.1985.1057074
  3. W. Diffie and M.E. Hellman, New directions in cryptography, IEEE transactions on Information Theory, 22(6), pp. 644-654 (1976) https://doi.org/10.1109/TIT.1976.1055638
  4. IEEE P1363: Standard for Public-Key Cryptography (2000
  5. N. Koblitz, A Course in Number Theory and Cryptography, Berlin: Springer (1987)
  6. Public-Key Cryptography Standards, PKCS #1 RSA Cryptography Standard
  7. National Institute for Standards and Technology, Digital Signature Standard(DSS), Fedral Register 56 169 (1991)
  8. nternational Organization for Standard, ISO/IEC 18032: Prime Number Generation (2005)
  9. T.H. Cormen, C.E. Leiserson, R.L. Rivest and C. Stein, Introduction to Algorithms, 2nd ed, MIT press (1991)
  10. H.C. Pocklington, The determination of the prime or composite nature of large numbers by Fermat's theorem, Proc. of the Cambridge Philosophical Society 18, pp. 29-30 (1914)
  11. A.O.L. Atkin and F. Morain, Elliptic curves and primality proving, Mathematics of Computation 61, pp. 29-63 (1993) https://doi.org/10.1090/S0025-5718-1993-1199989-X
  12. W. Bosma and M.P. van der Hulst, Faster primality testing, CRYPTO'89, LNCS 435, pp. 652-656 (1990)
  13. U.M. Maurer, Fast Generation of Prime Numbers and Secure Public-Key Cryptographic Parameters, Journal of Cryptology 8(3), pp. 123-155 (1995)
  14. J. Shawe-Taylor, Generating strong primes, Electronics Letters 22(16), pp. 875-877 (1986) https://doi.org/10.1049/el:19860598
  15. A.J. Menezes, P.C. van Oorschot, and S.A. Vanstone, Handbook of Applied Cryptography, CRC Press, (1997)
  16. G.L. Miller, Riemann's Hypothesis and Tests for Primality, Journal of Computer Systems Science 13(3), pp. 300-317 (1976) https://doi.org/10.1016/S0022-0000(76)80043-8
  17. M.O. Rabin, Probabilistic Algorithm for Primality Testing, Journal of Number Theory 12, pp. 128- 138 (1980) https://doi.org/10.1016/0022-314X(80)90084-0
  18. R. Solovay and V. Strassen, A fast Monte-Carlo test for primality, SIAM Journal on Computing 6, pp. 84-85 (1977) https://doi.org/10.1137/0206006
  19. J. Grantham, A probable prime test with high confidence, Journal of Number Theory 72, pp. 32- 47 (1998) https://doi.org/10.1006/jnth.1998.2247
  20. D.J. Lehmann, On primality tests, SIAM Journal of Computing 11(2), pp. 374-375 (1982) https://doi.org/10.1137/0211029
  21. R.D. Carmichael, On composite numbers P which satisfy the Fermat congruence $a^{P-1}\equiv1$ (mod P), Amer. Math. Monthly 19, pp. 22-27, 1912 https://doi.org/10.2307/2972687
  22. OpenSSL, http://openssl.org/
  23. C. Pomerance, On the Distribution of Pseudoprimes, Mathematics of Computation, 37(156), pp. 128-138, 1981
  24. M. Joye, P. Paillier, and S. Vaudenay, Efficient Generation of Prime Numbers, CHES 2000, LNCS 1965, pp. 340-354 (2000)
  25. H. Riesel, Prime numbers and computer methods for factorization, Boston, Basel, Stuttgart: Birkhauser, (1985)
  26. The GNU Crypto project, http://www.gnu.org/software/ gnu-crypto/