• Title/Summary/Keyword: Probabilistic primality test

Search Result 5, Processing Time 0.018 seconds

A study on effective primality test algorithms (효율적 소수성 검정 알고리즘들에 대한 비교ㆍ분석)

  • 이호정;송정환
    • Proceedings of the Korea Institutes of Information Security and Cryptology Conference
    • /
    • 2003.12a
    • /
    • pp.299-306
    • /
    • 2003
  • 본 논문에서는 현재 사용되고 있는 소수성 검정 알고리즘의 효율성을 비교하여 효과적인 알고리즘 사용에 관한 방향을 제시하려 한다. 현재 가장 일반적으로 사용하고 있는 Miller-Rabin 소수성검정법(Miller-Rabin primality test)에 대하여, Miller-Rabin 소수성 검정법 이외에 다른 확률적 소수성 검정법으로 제안된 Frobenius-Grantham 소수성 검정법(Frobenius-Grantham primality test) 이 있다. 그러나 합성수 판별에 대한 확률적 우세함에도 불구하고, Miller-Rabin 소수성 검정법을 대체하고 있지 못하는 이유는 시간복잡도(time complexity)가 Randomized polynomial time이기 때문에 같은 확률에 대한 평균 실행 속도가 Miller-Rabin 소수성 검정법보다 크게 효율적이지 못하기 때문이다. 또한, 2002년 Manindra Agrawal이 제시한 AKS 알고리즘(AKS algorithm)은 최초의 다항식 시간내 결정적 소수성 검정법(Polynomial time deterministic primality test)이지만, 시간 복잡도에서 다항식의 차수가 높기 때문에 현재 사용되고 있는 확률적 소수성 검정법(Probabilistic primality test)을 대체하지 못할 것으로 사료된다. 본 논문에서는 최근 발표된 소수성 검정법인 Frobenius-Grantham 소수성 검정법, AKS 알고리즘과 기존의 Miller-Rabin 소수성 검정법의 장단점을 비교·분석해 보고자 한다.

  • PDF

The Primality Test (소수 판별법)

  • Lee, Sang-Un;Choi, Myeong-Bok
    • Journal of the Korea Society of Computer and Information
    • /
    • v.16 no.8
    • /
    • pp.103-108
    • /
    • 2011
  • Generally, Miller-Rabin method has been the most popular primality test. This method arbitrary selects m at k-times from m=[2, n-1] range and (m,n)=1. Miller-Rabin method performs $k{\times}r$ times and reports prime as $m^d\;{\equiv}\;1(mod\;n)$ or $m^{2^rd}\;{\equiv}\;-1(mod n)$ such that n-1=$2^sd$, $0\;{\leq}\;r\;{\leq}\;s-1$. This paper suggests more simple primality test than Miller-Rabin method. This test method computes c=$p^{\frac{n-1}{2}}(mod\;n)$ for k times and reports prime as c=-1. The proposed primality test method reduces $k{\times}r$ times of Miller-Rabin method to k times.

A Step-by-Step Primality Test (단계적 소수 판별법)

  • Lee, Sang-Un
    • The Journal of the Institute of Internet, Broadcasting and Communication
    • /
    • v.13 no.3
    • /
    • pp.103-109
    • /
    • 2013
  • Miller-Rabin method is the most prevalently used primality test. However, this method mistakenly reports a Carmichael number or semi-prime number as prime (strong lier) although they are composite numbers. To eradicate this problem, it selects k number of m, whose value satisfies the following : m=[2,n-1], (m,n)=1. The Miller-Rabin method determines that a given number is prime, given that after the computation of $n-1=2^sd$, $0{\leq}r{\leq}s-1$, the outcome satisfies $m^d{\equiv}1$(mod n) or $m^{2^rd}{\equiv}-1$(mod n). This paper proposes a step-by-step primality testing algorithm that restricts m=2, hence achieving 98.8% probability. The proposed method, as a first step, rejects composite numbers that do not satisfy the equation, $n=6k{\pm}1$, $n_1{\neq}5$. Next, it determines prime by computing $2^{2^{s-1}d}{\equiv}{\beta}_{s-1}$(mod n) and $2^d{\equiv}{\beta}_0$(mod n). In the third step, it tests ${\beta}_r{\equiv}-1$ in the range of $1{\leq}r{\leq}s-2$ for ${\beta}_0$ > 1. In the case of ${\beta}_0$ = 1, it retests m=3,5,7,11,13,17 sequentially. When applied to n=[101,1000], the proposed algorithm determined 96.55% of prime in the initial stage. The remaining 3% was performed for ${\beta}_0$ >1 and 0.55% for ${\beta}_0$ = 1.

Proposal and Analysis of Primality and Safe Primality test using Sieve of Euler (오일러체를 적용한 소수와 안전소수의 생성법 제안과 분석)

  • Jo, Hosung;Lee, Jiho;Park, Heejin
    • Journal of IKEEE
    • /
    • v.23 no.2
    • /
    • pp.438-447
    • /
    • 2019
  • As the IoT-based hyper-connected society grows, public-key cryptosystem such as RSA is frequently used for encryption, authentication, and digital signature. Public-key cryptosystem use very large (safe) prime numbers to ensure security against malicious attacks. Even though the performance of the device has greatly improved, the generation of a large (safe)prime is time-consuming or memory-intensive. In this paper, we propose ET-MR and ET-MR-MR using Euler sieve so it runs faster while using less memory. We present a running time prediction model by probabilistic analysis and compare time and memory of our method with conventional methods. Experimental results show that the difference between the expected running time and the measured running time is less than 4%. In addition, the fastest running time of ET-MR is 36% faster than that of TD-MR, 8.5% faster than that of DT-MR and the fastest running time of ET-MR-MR is 65.3% faster than that of TD-MR-MR and similar to that of DT-MR-MR. When k=12,381, the memory usage of ET-MR is 2.7 times more than that of DT-MR but 98.5% less than that of TD-MR and when k=65,536, the memory usage of ET-MR-MR is 98.48% less than that of TD-MR-MR and 92.8% less than that of DT-MR-MR.

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.