Next Article in Journal
EFKG: An Efficient and Fine-Grained Access Control Encrypted Knowledge Graph
Previous Article in Journal
A Closed-Form Hamming-Weight Variance Formula for Cyclic LCD Codes in Orthogonal Direct Sum Masking
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Dynamic Scaling Pollard’s P-1 Algorithm

School of Cyber Science and Engineering, Shanghai Jiao Tong University, Shanghai 200240, China
*
Authors to whom correspondence should be addressed.
Cryptography 2026, 10(4), 57; https://doi.org/10.3390/cryptography10040057
Submission received: 14 June 2026 / Revised: 23 July 2026 / Accepted: 29 July 2026 / Published: 13 August 2026

Abstract

The integer factorization problem is a hard problem in classical. Let N = P Q , where P and Q are large primes. Pollard’s P-1 Algorithm is an efficient integer factorization algorithm while all the prime factors of P 1 are small. However, the previous variants of Pollard’s P-1 algorithms require a strict bound on the prime factors, and the running time depends on the bound instead of the actual size of prime factors, which is undesirable. This paper firstly designs a dynamic scaling version of Pollard’s P-1 Algorithm (abbreviate as DSP ) to solve this problem and also accelerate the algorithm’s efficiency by applying a fast multiplication method to it. Additionally, DSP saves the cost in computing the product of prime factors with high enough exponent by repeatedly using product of primes with low exponent. We also give the complexity analysis for our proposed algorithm and the latest published variant of Pollard’s P-1 Algorithm named IPP1 (Kritsanapong Somsuk, Symmetry). Moreover, we give a theoretical comparison between IPP1 and our algorithm. In particular, we show that our algorithm costs less than IPP1 in more than 95% while in IPP1 the bound of prime factors of P-1 is set to at least 64. Additionally, we also test several instances in factoring 1024-bit integers N = P Q in experiment. We firstly construct the P 1 as a product of several randomly generated 30-bit numbers to ensure its solvability by the Pollard’s P-1 Algorithm, then test four variants of Pollard’s P-1 Algorithm. The experimental result shows that our algorithm is most efficient among them. Its efficiency improvement performs more apparently while the exponent of a prime factor in P 1 is large. In factoring 1024-bit integer, our algorithm solves it nearly 23.5 times faster than IPP1, 16.4 times faster than the Original Pollard’s P-1 Algorithm (J. M. Pollard, MPCPS), 35.6 times faster than the trivial Pollard’s P-1 Algorithm (D. Bishop, Introduction to cryptography with Java applets).

1. Introduction

The security of RSA [1] relies heavily on the computational difficulty of integer factorization. While general-purpose algorithms like the number field sieve (NFS) [2] exist, special-purpose methods are often more efficient for specific moduli. Notably, when a prime factor P of the RSA modulus N = P Q has a “smooth” P 1 (i.e., consisting entirely of small prime factors), Pollard’s P-1 algorithm [3] is frequently employed. Based on Fermat’s Little Theorem [4] (i.e., [ a P 1 ] P 1 ), the algorithm iteratively evaluates gcd ( [ a z 1 ] N , N ) for a chosen base a (e.g., a = 2 ), where the exponent z is constructed from all small primes up to a predefined smoothness bound B. If z is a multiple of P 1 , we have gcd ( [ a z 1 ] N , N ) = P , thereby factoring N. However, its running time depends entirely on the largest prime factor of P 1 , reaching a worst-case complexity of O ( P ) .
Several variants have attempted to optimize this process. A trivial version proposed by Bishop [5] iteratively tests exponent factorials (i.e., let z = x ! for an increasing integer x). While effective in theory, evaluating x ! heavily over-computes the necessary prime powers, resulting in massive inefficiency. More recently, Somsuk [6] proposed I P P 1 , which first computes the product of all primes up to a smoothness bound B (i.e., y = p i B p i ) and performs modular exponentiation up to z = y u max , where u max is a given upper bound on the exponents. However, I P P 1 becomes highly inefficient if even a single prime factor of P 1 possesses a large exponent. Furthermore, both the original algorithm and I P P 1 require a predefined smoothness bound B. Choosing an optimal B beforehand is practically difficult: an overly small B guarantees failure, while an overly large B wastes significant computational time.

1.1. Our Contributions

To overcome the limitations of prior methods, this paper proposes novel algorithmic improvements. The remainder of the paper is organized to detail these contributions as follows. Section 2 introduces the basic notations and preliminaries. In Section 3, we present our primary contribution, the Dynamic Scaling Pollard’s P-1 algorithm ( DSP ) (Section 3.1). By employing a dynamic traversal order, DSP systematically enumerates prime factors and their exponents without relying on a predetermined smoothness bound. This progressive scaling and continuous reuse of prior prime products drastically reduce redundant modular exponentiations while ensuring full coverage of potential prime factors. This section subsequently provides formal cost estimators and theoretical complexity analyses for both DSP and I P P 1 (Section 3.3). Furthermore, to efficiently evaluate the massive prime products required during execution, Section 4.1 introduces a novel Fast Multiplication (FM) method. We provide theoretical cost estimators and complexity analyses for both FM and the normal multiplication (NM) method (Section 4.2). A comprehensive theoretical and experimental comparison (Section 4.3) confirms the necessity of FM, demonstrating that NM incurs a time overhead 2 n + 1 n 2 times higher than our FM approach. To substantiate our approach, Section 5 conducts a detailed theoretical cost analysis and an empirical experimental comparison among four implemented variants of Pollard’s P-1 algorithm. We provide a comprehensive complexity analysis proving that DSP achieves strictly lower computational costs than the state-of-the-art I P P 1 algorithm in over 95% of cases (provided B > 64 ). We implemented and evaluated DSP alongside three prior variants on 1024-bit moduli (https://github.com/Summwer/expemeriment_of_pollardpm1, accessed on 1 August 2026). The experimental results robustly validate our theoretical estimators and highlight DSP ’s superiority when prime factors have high exponents (see Figure 1). Specifically, DSP operates 23.5×, 16.4×, and 35.6× faster than I P P 1 [6], the original algorithm [3], and the trivial variant [5], respectively.

1.2. Technical Overview

1.2.1. Dynamic Scaling Pollards P-1 Algorithm

DSP (Algorithm 4) dynamically constructs the target exponent by partitioning prime candidates into disjoint intervals P j = p ( 2 2 j 1 , 2 2 j ] p is prime . For  1 j < k 0 (initialized with P 1 , 1 = 2 ), it computes P j , 2 = p P j p and recursively generates the exponent P j = P j , 1 P j , 2 , updating P j + 1 , 1 = P j , 1 P j . This yields P j = P j , 2 · i = 0 j 1 P i , 2 2 j i 1 , efficiently raising smaller primes to exponentially growing powers. By computing b [ b P j ] N , DSP minimizes redundant modular exponentiations through the systematic reuse of earlier products. For the final subset P k 0 , where any prime exponent is at most 1, DSP bypasses deep recursion and finishes purely via shift modular exponentiation.

1.2.2. Fast Multiplication (FM)

Furthermore, to efficiently evaluate massive products without introducing intolerable computational bottlenecks, we integrate our FM method. Let L = ( x 1 , , x k ) be an ascending list of integers defined in Section 2. Unlike NM, which computes the product linearly and accumulates unbalanced bit-lengths, FM employs a symmetric divide-and-conquer strategy. In each iteration, FM generates a new, halved sequence by pairing and multiplying elements from opposite ends, i.e., L ( x 1 · x k , x 2 · x k 1 , , x k / 2 · x k / 2 + 1 ) . Repeat until only a single element remains. FM ensures that intermediate 1556 products maintain strictly balanced bit-lengths at each depth of the multiplication tree. This hierarchical reduction drastically minimizes the overall asymptotic bit-complexity.

2. Preliminaries

2.1. Notations and Basic Definitions

Let Z denote the set of integers. For a positive integer Y, we denote the reduction of X ( ( mod Y ) ) by [ X ] Y (i.e., 0 [ X ] Y < Y ). Let N = P Q be an RSA modulus, where P and Q are two large distinct primes. Denote n N = log 2 N + 1 as the bit-length of the modulus N. Recovering P and Q given N is known as the Integer Factorization Problem( IFP ). To ensure the hardness of the IFP in cryptographic applications, P and Q are typically required to be of approximately equal bit-length. Under this condition, when P and Q are sufficiently large, no classical polynomial-time algorithm is currently known to solve the IFP . Let ϕ ( N ) = ( P 1 ) ( Q 1 ) denote Euler’s totient function. To facilitate our subsequent complexity analysis, we recall the Prime Number Theorem [7]: the prime-counting function π ( x ) , which denotes the number of primes less than or equal to x, satisfies π ( x ) x ln x .
Although the IFP is generally hard, special-purpose factoring algorithms (such as Pollard’s P-1) can efficiently factor N if the prime factors possess specific algebraic weaknesses. The most prominent weakness exploited by these algorithms is the smoothness of P 1 . Formally, this property is defined as follows:
Definition 1
(B-Smooth Number). A B-smooth number is a positive integer whose prime factors are all less than or equal to B.
Following standard cryptographic settings, we assume the prime factors P and Q have a balanced bit-length n N / 2 . Let k 0 = log 2 ( n N / 2 1 ) . To ensure that the prime Q is strictly resistant to our algorithm, we assume that the largest prime factor of Q 1 strictly exceeds 2 2 k 0 1 .
To formally characterize the vulnerability of the prime factor P, we first consider its odd part P div = ( P 1 ) / 2 , since P 1 is inherently even. Let p k denote the k-th prime number globally. Let γ be the input smoothness bound (which defaults to the theoretical maximum 2 n N / 2 1 ). We define P = { p ( 0 , γ ] p is prime } = { p 1 , p 2 , , p t } as the complete list of consecutive primes up to γ , where p k denotes the k-th prime globally. Assuming P div is γ -smooth, we let u i 0 denote the actual exponent of any prime candidate p i P in its factorization. We can express this prime factorization compactly as P div = i = 1 s p σ i u σ i . Here, u σ i 1 denotes the actual exponent of the prime factor p σ i , and the indices satisfy 1 σ 1 < σ 2 < < σ s t (where t = | P | ). Define e i Z + as the explicit upper bound of this exponent, computed as e i = n N / 2 1 log 2 p i . Since P div < 2 n N / 2 1 , this naturally guarantees e i log p i P div u i . Define the maximum actual exponent as u max = max 1 i s u σ i , and the largest prime power factor as R = max 1 i s p σ i u σ i = p σ max u σ max , where σ max [ 1 , s ] is the index achieving this maximum. For any positive integer z, let bit ( z ) = log 2 z + 1 denote its bit-length. For each prime p i P , let n i = bit ( p i ) denote its specific bit-length. Finally, to align with our dynamic scaling strategy, we partition P into k 0 disjoint subsets, explicitly bounded by γ , denoted as P j = { p P 2 2 j 1 < p min ( γ , 2 2 j ) } for j = 1 , 2 , , k 0 . Let L ( p , n 1 , n 2 ) be an ascending list of integers where each element x [ 2 n 1 , 2 n 2 ) Z is selected independently with probability p ( 0 , 1 ] . For brevity, we denote this list as L, and define L ( p , n ) : = L ( p , 0 , n ) .
Lemma 1.
The expected structural bit-size of the product of all elements in L ( p , n 1 , n 2 ) is
bit LM ( p , n 1 , n 2 ) = p 2 n 2 ( n 2 1 ) 2 n 1 ( n 1 1 ) .
If ( p , n 1 , n 2 ) = 1 n ln 2 , 0 , n , we can obtain that bit LMP ( n ) : = bit LM 1 n ln 2 , 0 , n = ( n 1 ) 2 n + 1 n ln 2 .
Proof. 
Let I x { 0 , 1 } be the indicator variable for x L , with expectation E [ I x ] = p . In practical arbitrary-precision arithmetic, the upper bound of the bit-size of a product is exactly the sum of the discrete bit-lengths of all operands. For any integer x [ 2 k 1 , 2 k 1 ] , its exact bit-length is k.
Given that the elements in list L are bounded in the range [ 2 n 1 , 2 n 2 1 ] , this range can be partitioned into subsets of exactly k-bit integers for n 1 + 1 k n 2 . The amount of k-bit positive integers in each subset is 2 k 2 k 1 = 2 k 1 .
By linearity of expectation, the expected total structural bit-length is:
E x Ω I x · length ( x ) = p k = n 1 + 1 n 2 k · 2 k 1 .
Using the arithmetico-geometric sequence summation formula k = 1 N k 2 k 1 = ( N 1 ) 2 N + 1 , we evaluate the bounded sum:
k = n 1 + 1 n 2 k 2 k 1 = ( n 2 1 ) 2 n 2 + 1 ( n 1 1 ) 2 n 1 + 1 = 2 n 2 ( n 2 1 ) 2 n 1 ( n 1 1 ) .
Substituting this back yields bit LM ( p , n 1 , n 2 ) = p 2 n 2 ( n 2 1 ) 2 n 1 ( n 1 1 ) .    □
Having established the expected bit-size of the prime products, we proceed to analyze the cumulative computational overhead of our dynamic strategy across multiple iterations. If we model the scale of the operand at the i-th iteration as a linear progression A i + B , evaluating the total cost inherently involves summations of the form ( A i + B ) log ( A i + B ) . By approximating this discrete summation with continuous integration, we deduce the following asymptotic bound:
Lemma 2.
i = 1 n ( A i + B ) log ( A i + B ) ) 1 2 A n 2 + B n + B 2 A · log ( A n + B ) 1 2 A + B B 2 A log ( A + B ) log e 4 A ( A n + B ) 2 + log e 4 A ( A + B ) 2
Proof. 
i = 1 n ( A i + B ) log ( A i + B ) 1 n ( A x + B ) log ( A x + B ) d x .
1 n ( A x + B ) log ( A x + B ) d x = 1 n log ( A x + B ) d 1 2 A x 2 + B x = 1 2 A x 2 + B x · log ( A x + B ) 1 n 1 n 1 2 A x 2 + B x d log ( A x + B ) = 1 2 A n 2 + B n · log ( A n + B ) 1 2 A + B log ( A + B ) 1 n 1 2 A x 2 + B x · log e A x + B d ( A x + B ) = u = A x + B 1 2 A n 2 + B n · log ( A n + B ) 1 2 A + B log ( A + B ) A + B A n + B log e 2 A u B 2 log e A · 1 u d u = 1 2 A n 2 + B n · log ( A n + B ) 1 2 A + B log ( A + B ) log e 4 A u 2 A + B A n + B + B 2 log e A · ln u A + B A n + B = 1 2 A n 2 + B n + B 2 A · log ( A n + B ) 1 2 A + B B 2 A log ( A + B ) log e 4 A ( A n + B ) 2 + log e 4 A ( A + B ) 2 .
   □

2.2. Complexity Analysis of Basic Operations

The size of inputting integers will affect the complexity of basic operations while the integer is large. Thus, we list the complexity of basic operations in this Section for further complexity analysis of Pollard’s P-1 Algorithm and its variances. We will introduce complexity of multiplication, modular powering, normal powering and the greatest common divisor as four basic operations used in Pollard’s P-1 Algorithm in the following part.

2.2.1. Complexity of Multiplication

There are seven multiplication algorithms at current for implementing multiplication operation: Basecase, Karatsuba, Toom-3, Toom-4 and FFT algorithm. Let n and m be the sizes of two multipliers, where n m . Ref. [8] shows that it costs O ( m n ) by Basecase Algorithm (Section 4.3.1 Algorithm M in [8]). It also introduces that Karatsuba is asymptotically an O ( n 1.585 ) algorithm (Section 4.3.3 part A in [8]). A description of Toom can be found in Section 4.3.3 in [8], it takes O ( n 1.465 ) for Toom-3 and O ( n 1.404 ) for Toom-4. For large integer multiplication, it always uses Fermat style FFT multiplication [8,9]. It takes O ( n k k 2 ) for one full product, where k is a split value. Schonhage [9] has pointed out that the upper bound drops to O ( n log n ) if we use a computer with random access to any number of words of bounded size. For ease of calculation, we use O ( n log n ) as a final complexity of multiplication in our following analysis. Let T M ( n ) = O ( n log n ) = C 1 · n log n + o ( n log n ) .

2.2.2. Complexity of Modular Powering

Modular powering can be implemented by a 2 w -ary sliding window algorithm (Algorithm 14.85 in [4]). w is called the window size, which is chosen according to the size of exponent. Let l be the bit size of exponent and n be the bit size of base number, it costs around 2 w 1 1 + l 1 w + 1 multiplications in modular powering by 2 w -ary sliding window algorithm [10]. The selection rule for w is to minimize the computing process, i.e., the cost is T MP ( l , n ) = min 1 w l ( 2 w 1 1 + l 1 w + 1 ) · T M ( n ) . To analytically solve this minimization problem and further deduce its asymptotic bound, we introduce the following lemma:
Lemma 3.
T MP ( l , n ) = min 1 w l 2 w 1 1 + l 1 w + 1 T M ( n ) = 2 2 ln 2 AsymW ( ( l 1 ) · ln 2 ) 2 1 + l 1 AsymW ( ( l 1 ) · ln 2 ) T M ( n ) 7.9 × 10 9 l 2 + 0.08 l + 1238.5 T M ( n ) ,
where AsymW ( x ) = L 1 L 2 + L 2 L 1 + O L 2 L 1 , L 1 = ln x and L 2 = ln ln x .
Proof. 
Let f ( w ) = 2 w 1 1 + l 1 w + 1 ( w Z and 1 w l ), then f ( w ) = ln 2 · 2 w 1 l 1 ( w + 1 ) 2 . Solve the inequality f ( w ) 0 , it infers that w 2 AsymW ( ( l 1 ) · ln 2 ) ln 2 1 . We can draw the plot of w ( l ) = 2 AsymW ( ( l 1 ) · ln 2 ) ln 2 1 as Figure 2.
From Equation (4.19) in [11], it proves that while AsymW at infinity or at 0, it can be expressed as the following asymptotic formula
AsymW ( x ) = L 1 L 2 + L 2 L 1 + O L 2 L 1 2 ,
where L 1 = ln x , L 2 = ln ln x . In Figure 2, it shows that the fitting effect from asymptotic formula to exact result of AsymW is good, the coefficient of determination is close to 1.
Thus,
f ( w ( l ) ) min = f 2 AsymW ( ( l 1 ) · ln 2 ) ln 2 1 2 2 ln 2 AsymW ( ( l 1 ) · ln 2 ) 2 1 + l 1 AsymW ( ( l 1 ) · ln 2 ) 7.9 × 10 9 l 2 + 0.08 l + 1238.5 ,
where AsymW ( x ) L 1 L 2 + L 2 L 1 , L 1 = ln x and L 2 = ln ln x . Figure 3 shows that f ( w ( l ) ) min fits well with the approximation formula.    □
In Lemma 3, it infers that T MP is nearly linear to the bit size of exponential number. Based on Lemma 3, we can derive the asymptotic complexity of the modular powering operation as T MP ( l , n ) = 0.08 l + 1238.5 · T M ( n ) .

2.2.3. Complexity of Normal Powering

A normal powering is always implemented by a simple binary algorithm (Section 4.6.3 algorithm A in [8]). Let e be an exponent and n be the bit size of base number, suppose l = log 2 e + 1 is the bit size of e. It costs around log 2 e + v ( e ) 2 log 2 e + 1 = 2 l 1 multiplications in a normal powering computation, where v ( e ) is the amount of 1’s in binary type of e. Let T NP = ( 2 l 1 ) · T M ( n ) .

2.2.4. Complexity of the Greatest Common Divisor

Let n be the larger size in two integers. It usually uses an O ( n 2 ) binary style GCD algorithm (Section 4.5.2 algorithm B in [8]). So, we will regard O ( n 2 ) as the complexity of GCD algorithm. Let T GCD ( n ) = O ( n 2 ) = C 2 · n 2 + o ( n 2 ) .

2.3. Normal Multiplication Technique

Beyond these fundamental operations, some variants of Pollard’s P-1 algorithm like IPP1 require computing the product of a massive list of primes. The Normal Multiplication (NM) (Algorithm 1) to obtain the product of the list L is as follows. Let x 0 = 1 be an initial state, it sequentially updates the accumulator by executing x 0 x 0 · x for every x L .
As established in Corollary 1, multiplying all primes up to an n-bit integer via NM requires T NMP ( n ) = O ( 4 n ) operations, yielding a massive product of bit-length bit LMP ( n ) . To resolve this computational bottleneck, we adopt a divide-and-conquer Fast Multiplication (FM) strategy (Algorithm 7). FM reduces the time cost to T FMP ( n 1 , n 2 ) = O 2 n 2 ( n 2 n 1 ) 2 operations (see Corollary 2).

2.4. Overview of Pollard’s P-1 Algorithm and Its Development

Without loss of generality, we assume that the largest prime factor of P 1 is less than or equal to that of Q 1 . Let a be a randomly chosen positive integer satisfying gcd ( a , N ) = 1 . By Fermat’s Little Theorem, any exponent z that is a multiple of P 1 satisfies [ a z ] P 1 . This implies that P divides a z 1 , allowing us to efficiently extract the prime factor P by evaluating gcd ( [ a z 1 ] N , N ) . Based on this fundamental property, Pollard proposed the P 1 algorithm [3], which strategically constructs the exponent z using the prime set P . Specifically, by setting z = p i P p i e i with sufficiently large algorithmic exponents e i , the algorithm guarantees that ( P 1 ) z , thereby successfully factorizing N. Depending on the specific strategies used to construct this exponent z, several variants have emerged. In the remainder of this section, we review the original algorithm alongside its two prominent variants [5,6].
Algorithm 1: Normal Multiplication Method
Cryptography 10 00057 i001

2.4.1. Original Pollard’s P-1 Algorithm [3]

To translate the aforementioned theory into practice, Pollard’s original work [3] proposed a practical two-stage approach. Let B 1 and B 2 be positive integers such that 1 < B 1 < B 2 < B 1 2 N 1 / 2 . If N is divisible by a prime factor P, the algorithm succeeds under two conditions: Stage 1. P 1 is a B 1 -smooth number; or Stage 2. P 1 = A p , where A is a B 1 -smooth number and B 1 < p < B 2 is a prime.
In practice, executing Stage 1 requires constructing an exponent z that covers all prime powers up to the bound B 1 . While the original paper establishes this framework, it does not explicitly specify the valuation rule for the corresponding algorithmic exponents e i . To address this and ensure that p i e i B 1 , subsequent formulations like Rabah’s [12] formally define e i as e i = log B 1 log p i .

2.4.2. Pollard’s P-1 Algorithm in [5]

To bypass the need for a predetermined smoothness bound, a trivial variant (Algorithm 2) proposed by Bishop [5] simply increments an integer multiplier step-by-step. Starting with a random base a ( 1 , N 1 ) , the method iterates through i = 2 , 3 , 4 , , sequentially updating a [ a i ] N and checking d = gcd ( a 1 , N ) at each step until a non-trivial factor is found. While this exhaustive linear enumeration theoretically guarantees eventual factorization, its increment-by-one nature results in an impractically large computational overhead.
Algorithm 2: Trivial Pollard’s P-1 Algorithm in [5]
Cryptography 10 00057 i002

2.4.3. Pollard’s P-1 Algorithm in [6]

In 2022, Somsuk [6] proposed an improved variant of Pollard’s P-1 algorithm, denoted as I P P 1 (Algorithm 3). Instead of processing primes individually, I P P 1 first computes the product of all prime numbers within a predefined list P (i.e., z = p P p ). It then repeatedly performs the modular exponentiation a [ a z ] N and evaluates the GCD, iterating up to a maximum bound (e.g., log N + 1 ). As established in Section 2.2.2, the cost of a single modular exponentiation is roughly 0.08 l + 1238.50 operations (where l is the exponent’s bit size). Consequently, aggregating primes into a single product z before exponentiation is computationally cheaper than performing consecutive modular exponentiations for each eligible prime. This strategy effectively reduces the running cost when the exponents of ( P 1 ) ’s prime factors are relatively uniform. However, because  I P P 1 uniformly raises all primes in P to the same iterative power, the overall cost increases drastically if even one prime factor possesses a large exponent, as it forces redundant exponentiations for the rest of the primes (Note that [6] also proposed a second version ( I P P 1 _ V 2 ) incorporating a linear step-by-step search as a fallback when the initial bound fails. However, since this fallback mechanism essentially mirrors the impractically expensive trivial variant discussed earlier, our analysis fundamentally focuses on I P P 1 ’s core aggregated-exponentiation strategy.).
Algorithm 3:  I P P 1 : Improved Pollard’s P-1 Algorithm in [6]
Cryptography 10 00057 i003

3. Dynamic Scaling Pollard’s P-1 Algorithm and Its Analysis

In this section, we present the details of our proposed Dynamic Scaling Pollard’s P-1 ( DSP ) algorithm (Section 3.1). As previously discussed, existing methods either suffer from static bound-guessing (traditional P 1 ) or incur massive redundant exponentiations when prime factors require uneven powers ( I P P 1 ). To overcome these limitations, DSP introduces a dynamic scaling strategy that synergistically advances both the prime candidates and their respective exponents. By restructuring the traversal order and continuously reusing intermediate prime products, our variant efficiently bounds the exponents up to n N / 2 1 bits while incorporating timely GCD evaluations. Then, we provide an example to explain our improvement over I P P 1 in Section 3.2. Finally, we give two complexity estimators for DSP and I P P 1 and a detailed theoretical analysis about their costs in Section 3.3.

3.1. Main Algorithm

As detailed in Algorithm 4, DSP takes two primary inputs: the RSA modulus N and a smoothness bound γ . The parameter γ serves as the global upper bound for the prime candidate list P with size t. By default, it can be set to the theoretical maximum γ = 2 n N / 2 1 to guarantee the extraction of P in the worst-case scenario. However, it strategically allows users to supply a tighter bound to significantly accelerate the factoring process if partial prior knowledge regarding the smoothness of P 1 is available.
Upon receiving these inputs, the algorithm begins its initialization. Since P 1 is inherently even, we first eliminate its factor of 2 by pre-squaring the initial base a = 2 , computing b [ a 2 ] N , and checking gcd ( b 1 , N ) (lines 1–3). If N remains unfactored after this initial check, DSP proceeds to its core dynamic scaling phase to compute b 2 p i P p i e i N . To minimize redundant modular exponentiations and maximize overall computational efficiency, this computation processes the primes iteratively in carefully bounded subsets.
Algorithm 4: Dynamic Scaling Pollard’s P-1 Algorithm
Cryptography 10 00057 i004
Let P j , P j , 1 , and  P j , 2 denote the exponent applied in the j-th iteration and its intermediate constructive components, respectively. As initialized in line 5, we set P 0 , 2 = 2 and P 1 , 1 = P 0 , 2 . The algorithm then iterates j from 1 to k 0 . For iterations where j < k 0 , we generate the j-th prime subset P j bounded by 2 2 j and compute its product P j , 2 = max { 1 , p P j p } . The dynamic exponent is then constructed as P j = P j , 1 · P j , 2 , and the accumulator for the next iteration is updated as P ( j + 1 ) , 1 = P j , 1 · P j . In the final iteration of this phase (i.e., j = k 0 ), we simply assign P k 0 = P k 0 , 1 (lines 14–15). After determining P j in each iteration, we exponentiate it to the base b via b [ b P j ] N (line 16). Following each exponentiation, we test whether d = gcd ( b 1 , N ) yields a non-trivial factor. If  d 1 , we have successfully recovered the prime P = d ; otherwise, the iteration continues.
The objective of these steps is to ensure that all possible prime factors within j = 1 k 0 1 P j are exponentiated to the base b with sufficiently high exponents after k 0 iterations. Based on the constructive steps, we can explicitly unroll the recurrence relations as P j = P j , 2 · i = 0 j 1 P i , 2 2 j i 1 and P ( j + 1 ) , 1 = i = 0 j P i , 2 2 j i . Consequently, after the k 0 -th iteration completes, the base b inherently accumulates to b [ 2 j = 0 k 0 1 P j , 2 2 k 0 j ] N = [ 2 p i j = 1 k 0 1 P j p i e i ] N . This guarantees that the accumulated exponent perfectly covers the required upper bounds e i for all primes in the generated subsets. If all prime factors of P div reside in j = 1 k 0 1 P j , the algorithm ensures that P will be extracted.
If N remains unfactored after the loop, Phase 2 (lines 21–30) is triggered. We do not need to multiply and fully exponentiate all primes in the final subset P k 0 . Since any prime in this set is strictly greater than 2 2 k 0 1 , assuming two such primes divide P div yields a mathematical contradiction: p 1 p 2 > 2 2 k 0 > P div . Thus, P div has at most one prime factor in P k 0 . We bypass full modular exponentiations and instead apply Pollard’s shift modular exponentiation [3], efficiently computing b [ b · a p p 0 ] N where p p 0 is the gap between consecutive prime candidates.
Furthermore, during the implementation of our variant, we observed that directly computing the prime subset products P j , 2 poses a significant computational bottleneck. To address this, we optimized the naive multiplication method by adopting a fast multiplication algorithm, which significantly accelerates the processing of the prime lists. Detailed descriptions and complexity analyses of this improvement are provided in Section 4.

3.2. Comparison of Our Algorithm with I P P 1

I P P 1 tries to increase the utilization of the product of certain prime factors, but it can only increase efficiency when all the exponents of the prime factors are small. The probability of a small u max occurring is very low; therefore, we aim to minimize the cost of computing the product of numerous prime factors of P div (below some upper bound) and increase the utilization of the product of certain prime factors. Our variant dynamically scales each p i u i from the bit size of p i to the bit size n N / 2 1 , reuses the product of prime factors during exponentiation, and employs a dynamic strategy to maximize the usage rate. We provide Example 1 to illustrate why the product can be reused in the exponentiation operation and how it reduces the computation cost:
Example 1.
Given two different random prime numbers p 1 and p 2 , and a base integer a coprime to a large integer N, there are two methods to compute [ a ( p 1 p 2 ) 2 ] N :
(1) First, compute the product X 1 = p 1 p 2 , and then iteratively compute exponentiation by X 1 twice, i.e., calculate A = [ a X 1 ] N followed by [ a X 1 2 ] N [ A X 1 ] N .
(2) Directly compute the exponent X = ( p 1 p 2 ) 2 and then calculate [ a X ] N .
Let T 1 , 1 be the cost of computing X 1 in case (1), and  T 1 , 2 be the cost of computing the modulo exponentiation twice in case (1). Let T 2 , 1 be the cost of computing X in case (2), and  T 2 , 2 be the cost of computing [ a X ] N in case (2). Let T 1 = T 1 , 1 + T 1 , 2 be the total cost of case (1), and  T 2 = T 2 , 1 + T 2 , 2 be the total cost of case (2).
Since Lemma 3 proves that the cost of modulo exponentiation T MP is nearly linear to the bit size of the exponent, and given that the bit size of X is approximately twice that of X 1 (i.e., bit ( X ) 2 bit ( X 1 ) ), it implies that T 1 , 2 T 2 , 2 .
However, it is obvious that computing the product X = ( p 1 p 2 ) 2 incurs a higher cost than computing X 1 = p 1 p 2 (the former requires one additional squaring operation). Thus, T 2 , 1 > T 1 , 1 , which infers that T 1 < T 2 .
In DSP , we apply this principle to save the computational cost of evaluating [ a i = 1 t p i e i ] N by utilizing a dynamic strategy that reuses earlier products.

3.3. Cost Analysis of I P P 1 and DSP

The complexity analysis of the following algorithms only considers the solvable situation, excluding the failure scenario. To establish a unified evaluation framework for both I P P 1 and our DSP variant, we decompose their execution loops into four fundamental operational costs. Regardless of the specific scaling strategy, the step-wise cost (see Section 2.2 and Corollary 2) in any given phase comprises: (1) computing the product of prime candidates within a designated interval (typically via Fast Multiplication, denoted as T FMP ), (2) updating the applied exponent via standard integer multiplication ( T M ), (3) performing the core modular exponentiation ( T MP ), and (4) evaluating the greatest common divisor ( T GCD ).

3.3.1. Complexity Analysis of I P P 1

We first propose a cost estimator for Algorithm 3 to accurately simulate the cost of Algorithm 3 as Algorithm 5 and then give a theorem about the complexity of Algorithm 3 as Theorem 1.
Algorithm 5:  I P P 1 Est
input: n N , p t , u max ;
output: T I P P 1 ;
1 
n p t log p t + 1 ; n P 1 , 1 1 ;
2 
T FMP , n FMP FastMulCostEst ( 1 , n p t , Pr ( n ) = 1 n ln 2 ) ;
3 
T T FMP + u max T MP ( n FMP , n N ) + u max T GCD ( n N ) ;
4 
return T;
Theorem 1.
(Cost Estimation for [6]) If p t p σ s , then N can be factored by Algorithm 3 at most
T I P P 1 ( p t , u max , n N ) = C 1 p t log 2 p t + u max C 2 n N 2 + u max C 1 p t n N log ( n N ) + o ( u max p t n N log ( n N ) ) .
Especially, if  p t = p σ s , the cost is
T I P P 1 ( p σ s , u max , n N ) = C 1 p σ s log 2 p σ s + u max C 2 n N 2 + u max C 1 p σ s n N log ( n N ) + o ( u max p σ s n N log ( n N ) ) .
Proof. 
The cost for implementing Algorithm 3 while p t p σ s can be divided into three parts, product cost of z = p i B p i , iterative modular powering for a = [ a z ] N and iterative GCD algorithm after each modular powering. According to Corollary 2, it takes no more than T FMP ( n t ) operations to compute the product cost of z = p i B p i and will get the z with bit size n z ( p t ) = bit LMP ( n t ) = 2 n t ( n t 1 ) + 1 n t ln 2 , where n t = log p t .
It takes around T MP ( n z ( p t ) ) · T M ( n N ) operations to compute the modular powering result with base a, exponent P and modulo N. It costs T GCD ( n N ) to compute a GCD. From Lemma 3, AsymW ( ( n z ( p t ) 1 ) · ln 2 ) n t 2 ln 2 + ln n t 2 ln 2 + ln n t 2 ln 2 n t 2 ln 2 and T MP ( n z ( p t ) , n N ) 2 n t T M ( n N ) .
In the declaration of Algorithm 3, the maximal exponent of prime factor in P 1 is log N + 1 , we will solve N after u max iterations of modular powering and GCD step. Thus, the total cost is
T I P P 1 ( p t , u max , n N ) = T FMP ( n t ) + u max · T GCD ( n N ) + u max · T MP ( n z ( p t ) ) = C 1 2 n t n t 2 + u max C 2 n N 2 + u max · C 1 · 2 n t n N log ( n N ) + o ( u max · 2 n t n N log ( n N ) ) , = C 1 p t log 2 p t + u max C 2 n N 2 + u max · C 1 · p t n N log ( n N ) + o ( u max · p t n N log ( n N ) ) .
   □

3.3.2. Complexity Analysis of Dynamic Scaling Pollard’s P-1 Algorithm

We first propose a cost estimator for Dynamic Scaling Pollard’s P-1 Algorithm to accurately simulate the cost of our variant as Algorithm 6 and then give a theorem about the complexity of our variant as Theorem 2.
Algorithm 6:  DSP Est
Cryptography 10 00057 i005
Theorem 2.
(Cost Estimation for Our Variant) The complexity in factoring N successfully by our Dynamic Scaling Pollard’s P-1 Algorithm (Algorithm 4) is as follows,
If p σ s 2 2 k 0 1 , then the cost of Dynamic Scaling Pollard’s P-1 Algorithm is
T DSP ( p σ s , p σ x , u σ x , n N ) = log ( u σ x log p σ x ) C 2 n N 2 + C 1 p σ s ( 1 4 log 2 p σ s log p σ s + u σ x log p σ x + 1 ) + C 1 p σ s 2 u σ x log p σ x log p σ s n N log n N + o ( u σ x p σ s log p σ x ) .
Proof. 
(1) If p σ s 2 2 k 0 1 , N will be factored in the process of Algorithm 4 declared from line 9 to 31 with k 0 = log u σ x log p σ x loops. The cost in case (1) contains the computations of set P j , 2 , P j and P ( j + 1 ) , 1 , the modular powering operation b = [ b P j ] N for each element P j from j = 1 to k and a GCD operation in the end of each iteration.
For set B j , the minimal bit size of p B j is 2 j 1 + 1 and the maximal bit size of p B j is 2 j . Let k 1 = log log p σ s k 0 , according to Corollary 2 and the description of line 12 in Algorithm 4, it takes no more than
T FMP ( 2 j 1 , 2 j ) , 2 j k 1 , 0 , k 0 j > k 1 ,
to compute the product cost of P j , 2 = p B j p and will get P j , 2 with the bit size
bit ( P j , 2 ) = bit LM ( 2 j 1 , 2 j ) , 2 j k 1 , 0 , k 0 j > k 1 .
Since P j , 1 = i = 0 j 1 P i , 2 2 j i 1 , n P 0 , 2 = 1 and n P 12 = bit LM ( 2 ) n P 0 , 2 , it infers that the bit size of P j , 1 is
bit ( P j , 1 ) = i = 0 j 1 2 j i 1 bit ( P i , 2 ) = 2 j 1 + i = 1 j 1 2 j i 2 bit LM ( 2 i 1 , 2 i ) < 2 2 j 1 + 3 · 2 2 j 2 2 ln 2
while 2 j k 1 + 1 and
bit ( P j , 1 ) = 2 bit ( P ( j 1 ) , 1 ) = 2 j ( k 1 + 1 ) bit ( P ( k 1 + 1 ) , 1 )
for k 0 j > k 1 + 1 .
The cost for computing each P j is T M ( bit ( P j , 1 ) ) and get P j with the bit size
bit ( P j ) = bit ( P j , 1 ) + bit ( P j , 2 ) < 2 2 j ln 2 , 2 j k 1 , 2 2 k 1 + j ( k 1 + 1 ) ln 2 , k 0 j > k 1 .
The cost for computing each P ( j + 1 ) , 1 is T M ( bit ( P j ) ) .
The cost for modular powering operation b [ b P j ] N is T MP ( bit ( P j ) ) · T M ( n N ) and the GCD operation costs T GCD ( n N ) in each loop. From Lemma 3, we can get that
AsymW ( ( n P j 1 ) · ln 2 ) 2 j 1 ln 2 ln ( 2 j 1 ln 2 ) , 2 j k 1 , ( 2 k 1 + j k 1 1 2 ) ln 2 ln [ ( 2 k 1 + j k 1 1 2 ) ln 2 ] , k 0 j > k 1 ,
and
T MP ( bit ( P j ) , n N ) < 2 2 j 2 · T M ( n N ) , 2 j k 1 , 2 2 k 1 + j k 1 2 · T M ( n N ) , k 0 j > k 1 .
So the total cost is
T DSP ( p σ x , u σ x , n N ) = j = 1 k 1 T FMP ( 2 j 1 + 1 , 2 j ) + j = 1 k 0 T M ( bit ( P j , 1 ) ) + T M ( bit ( P j ) ) + T MP ( bit ( P j ) , n N ) + T GCD ( n N ) = k 0 C 2 n N 2 + 2 C 1 2 2 k 1 ( 2 k 1 1 1 ) 2 + C 1 2 2 k 1 2 + 2 2 k 1 + k 0 k 1 1 n N log n N + C 1 2 k 0 k 1 1 2 2 k 1 + 3 · 2 2 k 1 1 2 ln 2 log 2 2 k 1 + 3 · 2 2 k 1 1 2 ln 2 + o ( 2 2 k 1 + k 0 ) + 1 ln 2 2 2 k 1 + 1 log ( 2 2 k 1 + 1 ) + 2 2 k 1 + k 0 k 1 1 log 2 2 k 1 + k 0 k 1 1 = k 0 C 2 n N 2 + 2 C 1 2 2 k 1 ( 2 k 1 1 1 ) 2 + C 1 2 2 k 1 + k 0 k 1 n N log n N + O ( 2 2 k 1 + k 0 ) = log ( u σ x log p σ x ) C 2 n N 2 + C 1 p σ s ( log p σ s 2 1 ) 2 + C 1 p σ s 2 u σ x log p σ x log p σ s n N log n N + O ( u σ x p σ s log p σ x ) = log ( u σ x log p σ x ) C 2 n N 2 + C 1 p σ s 1 4 log 2 p σ s log p σ s + 1 + O ( u σ x log p σ x ) + C 1 p σ s 2 u σ x log p σ x log p σ s n N log n N + o ( u σ x p σ s log p σ x ) .
   □

4. Fast Multiplication Technique and Its Analysis

This section details our Fast Multiplication (FM) method (Section 4.1). We provide formal cost estimators and theoretical complexity analyses for both NM (see Section 2.2) and FM methods in Section 4.2, followed by experimental validation in Section 4.3. Ultimately, we demonstrate theoretically and empirically that standard multiplication incurs a time overhead 2 n + 1 n 2 times higher than FM when computing the product of all primes up to n bits.

4.1. Fast Multiplication Technique

Given a list L = ( x 1 , , x k ) defined in Section 2, NM introduced in Section 2.2 degrades rapidly for large lists because the accumulating product x grows drastically. Since computational cost depends heavily on the bit-length of the largest multiplier, this skewed growth inherently throttles efficiency. To accelerate it, we propose the FM algorithm (Algorithm 7). Given a sorted list L ( k > 3 ) of positive integers, FM operates recursively: During each iteration, if the current list length k is odd, a trivial multiplier 1 is prepended to the sequence. The elements are then extracted as ( x 1 , , x k ) to pairwise multiply the symmetrically opposite ends: computing x i · x k i + 1 for i = 1 , , k / 2 . These temporary products form the updated sequence L, effectively halving the size parameter k k / 2 . This iterative process is repeated until only a single final product remains.
By continually balancing the bit-sizes of the intermediate multipliers, FM significantly reduces the calculation time compared to standard sequential multiplication. We mathematically formalize and prove this efficiency gain for uniformly distributed inputs in Section 4.3.
Algorithm 7: Fast Multiplication Method (FM)
Cryptography 10 00057 i006

4.2. Complexity Analysis of Normal Multiplication and Fast Multiplication

4.2.1. Complexity Analysis of Normal Multiplication Method

To fully evaluate the efficiency gains of our proposed algorithms, it is necessary to first analyze the time complexity of NM (Section 2.3). It computes the total product by iteratively multiplying elements one by one. Theorem 3 establishes the theoretical upper bound on the computational cost for computing the product of the list L.
Theorem 3
(Time Complexity of the NM). Assume L ( p , n ) is an ascending list defined in Section 2 with a size strictly greater than 3. Multiplying all elements in L using the NM requires around T NM ( p , n ) = 7 6 C 1 p 2 n 2 4 n + o ( 4 n p 2 n 2 ) operations. In particular, when p = 1 , the computational cost is T NM ( 1 , n ) = 7 6 C 1 n 2 4 n + o ( n 2 4 n ) .
Proof. 
Suppose the largest integer in list L is a and n is the bit size of a. Since p is the probability of a number x [ 1 , 2 n 1 ] Z occurring in list L, the total amount of numbers in L is expected to be p · ( 2 n 1 ) . When p = 1 , the initial list L covers all positive integers up to 2 n 1 .
The normal multiplication method iteratively multiplies the elements in L. Let the accumulator be L [ 1 ] . For ease of discussion, we process the multipliers grouped by their bit sizes. In the iteration for bit size i (where 3 i n ), we multiply the accumulator L [ 1 ] by all elements in L that have exactly i bits (i.e., integers in the range [ 2 i 1 , 2 i 1 ] ). There are expected to be p · 2 i 1 such multipliers.
According to Lemma 1, at the start of the iteration for bit size i, the expected bit size of the accumulator L [ 1 ] is b i 1 = bit LM ( p , 0 , i 1 ) = p ( i 2 ) 2 i 1 .
During the iterations of bit size i, we perform p · 2 i 1 multiplications. Each multiplier contributes approximately i bits to the accumulator. Therefore, the k-th multiplication in this stage involves an accumulator of bit size b i 1 + i ( k 1 ) . Let T i be the computational cost for the iteration of bit size i. Considering the time cost of each multiplication T M in Section 2.2.1, we have T i = C 1 k = 1 p · 2 i 1 ( i k + b i 1 ) log ( i k + b i 1 ) + o ( i 2 4 i ) . Since log ( i · p 2 i 1 + p 2 i 1 ( i 2 ) ) = log ( p 2 i ( i 1 ) ) = i + log ( p ( i 1 ) ) i and log ( i + p 2 i 1 ( i 2 ) ) log ( p 2 i 1 i ) i and Applying Lemma 2 by substituting A = i and B b i 1 , we have
T i = C 1 k = 1 p · 2 i 1 ( i k + b i 1 ) log ( i k + b i 1 ) + o ( i 2 4 i ) C 1 1 8 p 2 i 4 i + 1 4 p 2 4 i ( i 2 ) + 1 4 p 2 4 i ( i 2 ) 2 i · i + 1 4 p 2 4 i ( i 2 ) 2 i · i = C 1 p 2 4 i 5 8 i 3 2 + 1 i · i + 1 4 p 2 4 i i 4 + 4 i · i = C 1 5 8 p 2 i 2 4 i + 1 4 p 2 i 2 4 i + o ( i 2 4 i ) = 7 8 C 1 p 2 i 2 4 i + o ( i 2 4 i ) .
Thus, the total time complexity T NM ( p , n ) is the summation of T i over all bit sizes i from 3 to n. Using the geometric series approximation i = 1 n i 2 4 i 4 3 n 2 4 n , we obtain:
T NM ( p , n ) = i = 3 n T i + o ( 4 n p 2 n 2 ) = C 1 i = 3 n 7 8 p 2 i 2 4 i 5 2 p 2 i 4 i + 2 p 2 4 i + o ( 4 n p 2 n 2 ) = 7 6 C 1 p 2 n 2 4 n + o ( 4 n p 2 n 2 ) .
In particular, when p = 1 , the computational cost simplifies to T NM ( 1 , n ) = 7 6 C 1 n 2 4 n + o ( n 2 4 n ) .    □
Corollary 1.
For all prime numbers smaller or equal to the maximal n-bit positive integer 2 n 1 , it takes at most
T NMP ( n ) = T NM ( 1 n ln 2 , n ) = 7 6 ln 2 2 C 1 4 n .
operations to multiply all these numbers together by Algorithm 1 and get smaller than or equal to bit LMP ( n ) -bit positive integer.

4.2.2. Complexity Analysis of FM

Due to the intricate nature of the complexity analysis for FM, we first propose a cost estimator to accurately simulate its computational overhead. Suppose L is a list containing strictly more than three distinct positive integers, where the minimum and maximum bit sizes of its elements are n 1 and n 2 , respectively. Let p be the probability of an integer x [ 1 , 2 n 2 1 ] Z appearing in L. The cost evaluation is formalized in Algorithm 8. By taking parameters n 1 , n 2 , and p as inputs, it returns the estimated computational cost T FM ( p , n 1 , n 2 ) .
Theorem 4.
(Cost of FM Algorithm) Assume L ( p , n 1 , n 2 ) is an ascending list defined in Section 2 with a size strictly greater than 3. It takes roundly
T FM ( p , n 1 , n 2 ) = C 1 p 2 n 2 ( n 2 n 1 ) 2 n 2 + o ( p 2 n 2 ( n 2 n 1 ) 2 n 2 )
operations to compute the product of L by FM (Algorithm 7). Especially, while p = 1 , we have
T FM ( 1 , n 1 , n 2 ) = C 1 2 n 2 ( n 2 n 1 ) 2 n 2 + o ( 2 n 2 ( n 2 n 1 ) 2 n 2 )
Algorithm 8: FastMulCostEst
Cryptography 10 00057 i007
Proof. 
Since the minimum and maximum bit size of integers in list L are n 1 and n 2 ( n 1 < n 2 ), the amount of the positive integers in the range of [ 2 n 1 , 2 n 2 1 ] is 2 n 2 2 n 1 and p is the probability of a number x Z [ 2 n 1 , 2 n 2 1 ] occurring in list L. It infers that the initial list L could be [ 2 n 1 , 2 n 1 + 1 , , 2 n 2 1 ] with size 2 n 2 2 n 1 while p = 1 . We could add 2 n 1 1’s into L.
It performs 2 n 2 1 2 n 1 non-trivial multiplications in the first fold-in-half stage. Since the amount of k-bit positive integers is 2 k 1 , it computes 2 k 1 products of an n 2 -bit number and a k-bit number for n 1 + 1 k n 2 1 in each multiplication and remain 2 n 1 n 2 -bit numbers. It costs ( 2 n 2 1 2 n 1 ) C 1 n 2 log n 2 + ( 2 n 2 1 2 n 1 ) · o ( n 2 log n 2 ) operations at the first-iter and obtains 2 n 2 1 numbers in total and store them in an empty list L for next multiplications as Table 1.
For the second iteration, it performs 2 n 2 2 multiplications. It computes 2 n 1 products of a ( 2 n 2 1 ) -bit number and an n 2 -bit number in each multiplication, 2 k 1 products of a ( 2 n 2 1 ) -bit number and a ( n 2 + k ) -bit number for n 1 + 1 k n 2 2 in each multiplication. It costs 2 n 2 2 C 1 ( 2 n 2 1 ) log ( 2 n 2 1 ) + 2 n 2 2 o ( ( 2 n 2 1 ) log ( 2 n 2 1 ) ) operations at the second-iter and obtains 2 n 2 2 numbers in total and store them in an empty list L for next multiplications as the Table 2.
For the i-th-iter ( i ( n 2 n 1 ) ), it applies to 2 n 2 i multiplications. It computes 2 n 1 products of a ( 2 i 1 n 2 2 i 1 + 1 ) -bit number and a [ ( 2 i 1 1 ) n 2 2 i 1 + i ] -bit number and 2 k 1 products of a ( 2 i 1 n 2 2 i 1 + 1 ) -bit number and a [ ( 2 i 1 1 ) n 2 2 i 1 + i + k ] -bit number for n 1 + 1 k n 2 i in each multiplication. It costs 2 n 2 i C 1 ( 2 i 1 n 2 2 i 1 + 1 ) log ( 2 i 1 n 2 2 i 1 + 1 ) + 2 n 2 i · o ( ( 2 i 1 n 2 2 i 1 + 1 ) log ( 2 i 1 n 2 2 i 1 + 1 ) ) operations at the i-th-iter. It obtains 2 n 2 i numbers in total and store them in an empty list L for next multiplications as Table 3.
For the ( n 2 n 1 ) -th-iter, it applies to 2 n 1 multiplications. It computes 2 n 1 products of a ( 2 n 2 n 1 1 ( n 2 1 ) + 1 ) -bit number and a ( 2 n 2 n 1 1 ( n 2 1 ) n 1 ) -bit number in each multiplication. It costs 2 n 1 C 1 ( 2 n 2 n 1 1 ( n 2 1 ) + 1 ) log ( 2 n 2 n 1 1 ( n 2 1 ) + 1 ) + 2 n 1 · o ( ( 2 n 2 n 1 1 ( n 2 1 ) + 1 ) log ( 2 n 2 n 1 1 ( n 2 1 ) + 1 ) ) operations at the ( n 2 n 1 ) -th-iter, then we obtain 2 n 1 products with bit size at most ( 2 n 2 n 1 ( n 2 1 ) n 1 + 1 ) -bit.
For the ( n 2 n 1 + i ) -th-iter ( 1 i n 1 ), it applies to 2 n 1 i multiplications. It computes 2 n 1 i products of two [ 2 i 1 ( 2 n 2 n 1 ( n 2 1 ) n 1 + 1 ) ] -bit numbers in each multiplication. It costs 2 n 1 i C 1 [ 2 i 1 ( 2 n 2 n 1 ( n 2 1 ) n 1 + 1 ) ] log [ 2 i 1 ( 2 n 2 n 1 ( n 2 1 ) n 1 + 1 ) ] + 2 n 1 i · o ( [ 2 i 1 ( 2 n 2 n 1 ( n 2 1 ) n 1 + 1 ) ] log [ 2 i 1 ( 2 n 2 n 1 ( n 2 1 ) n 1 + 1 ) ] ) operations at the ( n 2 n 1 + i ) -th-iter, then we obtain 2 n 1 i products with bit size at most [ 2 i ( 2 n 2 n 1 ( n 2 1 ) n 1 + 1 ) ] -bit. We get the last product of FM with bit size [ 2 n 2 ( n 2 1 ) 2 n 1 n 1 + 2 n 1 ] while i = n 1 .
Let b 1 ( i ) = ( 2 i 1 n 2 2 i 1 + 1 ) , b 2 = 2 n 2 n 1 + 1 ( n 2 1 ) 2 n 1 + 2 , then
G ( 1 , n 1 , n 2 ) : = ( 2 n 2 1 2 n 1 ) n 2 log n 2 + i = 2 n 2 n 1 2 n 2 i b 1 ( i ) log b 1 ( i ) + i = 1 n 1 2 n 1 i 2 i 2 b 2 log ( 2 i 2 b 2 ) = ( 2 n 2 1 2 n 1 ) n 2 log n 2 + i = 2 n 2 n 1 2 n 2 i b 1 ( i ) log b 1 ( i ) + n 1 2 n 1 2 b 2 log b 2 + 2 n 1 3 b 2 n 1 ( n 1 3 ) ( 2 n 2 1 2 n 1 ) n 2 log n 2 + i = 2 n 2 n 1 2 n 2 i b 1 ( i ) log b 1 ( n 2 n 1 + 1 ) + n 1 2 n 1 2 b 2 log b 2 + 2 n 1 3 b 2 n 1 ( n 1 3 ) [ 2 n 2 1 ( n 2 n 1 ) 2 ( n 2 1 ) + ( 2 n 2 1 2 n 1 ) ( 2 n 2 n 1 ) ] log n 2 + [ 2 n 2 1 ( n 2 1 ) 2 n 1 1 n 1 + 2 n 1 ] n 1 ( n 2 n 1 + 1 ) log n 2 + n 1 ( n 1 3 ) [ 2 n 2 2 n 2 2 n 2 2 2 n 1 2 n 1 + 2 n 1 1 ] = 2 n 2 ( n 2 n 1 ) 2 n 2 + o ( 2 n 2 ( n 2 n 1 ) 2 n 2 ) .
All in all, we add up all the overhead and get the time cost of the FM (Algorithm 7):
T FM ( 1 , n 1 , n 2 ) = C 1 G ( 1 , n 1 , n 2 ) + o ( G ( 1 , n 1 , n 2 ) ) = C 1 2 n 2 ( n 2 n 1 ) 2 n 2 + o ( 2 n 2 ( n 2 n 1 ) 2 n 2 ) .
While p < 1 , it infers that the amount of numbers in list L is p ( 2 n 2 2 n 1 ) . Thus, we get that the bit size of the product is bit LM ( p , n 1 , n 2 ) = p [ 2 n 2 ( n 2 1 ) 2 n 1 ( n 1 1 ) ] and
G ( p , n 1 , n 2 ) : = p G ( 1 , n 1 , n 2 ) = p 2 n 2 ( n 2 n 1 ) 2 n 2 + o ( p 2 n 2 ( n 2 n 1 ) 2 n 2 ) ,
the total cost is
T FM ( p , n 1 , n 2 ) = p G ( 1 , n 1 , n 2 ) = C 1 G ( 1 , n 1 , n 2 ) + o ( G ( 1 , n 1 , n 2 ) ) = C 1 p 2 n 2 ( n 2 n 1 ) 2 n 2 + o ( p 2 n 2 ( n 2 n 1 ) 2 n 2 ) .
Corollary 2.
For all prime numbers smaller or equal from n 1 -bit to n 2 -bit positive integer, it takes at most
T FMP ( n 1 , n 2 ) = C 1 · 2 n 2 ( n 2 n 1 ) 2 + o ( 2 n 2 ( n 2 n 1 ) 2 )
operations to multiply all these numbers together by Algorithm 7. Let T FMP ( n ) : = T FMP ( 0 , n ) .
Proof. 
According to Prime Theorem, the number of primes in Z [ 2 n 1 , 2 n 2 1 ] is k = 2 n 2 1 ln ( 2 n 2 1 ) 2 n 1 1 1 ln ( 2 n 1 1 1 ) ( n 1 1 ) 2 n 2 n 2 2 n 1 1 ( n 1 1 ) n 2 ln 2 . We can regard the prime numbers declared in Corollary 2 as a non-repeated list L on Z [ 2 n 1 , 2 n 2 1 ] , then the probability that each number occurs in L is p = k 2 n 2 2 n 1 1 1 n 2 ln 2 . According to Theorem 4, it takes at most
T FMP ( n 1 , n 2 ) = T FM ( 1 n 2 ln 2 , n 1 , n 2 ) = C 1 1 n 2 ln 2 · 2 n 2 ( n 2 n 1 ) 2 n 2 + o ( 1 n 2 ln 2 · 2 n 2 ( n 2 n 1 ) 2 n 2 ) = C 1 · 2 n 2 ( n 2 n 1 ) 2 + o ( 2 n 2 ( n 2 n 1 ) 2 )
operations to multiply all these numbers together by Algorithm 7. □

4.3. Comparison Between Normal Multiplication Method and FM

We give a comparison between normal multiplication method and FM and obtain that the cost of FM is lower than normal multiplication method while the number in list L is uniformly distributed in Z 2 n for an arbitrary positive integer n 2 and the element in L is not repeated. The cost of FM is T FMP ( n ) = C 1 · 2 n n 2 + o ( 2 n n 2 ) according to Corollary 2.
Figure 4 shows that the theoretical complexity analysis fits the actual cost. In Figure 4, the orange points denote the actual cost for normal multiplication method to compute the product of all the primes less than or equal to the bit size shown in x-coordinate. The red points imply the actual cost for FM to compute the product of all the primes less than or equal to the bit size shown in x-coordinate. The gray line and the red line corresponds to the theoretical complexity of normal multiplication method and FM. It shows that with more elements added in the list for multiplication, the time overhead of normal multiplication method will increase by 2 n + 1 n 2 times higher than which of FM.

5. Comparison Among Four Variants of Pollard’s P-1 Algorithm

5.1. Theoretical Comparison Between I P P 1 and DSP

In I P P 1 , it selects a prime p t p σ s , then compute the product z = i = 1 t p i and iteratively calls a modular exponential operation at most u max times to ensure all the prime factors for P 1 contained in z u max . After that it can factor N by compute gcd ( a z u max , N ) for a randomly chosen base a which is coprime to N. We can see that if u max > log p σ i N , then it produces an unnecessary overhead to calculate the exponent value for p σ i in I P P 1 . Figure 5 shows such an overhead in the condition u max > log p σ s N . In our variant, we grow the exponents of each p i parallelly to the upper bound log p i N to avoid enumerating more invalid exponent as expressed in Figure 6 (more details about our variant can be seen in Section 3.1). The green part and red part denote the calculation amount for each p i and its exponent number u i . The blue arrow implies that the calculation quantities in green part of I P P 1 (Figure 5) or our variant (Figure 6) gradually grows to red part. The orange dash line can be considered to represent the calculation amount when the solution is successful. The variant solve the solution successfully only if the red part covers the orange dash line and all of its left area. It shows that our calculation amount is significantly lower than I P P 1 .
From the Theorem 1 and Theorem 2, the cost of finding the factor prime through our variant could be lower than I P P 1 while p σ x u σ x < 1 4 p σ s 1 2 log p σ s + 1 . Since p σ x u σ x = max 1 i s p i u i , it infers that p σ x u σ x < P 1 . Since p σ s > 4 in general, 1 4 p σ s 1 2 log p σ s + 1 > p σ s 1 2 log p σ s . We consider the probability of p σ s 1 2 log p σ s > P 1 as Pr ( p σ s 1 2 log p σ s P 1 ) = Pr ( p σ s ( P 1 ) 2 log p σ s ) = 1 Pr ( p σ s < ( P 1 ) 2 log p σ s ) = 1 ρ 1 ( log p σ s 2 ) , where ρ function is defined in the page 162 of [13]. Suppose p σ s 64 , then log p σ s 2 3 . In page 163 of [13], it shows that ρ 1 ( 3 ) 0.05 and ρ 1 is a monotonically decreasing function, so Pr ( p σ s 1 2 log p σ s P 1 ) = 1 ρ 1 ( log p σ s 2 ) 0.95 while p σ s 64 . Thus, p σ x u σ x P < 1 4 p σ s 1 2 log p σ s + 1 in high probability while p σ s > 64 , i.e., our DSP algorithm is more efficiency than I P P 1 in most of the time. Since I P P 1 itself presets the size of B, it is expected that it will not set B below 64. In this case, even if the prime factors of P 1 are less than 64, our algorithm will still be faster.

5.2. Experimental Comparison Among 4 Variants of Pollard’s P-1 Algorithm

We’ve implemented Pollard’s P-1 algorithm in [3,5], I P P 1 with fast multiplication technique as well as our variant (https://github.com/Summwer/expemeriment_of_pollardpm1, accessed on 1 August 2026). We design a prime generator to generate P so that P 1 is the product of several randomly generated 30-bit integers, which ensures the maximal prime factor of P 1 is the largest prime smaller than 2 30 . Then, we use the P to generate a random prime Q that in the same bit size of P and compute N = P Q . We test the above four algorithms in comparing the cost of factoring 10 entries of 1024-bit N, which was randomly generated by the above generator. We implement the test in a personal laptop (20.04.1-Ubuntu, x86-64, 6*Intel® Core™ i5-9500 CPU @ 3.00GHz, RAM 16 GB) with single thread. The experiment result is shown in Figure 7, we can see that our variant is around 23.5/16.4/35.6 times faster than the Algorithm I P P 1 /[3]/[5]. It shows that our algorithm has an absolute advantage in factoring an N with that the corresponding P 1 ’s factors have high exponents. In Figure 7, we can also find out that a randomly generated the product of several randomly generated 30-bit number has prime factors with high exponent (at least larger than 1) in high probability (instance 2,3,4,5,8). For some cases (instance 2,3,4,8), the I P P 1 is slower than the original Pollard’s P-1, but in this case we are still faster than the original Pollard’s P-1. Since the multipliers in P 1 are chosen in randomly in Figure 7, it can be seen that the number of prime factors of P 1 or the size of the prime factor index have little impact on the complexity of our variant. Only the size of the largest prime factor is the only key influencing factor in our variant.
For the second experiment, we consider a situation that one prime factor of P 1 has a high exponent. We construct a 512-bit prime P in the form of P = 2 × 3 u x × 1073741789 × z + 1 ( u x { 0 , 20 , , 100 } , z is a number s.t. the larger entry p u | z satisfying p u < min ( 3 u x , 1073741789 ) for p > 3 ) and a randomly 512-bit Q. Given N = P Q , we estimate the cost of our variant and I P P 1 both in estimators (Algorithms 5 and 6) and the Theoretical Complexity Theorems (Theorems 1 and 2). We test the same instances in our variant (Algorithm 4) and I P P 1 (Algorithm 3), Figure 8 shows that theoretical complexity fits well to the cost in both estimator and experiment.

6. Conclusions

We propose a variant of Pollard’s P-1 named Dynamic Scaling Pollard’s P-1 Algorithm. The proposed algorithm is an efficient method when all prime factors of P 1 or Q 1 are small. The proposed algorithm is quicker than previous Pollard’s P - 1 Algorithms for virtually all values of the modulus (especially P 1 has a prime factor with a high index), according to the experimental findings and the complexity analysis result. In factoring 1024-bit integer, our algorithm solves it nearly 23.5/16.4/35.6 times faster than the Algorithm I P P 1 [6]/[3]/[5]. We also give a theoretical comparison between our DSP and I P P 1 , it concludes that our algorithm costs lower than I P P 1 in more than 95% while the upper bound of prime list B in I P P 1 is set to be larger than 64.

Author Contributions

Conceptualization, W.X.; methodology, W.X.; software, W.X.; validation, W.X.; formal analysis, W.X.; investigation, W.X.; resources, D.G.; data curation, W.X.; writing—original draft preparation, W.X.; writing—review and editing, W.X.; visualization, W.X. and G.W.; supervision, G.W. and D.G.; project administration, G.W. and D.G.; funding acquisition, G.W. and D.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Cryptologic Science Fund of China No. 2025NCSF02017.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Rivest, R.L.; Shamir, A.; Adleman, L. A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM 1978, 21, 120–126. [Google Scholar] [CrossRef] [Scilit]
  2. Buhler, J.P.; Lenstra, H.W.; Pomerance, C. Factoring integers with the number field sieve. In The Development of the Number Field Sieve; Lecture Notes in Mathematics; Lenstra, A.K., Lenstra, H.W., Eds.; Springer: Berlin/Heidelberg, Germany, 1993; Volume 1554, pp. 50–94. [Google Scholar] [CrossRef] [Scilit]
  3. Pollard, J.M. Theorems on factorization and primality testing. Math. Proc. Camb. Philos. Soc. 1974, 76, 521–528. [Google Scholar] [CrossRef] [Scilit]
  4. Menezes, A.J.; van Oorschot, P.C.; Vanstone, S.A. Handbook of Applied Cryptography, 1st ed.; CRC Press: Boca Raton, FL, USA, 2018. [Google Scholar] [CrossRef] [Scilit]
  5. Bishop, D. Introduction to Cryptography with Java Applets; Jones and Bartlett: Boston, MA, USA, 2003. [Google Scholar]
  6. Somsuk, K. An Efficient Variant of Pollard’s p − 1 for the Case That All Prime Factors of the p − 1 in B-Smooth. Symmetry 2022, 14, 312. [Google Scholar] [CrossRef] [Scilit]
  7. Avigad, J.; Donnelly, K.; Gray, D.; Raff, P. A formally verified proof of the prime number theorem. ACM Trans. Comput. Log. 2007, 9, 2. [Google Scholar] [CrossRef] [Scilit]
  8. Ruckert, M.; Knuth, D.E. The Art of Computer Programming; Addison-Wesley: Upper Saddle River, NJ, USA, 2015. [Google Scholar]
  9. Schönhage, A.; Strassen, V. Schnelle Multiplikation großer Zahlen. Computing 1971, 7, 281–292. [Google Scholar] [CrossRef] [Scilit]
  10. Möller, B. Sliding Window Exponentiation. In Encyclopedia of Cryptography and Security; van Tilborg, H.C.A., Jajodia, S., Eds.; Springer: Boston, MA, USA, 2011; pp. 1222–1224. [Google Scholar] [CrossRef] [Scilit]
  11. Corless, R.M.; Gonnet, G.H.; Hare, D.E.G.; Jeffrey, D.J.; Knuth, D.E. On the LambertW function. Adv. Comput. Math. 1996, 5, 329–359. [Google Scholar] [CrossRef] [Scilit]
  12. Rabah, K. Review of Methods for Integer Factorization Applied to Cryptography. J. Appl. Sci. 2006, 6, 458–481. [Google Scholar] [CrossRef] [Scilit]
  13. Riesel, H. Prime Numbers and Computer Methods for Factorization; Birkhäuser: Boston, MA, USA, 2012. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Complexity comparison between our variant and IPP1 while bit ( N ) = 1024 , bit ( P ) = bit ( Q ) = 512 , where P 1 = 2 × 3 u x × 1073741789 , P and Q are both primes. The x-axis is u x and the y-axis is the cost in cycles. The green triangle is cost of our variant in experiment. The blue circle is the cost of IPP1 in experiment. The yellow triangle is the estimated cost of our variant generated by estimator. The red circle is the estimated cost of IPP1 generated by estimator. The dash line is the theoretical cost of our variant computed by Theorem 2. The dot-and-dash line is the theoretical cost of our variant computed by Theorem 1.
Figure 1. Complexity comparison between our variant and IPP1 while bit ( N ) = 1024 , bit ( P ) = bit ( Q ) = 512 , where P 1 = 2 × 3 u x × 1073741789 , P and Q are both primes. The x-axis is u x and the y-axis is the cost in cycles. The green triangle is cost of our variant in experiment. The blue circle is the cost of IPP1 in experiment. The yellow triangle is the estimated cost of our variant generated by estimator. The red circle is the estimated cost of IPP1 generated by estimator. The dash line is the theoretical cost of our variant computed by Theorem 2. The dot-and-dash line is the theoretical cost of our variant computed by Theorem 1.
Cryptography 10 00057 g001
Figure 2. Optimal w to minimize 2 w 1 1 + l 1 w + 1 .
Figure 2. Optimal w to minimize 2 w 1 1 + l 1 w + 1 .
Cryptography 10 00057 g002
Figure 3. Simulation of f ( w ) min = min 1 w l 2 w 1 1 + l 1 w + 1 which shows that the function f ( w ) min fits well with a linear function.
Figure 3. Simulation of f ( w ) min = min 1 w l 2 w 1 1 + l 1 w + 1 which shows that the function f ( w ) min fits well with a linear function.
Cryptography 10 00057 g003
Figure 4. Experimental result of normal multiplication method and FM. The red star point (orange point) is the experimental cost of normal/fast multiplication method, which computes the cost of all primes smaller than or equal to the bit size shown in x-coordinate. The gray (red) dashed line is the theoretical cost of normal/fast multiplication method. It fits the experimental result, which means that the theoretical analysis is correct.
Figure 4. Experimental result of normal multiplication method and FM. The red star point (orange point) is the experimental cost of normal/fast multiplication method, which computes the cost of all primes smaller than or equal to the bit size shown in x-coordinate. The gray (red) dashed line is the theoretical cost of normal/fast multiplication method. It fits the experimental result, which means that the theoretical analysis is correct.
Cryptography 10 00057 g004
Figure 5. Exponent growth in [6]. The x axis is the prime number, the y axis means the exponent value of each prime. The purple line shows a sample with the prime factors and its exponent number of P 1 . The blue arrow denotes the growth direction for adding new prime factors in I P P 1 . The orange line means the representation of u = log p i N . If the index value exceeds the orange line, it means that we increase the extra index of the prime factor p i . The red block means the minimal scope to add prime numbers through I P P 1 .
Figure 5. Exponent growth in [6]. The x axis is the prime number, the y axis means the exponent value of each prime. The purple line shows a sample with the prime factors and its exponent number of P 1 . The blue arrow denotes the growth direction for adding new prime factors in I P P 1 . The orange line means the representation of u = log p i N . If the index value exceeds the orange line, it means that we increase the extra index of the prime factor p i . The red block means the minimal scope to add prime numbers through I P P 1 .
Cryptography 10 00057 g005
Figure 6. Exponent growth in our variant. The x axis is the prime number, the y axis means the exponent number of each prime. The purple line shows a sample with the prime factors and its exponent number of P 1 . The blue arrow denotes the growth direction for adding new prime factors in our variant. The orange line means the representation of u = log p i N . If the index value exceeds the orange line, it means that we increase the extra index of the prime factor p i . The green block indicates the steady incremental allocation of exponents that drives the DSP cost toward its asymptotic scaling. The red block means the minimal scope to add prime numbers through our variant.
Figure 6. Exponent growth in our variant. The x axis is the prime number, the y axis means the exponent number of each prime. The purple line shows a sample with the prime factors and its exponent number of P 1 . The blue arrow denotes the growth direction for adding new prime factors in our variant. The orange line means the representation of u = log p i N . If the index value exceeds the orange line, it means that we increase the extra index of the prime factor p i . The green block indicates the steady incremental allocation of exponents that drives the DSP cost toward its asymptotic scaling. The red block means the minimal scope to add prime numbers through our variant.
Cryptography 10 00057 g006
Figure 7. Practical cost for our variant (blue one), I P P 1 (orange one), Original Pollard’s P-1 Algorithm [3] (green one) and Trivial Pollard’s P-1 Algorithm [5] (red one) to factor an 1024-bit N. The x-axis is the index for the randomly generated instance. The y-axis is the cost in second.
Figure 7. Practical cost for our variant (blue one), I P P 1 (orange one), Original Pollard’s P-1 Algorithm [3] (green one) and Trivial Pollard’s P-1 Algorithm [5] (red one) to factor an 1024-bit N. The x-axis is the index for the randomly generated instance. The y-axis is the cost in second.
Cryptography 10 00057 g007
Figure 8. The figure shows growth accuracy for DSP and I P P 1 with a 1024-bit N and 512-bit primes P, Q with P 1 = 2 × 3 u x × 1073741789 ; the x-axis is u x and the y-axis is cost in cycles. Experimental results are marked by green triangles ( DSP ) and blue circles ( I P P 1 ), estimator predictions by yellow triangles ( DSP ) and red circles ( I P P 1 ), while theoretical costs are given by a dashed line ( DSP , Theorem 2) and a dash-dotted line ( I P P 1 , Theorem 1).
Figure 8. The figure shows growth accuracy for DSP and I P P 1 with a 1024-bit N and 512-bit primes P, Q with P 1 = 2 × 3 u x × 1073741789 ; the x-axis is u x and the y-axis is cost in cycles. Experimental results are marked by green triangles ( DSP ) and blue circles ( I P P 1 ), estimator predictions by yellow triangles ( DSP ) and red circles ( I P P 1 ), while theoretical costs are given by a dashed line ( DSP , Theorem 2) and a dash-dotted line ( I P P 1 , Theorem 1).
Cryptography 10 00057 g008
Table 1. Bit size in L after 1st iteration in FM.
Table 1. Bit size in L after 1st iteration in FM.
Bit Size n 2 n 1 + n 2 + 1 n 1 + n 2 + 2 2 n 2 1 Total
Amount 2 n 1 2 n 1 2 n 1 + 1 2 n 2 2 2 n 2 1
Table 2. Bit size in L after 2nd iteration in FM.
Table 2. Bit size in L after 2nd iteration in FM.
Bit Size 3 n 2 1 n 1 + 3 n 2 n 1 + 3 n 2 + 1 4 n 2 3 Total
Amount 2 n 1 2 n 1 2 n 1 + 1 2 n 2 3 2 n 2 2
Table 3. Bit size in L after i-th iteration in FM.
Table 3. Bit size in L after i-th iteration in FM.
Bit Size b ( i )  § n 1 + b ( i ) + 1 n 1 + b ( i ) + 2 2 i n 2 2 i + 1 Total
Amount 2 n 1 2 n 1 2 n 1 + 1 2 n 2 i 1 2 n 2 i
§ b ( i ) = ( 2 i 1 ) n 2 2 i + i + 1 .
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xia, W.; Wang, G.; Gu, D. Dynamic Scaling Pollard’s P-1 Algorithm. Cryptography 2026, 10, 57. https://doi.org/10.3390/cryptography10040057

AMA Style

Xia W, Wang G, Gu D. Dynamic Scaling Pollard’s P-1 Algorithm. Cryptography. 2026; 10(4):57. https://doi.org/10.3390/cryptography10040057

Chicago/Turabian Style

Xia, Wenwen, Geng Wang, and Dawu Gu. 2026. "Dynamic Scaling Pollard’s P-1 Algorithm" Cryptography 10, no. 4: 57. https://doi.org/10.3390/cryptography10040057

APA Style

Xia, W., Wang, G., & Gu, D. (2026). Dynamic Scaling Pollard’s P-1 Algorithm. Cryptography, 10(4), 57. https://doi.org/10.3390/cryptography10040057

Article Metrics

Back to TopTop