The strong Lucas test is a widely used probabilistic primality test in cryptographic libraries. When combined with the Miller-Rabin primality test, it forms the Baillie-PSW primality test, known for its absence of false positives, undermining the relevance of a complete understanding of the strong Lucas test. In primality testing, the worst-case error probability serves as an upper bound on the likelihood of incorrectly identifying a composite as prime. For the strong Lucas test, this bound is $4/15$ for odd composites, not products of twin primes. On the other hand, the average-case error probability indicates the probability that a randomly chosen integer is inaccurately classified as prime by the test. This bound is especially important for practical applications, where we test primes that are randomly generated and not generated by an adversary. The error probability of $4/15$ does not directly carry over due to the scarcity of primes, and whether this estimate holds has not yet been established in the literature. This paper addresses this gap by demonstrating that an integer passing $t$ consecutive test rounds, alongside additional standard tests of low computational cost, is indeed prime with a probability greater than $1-(4/15)^t$ for all $t\geq 1$. Furthermore, we introduce error bounds for the incremental search algorithm based on the strong Lucas test, as there are no established bounds up to date as well. Rather than independent selection, in this approach, the candidate is chosen uniformly at random, with subsequent candidates determined by incrementally adding 2. This modification reduces the need for random bits and enhances the efficiency of trial division computation further.
翻译:强卢卡斯检验是密码学库中广泛使用的概率性素性检验方法。当与米勒-拉宾素性检验结合时,它构成了贝利-PSW素性检验,该检验因未出现误报案例而闻名,这也降低了对强卢卡斯检验进行全面理解的相关性。在素性检验中,最坏情况误差概率是错误地将合数识别为素数的可能性上界。对于强卢卡斯检验,该上界对非孪生素数乘积的奇合数为$4/15$。另一方面,平均情况误差概率表示随机选取的整数被该检验错误分类为素数的概率。这个界对于实际应用尤为重要,因为在实际中我们检验的是随机生成而非由对手生成的素数。由于素数的稀疏性,$4/15$的误差概率并不能直接推广,且该估计是否成立在现有文献中尚未得到证实。本文通过证明:对于所有$t\geq 1$,一个整数若能通过$t$轮连续检验轮次,并辅以计算成本较低的标准附加测试,则该整数确为素数的概率大于$1-(4/15)^t$,从而填补了这一空白。此外,我们提出了基于强卢卡斯检验的增量搜索算法的误差界,因为迄今为止该领域同样缺乏已确立的界值。与独立选取候选数不同,在此方法中,候选数首先均匀随机选取,后续候选数则通过逐次加2的方式确定。这种改进减少了对随机比特的需求,并进一步提升了试除法计算的效率。