• Title/Summary/Keyword: primality test

Search Result 12, Processing Time 0.014 seconds

Square-and-Divide Modular Exponentiation (제곱-나눗셈 모듈러 지수연산법)

  • Lee, Sang-Un
    • Journal of the Korea Society of Computer and Information
    • /
    • v.18 no.4
    • /
    • pp.123-129
    • /
    • 2013
  • The performance and practicality of cryptosystem for encryption, decryption, and primality test are primarily determined by the implementation efficiency of the modular exponentiation of $a^b$ (mod m). To compute $a^b$ (mod m), the standard binary squaring (square-and-multiply) still seems to be the best choice. However, in large b bits, the preprocessed n-ary, ($n{\geq}2$ method could be more efficient than binary squaring method. This paper proposes a square-and-divide and unpreprocessed n-ary square-and-divide modular exponentiation method. Results confirmed that the square-and-divide method is the most efficient of trial number in a case where the value of b is adjacent to $2^k+2^{k-1}$ or to. $2^{k+1}$. It was also proved that for b out of the beforementioned range, the unpreprocessed n-ary square-and-divide method yields higher efficiency of trial number than the general preprocessed n-ary method.

Probabilistic Analysis of JPV Prime Generation Algorithm and its Improvement (JPV 소수 생성 알고리즘의 확률적 분석 및 성능 개선)

  • Park, Hee-Jin;Jo, Ho-Sung
    • Journal of KIISE:Computer Systems and Theory
    • /
    • v.35 no.2
    • /
    • pp.75-83
    • /
    • 2008
  • 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.