Preprint
Article

This version is not peer-reviewed.

An Efficient Simulated Annealing Algorithm for Short Addition Sequence

A peer-reviewed article of this preprint also exists.

Submitted:

20 December 2023

Posted:

20 December 2023

You are already at the latest version

Abstract
An addition sequence is an important operation in many applications of computer science, such as multi-modular exponentiation and outsourcing protocols. Finding an addition sequence for a set of positive integers with the shortest length is challenging due to the high computational time required to find the solution. In this paper, a new metaheuristic algorithm is designed based on the simulated annealing strategy to generate a short addition sequence. The efficiency of the proposed algorithm was proved experimentally by comparing it with the previous exact and heuristic algorithms in terms of running time and the length of the addition sequence.
Keywords: 
;  ;  ;  

1. Introduction

Given a set of numbers N = n 1 , n 2 , , n k such that 1 < n 1 < n 2 < < n k . An addition sequence [1,2] for the set N, denoted by ASeq(N), is an increasing sequence of numbers a s 0 , a s 1 , a s 2 , , a s l such that (1) a s 0 = 1 , (2) a s l = n k , (3) a s i = a s j + a s h , 0 j , h i 1 , and (4) N a s 0 , a s 1 , a s 2 , , a s l , i.e., each number n i should appear in the sequence a s 0 , a s 1 , a s 2 , , a s l . The number l is called the length of ASeq(N). The minimal length of an ASeq(N) is denoted by l N . In the case of k = 1 , the sequence is called addition chain [1,2].
The problem of generating a shortest ASeq(N) is equivalent to the simultaneous evaluation of k power monomials g n 1 ,     g n 2 ,   , g n k with a minimum number of multiplications.
For example, let   N = 53 ,   163 ,   203 ,   363 . The following are two ASeqs with lengths 15 and 13, respectively.
The elements of the first ASeq are: 1, 2=1+1, 3=2+1, 6=3+3, 12=6+6, 13=12+1, 26=13+13, 39=26+13, 40=39+1, 53=40+13, 106=53+53, 159=106+53, 160=159+1, 163=160+3, 203=163+40, 363=203+160.
The elements of the second ASeq are: 1, 2=1+1, 3=2+1, 5=3+2, 10=5+5, 13=10+3, 20=10+10, 40=20+20, 53=40+13, 80=40+40, 160=80+80, 163=160+3, 203=163+40, 363=203+160
The evaluation of g 53 , g 163 , g 203 , g 363 ,  using the first sequence is
g , g 2 , g 3 , g 6 , g 12 , g 13 , g 26 , g 39 , g 40 , g 53 , g 106 , g 159 , g 160 , g 163 , g 203 , g 363
while the evaluation of the same powers g 53 , g 163 , g 203 , g 363 using the second sequence is
g , g 2 , g 3 , g 5 , g 10 , g 13 , g 20 , g 40 , g 53 , g 80 , g 160 , g 163 , g 203 , g 363
A step i is called star if a s i = a s i 1 + a s h ,   0 h i 1 ; and non-star if a s i = a s j + a s h ,   0 j , h i 2 . In case of j = h = i 1 ,     a s i = 2 a s i 1 , the step is called doubling. If all steps in the sequence are stars, then the sequence is called star. If l * N denotes to the minimal length of star ASeq(N), then we have
l N l * N
Yao [3] showed that:
l N log n k + ( c   k ) log n k / log log n k
for some constant c = 2 + 4 / log n k .
Bleichenbacher [4] computed the lower bound
l N { n k + 1 } l N + α + 1 ,
where n k + 1 > 2 α n k , α 0
ASeqs have received a lot of consideration among mathematicians and computer scientists for the following reasons:
The first reason is that one of the fundamental operations that play an important role in the efficiency of many public key cryptosystems and protocols is group exponentiation (sometimes it is called multi-modular exponentiation [2,5]), i.e., computing g n 1 ,     g n 2 ,   , g n k  simultaneously with a minimal number of operations, where g is an element in a group. Designing a fast algorithm for generating a shortest (or short) ASeq increases the efficiency of such public key cryptosystems and protocols since evaluating g n 1 ,     g n 2 ,   , g n k  with a minimal number of multiplications is equivalent to finding a shortest ASeq(N).
The second reason is that ASeqs (including addition chains) are generalized to the following:
(i)
B-chains [7], where every element in the B-chain has the form a i = a j   o   a h ,   0 j , h i 1 , and the binary operation o belongs to a finite set of binary operations over the set of natural numbers B, i.e. o B = + , , * , ÷ . Guzmán-Trampe et. al. [8] proposed a method for generating addition-subtraction, B = + , , sequence for the Kachisa–Schaefer–Scott family of pairing-friendly elliptic curves.
(ii)
Vectorial addition chain [9,10]: it is a sequence of k-dimensional vectors of nonnegative integers v i , k + 1 i l , such that (1) v k + 1 = [ 1,0 , 0 , 0,0 ] , v k + 2 = [ 0,1 , 0 , 0,0 ] , …, v 0 = [ 0,0 , 0 , 0,1 ] , (2) v i = v j + v h , 1 i l , k + 1 j , h i 1 , and (3) v l = n 1 , n 2 , , n k . Finding a shortest vectorial addition chain is equivalent to evaluating, multi-exponentiation, i.e., the product i = 1 k g i n i with the minimal number of multiplications.
The third reason is that in Internet of Things, IoT, devices with limited resources have a problem when they perform some public-key primitives, such as decryption and signature, because most public-key primitives are (i) time-consuming compared with symmetric-key cryptosystems; and (ii) using private information. One of the common solutions to this problem is to use what is called “server aided secret computation protocols”, denoted by SASCP [11], or sometimes it is called outsourcing protocols [12].
In SASCP, devices with limited power and resources, such as smart cards, can execute public-key primitives efficiently with the aid of an untrusted powerful server without revealing the private information. Examples of such protocols that used ASeqs are [6,11,13]. Other protocols and their security analysis are [12,14]. Another and similar solution to the problem is to define a delegation protocol. It is a protocol that satisfies two security objectives: (i) privacy: the private information should not be recovered by a passive attacker; and (ii) verifiability: the untrusted server should not be able to make the devices accept an invalid value as the result of the delegated computation. Examples of such protocols and their security analysis are [12,15,16,17].
The main challenge of finding a shortest ASeq, i.e., the minimal number of additions needed to compute all elements of N, that it is NP-complete [4]. Additionally, when the size of N is large and the size of exponents is large, the running time for finding ASeq is very large [18]. Therefore, designing a fast algorithm for generating a short (not necessarily shortest) ASeq is interesting using metaheuristics techniques such as simulated annulling, ant colony and evolutionary algorithms.
In this paper, a new metaheuristic algorithm based on simulated annealing strategy is proposed to find a short ASeq for the set N. The proposed simulated annulling algorithm for ASeq has three advantages over the previous ASeq algorithms. The first advantage is the designed algorithm has running time less than the exact algorithm. The second advantage is the length of ASeq generated by the proposed algorithm is shorter than the ASeq generated by previous heuristic algorithms. The third advantage is that there is no comparative study between suboptimal algorithms and the exact algorithm in terms of the length of ASeq.
The remainder of this paper is organized as follows. Section 2 includes the related works of ASeq. In Section 3, the details of the proposed algorithm is given. Section 4 includes the dataset used in the experiments, and the results and analysis of the experimental studies for the proposed simulated annulling algorithm and other algorithms. Finally, Section 5 includes the conclusion of this paper and the future works.

2. Related Works

Algorithms for generating ASeq, i.e. k 1 , can be classified into two categories. The first category is to find a shortest ASeq. In fact, there are a few papers that discussed a generation of shortest ASeqs. Bleichenbacher [4] suggested an algorithm to find a shortest ASeq(N) with length r provided that we previously computed l y for all numbers y < m a x i m u m N , and l y < r .  He used the suggested algorithm to generate a shortest addition chain up to a certain number.
The authors in [18] suggested a branch and bound depth-first search algorithm to generate a shortest ASeq for any set N. The algorithm starts by computing a lower bound, Eq(3), and looking for an addition chain for the first element n 1 in the set N. Then, it extends the chain to addition sequence for { n 1 ,   n 2 } , and so on until it generates ASeq(N). The algorithm uses different strategies to speed up the generation as follows. (i) Using bounding sequences to prune some branches in the search tree, which cannot lead to a shortest ASeq. (ii) Determining an upper bound of l n 1 ,   n 2 ,   ,   n i ,   1 i k .   (iii) Using some sufficient conditions for star steps to skip the generation of non-star steps. (vi) If no ASeq(N) of length l is found, then the algorithm increases l by one and repeats the process until either l is equal to the length of the generated short ASeq produced by continued fraction (CF) method [19] or the algorithms finds a shortest ASeq. Recently, the authors in [20] used multicore systems to improve the generation of a shortest ASeq.
The second category is to find a short ASeq. Yao [3] presented an algorithm to compute g n 1 ,     g n 2 ,   , g n k in O ( lg n k + c i = 1 k ( log n i / l o g l o g ( n i + 2 ) ) multiplications for some constant c. Bos and Coster [21] proposed four methods to generate a short ASeq to use it in the window method [21]. The upper bound of the length of generated an ASeq, by the four methods, could be estimated, experimentally, by
l n 1 , n 2 , , n k 3 2 log n k + k + 1 ,
for n k 1000 .
Bergeron et al. [19] proposed an efficient method based on CF. The suggested method can be considered as an extension and unifying approach of some previously known methods (such as binary and k-ary methods [1]) for generating a short addition chain, i.e., ASeq with k=1.
Recall that the CF expansion of n / d , denoted by [ c 1 , …, c t ] ,   is
n d = c t + 1 c t 1 + 1                                                       + 1 c 2 + 1 c 1    
where d is an integer in the range 2 . . n 1 .
Bergeron et al. [19] suggested different strategies for choosing the value of d. One of the efficient strategies that produces a good suboptimal ASeq is dichotomic strategy, where
d = n 2 l o g 2 n / 2 .
Let N = n k , n k 1 , , n 1 ,   a n d L ( N ) denotes the length of the ASeq( N ) generated by CF using dichotomic strategy. Then
L N = L N n k + l q ,                                           i f   r e m = 0 ; L N n k + l q + 1 ,                                     i f   r e m = 1,2 L N { r e m } n k + l q + 1 ,                           o t h e r w i s e ;
where n k = q n k 1 + r e m , and
l n = α ,                                                       i f   n = 2 α ; 3 ,                                                       i f   n = 3 ; L { n , d } ,                                             o t h e r w i s e
where d is defined by Eq. (6).
Enge et. al. [22] proposed a special method to construct a short ASeq to find the first k nonzero terms in the sparse q-series belonging to the Dedekind eta function or the Jacobi theta constants. Nadia and Mourelle [23] used Anti Colony strategy to find a short ASeq. They tested the strategy for a small set of numbers. Abbas and Gustafsson [24] proposed a method based on integer linear programming to generate a short ASeq for a small set of numbers.
In all previous studies, there was not enough experimental study for generating a short ASeq with different sizes of the set N, or with different range values of each number in the set N. Also, there is no comparative study between suboptimal algorithms and the exact algorithm in terms of the length of ASeq.

3. The Proposed Method

In this section, we first present a brief description of the proposed algorithm that is based on simulated annealing strategy to find short ASeq, and then we present its details. The algorithm is named SAAS for simulated annealing addition sequence.
Initially, the algorithm starts by generating the initial state, A S 0 , using the CF method [19], and its energy is equal to the length of A S 0 , l A S 0 . Then, the algorithm assigns these two values to the best state and the best energy, respectively. After that, the algorithm repeats the following steps based on the number of Metropolis cycles, m, for a fixed temperature. In each iteration of this loop, the algorithm performs the following steps:
The first step is generating a new state, A S n e w , and its energy, l n e w . The second step is determining whether the algorithm accepts this new state or not. The algorithm accepts the new state and its energy, and then assigns these values to the best state and best energy if either of the following conditions is true. (1) if the energy of the new state is lower than the energy of the best state. (2) If the Boltzmann distribution is greater than a random real number in the range [0,1].
After completing the number of Metropolis cycles for a fixed temperature, the algorithm updates the temperature using the Kirkpatrick quenching method and repeats this process until it reaches the maximum number of annealing iterations.
The details of the algorithm steps are as follows.
Step 1: Generate the initial state, A S , using CF method for the set of exponents N = n 1 , n 2 , , n k , where A S = a s 0 , a s 1 , a s 2 , , a s l such that (1) a s 0 = 1 and a s 1 = 2 , (2) i , l i s.t. n i = a s l i and 1 i k , (3) L = l 1 , l 2 , , l k such that l i < l i + 1 and l = l k .
Step 2: Repeat the following m times:
Step 2.1: Generate a random integer number, r, from the range 0 , k 1 . This number will be used as a start point of mutation based on the elements of N.
Step 2.2: Generate a new state, A S n e w , by mutate A S , from the location l r . If r=0, then the algorithm mutates A S from the element a s 1 = 2 . Otherwise, the algorithm mutates the state A S  from a s l r = n r to n k . The process of generating the new elements from n i to n i + 1 is based on the following rules.
  • Rule # 1: Doubling the current element, a s j + 1 = 2   a s j .
  • Rule # 2: Summing the last two elements, a s j + 1 = a s j + a s j 1 .
  • Rule # 3: Summing the last element with any other random element in the sequence, a s j + 1 = a s j + a s h , 0 h < j .
This step can be done as follows (Steps 2.2.1-2.2.3).
Step 2.2.1 (Generate one element in the sequence): If the current goal is n i + 1 and the current ASeq is a s 0 ,     a s 1 ,   ,   a s l i = n i , a s l i + 1 , , a s l i + j ,   j 0 , then the steps of generating a new element in the chain are as follows.
  • d = n i + 1 a s l i + j
  •  If d = a s l i + j then apply rule # 1
  •  Else if d = a s l i + j 1  then apply rule # 2
  •    Else if d > a s l i + j then
  •       Generate a random real number α [ 0,1 ]
  •       If α 0.5 then apply the rule # 1
  •       Else
  •        Generate a random real number α 0,1
  •        If α 0.5 then apply the rule # 2
  •        Else
  •         Generate a random integer number r [ 0 , l i + j 2 ]
  •         Apply the rule # 3, where h=r.
  •      Else // d < a s l i + j
  •     Generate a random integer number r [ 0 , l i + j 2 ]
  •     Apply the rule # 3, where h=r.
  •     If the new element is less than or equal to n i + 1 then the element is
  •     accepted. Otherwise, decrease the value of r and apply rule #3 until
  •     we found a certain value of h such that the new element is less than or
  •     equal to n i + 1 .
Step 2.2.2 (Generate all elements between n i and n i + 1 ): Repeat Step 2.2.1 starting from j = 0 , and a s l i = n i , until the algorithm finds a s l i + j i = n i + 1 . In this case, the algorithm updates the value of l i + 1 = l i + j i ,   1 j i .
Step 2.3.3 (Generate the ASeq from n r to n k ): Repeat Steps 2.2.1 and 2.2.2 until generate n k . Therefore, A S n e w = a s 0 , a s 1 , , n r = a s l r , a s l r + 1 , , n i + 1 = a s l i + j i , , n k = a s l k 1 + j k 1 = a s j k 1 , j i 1 ; and L n e w = l 1 , l 2 , , l r , l r + 1 , l r + 2 , , l k .
Step 3: Test the acceptance of the new state by the following substeps.
  • If l k < l then A S = A S n e w and l = l k
  • Else generate a random real number r .
  • d e = l k l
  •  If e d e / T > r then A S = A S n e w and l = l k
Step 4: Decrease the temperature using Kirkpatrick quenching method: T = γ   T , where γ = 0.99 .
Step 5: Repeat Steps 2, 3, and 4 until reach the maximum number of annealing iterations.
The complete pseudocodes for the new proposed SAAS is given in Algorithms 1 and 2.
Algorithm 1: SAAS
Preprints 93909 i001
Algorithm 2: MutateAS
Preprints 93909 i002

3. Results and Discussions

This section demonstrates the experimental study and its analysis for measuring the performance of the SAAS algorithm compared to the exact and heuristic solutions, ExAS and CFAS, respectively. The three algorithms were programmed using the C language and run on a machine with a processor of speed of 2.5 GHz and a memory of 16 GB. Also, the three algorithms were compared by measuring the execution time in milliseconds and the length of the short/shortest sequence. The section consists of two subsections: data generation and results.

3.1. Data Generation

The data used in the experimental study is based on two factors. The first factor is the number of elements k in the set of exponents N . The experimental values of k are 2, 4, 6, 8, and 10. The second factor is the domain of each exponent in the set N. According to the window method and its variations, the range of exponents is the integer interval 1 ,   2 e 1 , where e is the window length (of size e-bits). Also, according to the performance of the window method, the value of each exponent should be odd. The experimental values of e are equal to 7, 8, 9, and 10. The reason for starting the values of e with 7, the running times for all compared algorithms are fast when e < 7 .
The methodology of generating the ASeq is based on fixing the size of the window, i.e., e-bits, say e=7, and then generating different sets N k , e  with lengths k= 2, 4, 6, 8, and 10. For each value of k, the algorithm generates 25 sets of exponents in the range   1 ,   2 e 1 . The process of generating different sets of exponents is as follows.
  • Set e to the maximum number of bits in the exponents, i.e., the window size.
  • Set the set N 0 , e = and i=2.
  • While i k = 10 do the following
  • Construct a new set N i , e ,  by adding two randomly odd numbers, in the range 1 . . 2 e 1 , to the set N i 2 , e , i . e . , N i , e = N i 2 , e { the two generated randomly odd numbers}
  • Set i=i+2.
  • Make sure that N i , e is sorted.
  • Repeat Steps 2-4, 25 times to generate 25 sets of exponents with at most e-bits.
  • Repeat Steps 1-5 for different size of exponents e=7, 8, 9, and 10.
The following example illustrates the generation of five sets with different values of k and fixed size of exponents e=8.
  • N 2,8 = 177 , 241 .
  • N 4,8 = 65 , 125 , 177 , 241 .
  • N 6,8 = 65 , 89 , 125 , 177 , 189 , 241 .
  • N 8,8 = 43 , 65 , 89 , 125 , 177 , 189 , 221 , 241 .
  • N 10,8 = 43 , 65 , 89 , 103 , 125 , 177 , 189 , 203 , 221 , 241

3.2. Results

The results of implementing the three algorithms on the generated data in terms of the length of the output are shown in Table 1. The first two columns represent the two factors e and k, while the three last columns represent the percentage of differences in the lengths of the output for the following cases: (1) ExAS and SAAS algorithms, (2) ExAS and CFAS algorithms, and (3) SAAS and CFAS algorithms. Since the exact algorithm always produces the shortest ASeq, the methodology for analyzing the results is computing the number of cases in which the lengths of ASeqs generated by the SAAS and CFAS algorithms are greater than the shortest ASeq generated by the ExAs algorithm. The percentages of these cases represent the third and fourth columns. Also, Table 1 presents the difference between the lengths of the ASeqs generated by the SAAS algorithm and those generated by the CFAS algorithm, see the, the last column in Table 1.
The analysis of data results shows the following observations.
First, as in Table 1, the percentage of the difference between the lengths of the ASeq generated by the exact algorithm, ExAS, and the heuristic algorithms, SAAS and CFAS, increases with the increase in the number of elements in the set N. For example, for fixed e=7 and k=2, 4, 6, 8, and 10, the percentages of cases that the exact algorithm generates ASeq with a length less than that generated by the SAAS algorithm are 12%, 40%, 56%, 76%, and 88%. Similarly, for the CFAS algorithm, the differences are 28%, 64%, 76%, 84%, and 92%.
Second, as in Table 1, the comparison between the lengths of ASeqs generated by the SAAS and CFAS algorithms, independent of the ExAS algorithm, , is presented in the last column. The data shows that the SAAS algorithm outperforms the CFAS algorithm in terms of the short ASeq for all studied cases.
Third, the length of the output generated by the SAAS algorithm is near to the shortest length compared to that generated by the CFAS algorithm. Figure 1 shows the distribution of difference between the length of the output for the SAAS algorithm (similarly the CFAS algorithm) and the output of the exact algorithm. It is clear that the SAAS algorithm generates short ASeq with lengths that are near to the shortest ASeq than that generated by the CFAS algorithm. For example, when e=8 and k=2, there are 20% of the instances where the length of ASeq generated by the SAAS algorithm is greater by one than the length of ASeq generated by the ExAS algorithm. On the other side, using the CFAS algorithm, there are 44% and 20% of instances have lengths greater than the shortest by one and two, respectively.
The comparison between the three algorithms, ExAS, SAAS, and CFAS, in terms of execution time is shown in Table 2. The analysis of data in the table demonstrates the following observations. (1) The fastest running time for all compared algorithms is CFAS algorithm. (2) The CFAS algorithm is not affected by the values of e and k in general. On the other side, the SAAS algorithm is slightly affected by increasing e and k, whereas the ExAS algorithm is significantly affected by increasing e and k. (3) The running time for the SAAS algorithm is affected by the two parameters, succNo and metropolis. The increase in the values of two parameters leads to a slight increase in the running time. (4) The running time for SAAS algorithm is faster than the exact algorithm, and the difference between the two algorithms in running time increases with increase in e and k. (5) The last column of Table 2 shows the percentage improvement for the SAAS algorithm compared to the exact algorithm.

5. Conclusion and Future Works

In this paper, finding a short addition sequence for a set of positive integers was studied. A new metaheuristic algorithm was proposed to find an addition sequence with short length. The proposed algorithm starts with generating sequence using continued fraction and then apply the simulated annealing strategy to improve the length of the sequence. The proposed algorithm is fast compared to the exact algorithm and able to generate addition sequence with length less than the previous heuristic algorithm.
The efficiency of the proposed algorithm was conducted with considering different parameters such as the number of elements in the set and the size of positive integer.
There are many research directions related to addition sequence such as (1) extend the concept of B-chains and verctorial chain to ASeq, (2) use high-performance system to accelerate the computation of ASeq, and (3) accelerating the multi-modular exponentiation used ASeq.

Author Contributions

Conceptualization, Hazem B. and Hatem M.; methodology, Hazem B. and Hatem M.; software, Hazem B. and Hatem M.; validation, Hazem B., Hatem B.; formal analysis, Hazem B.; data curation, Hatem B.; writing—original draft preparation, Hazem B., M. H., and Hatem M.; writing—review and editing, Hazem B., M.H., and Hatem B.; visualization, Hazem B., and M.H.; supervision, Hazem B.; project administration, Hazem B.; funding acquisition, Hazem B.

Funding

This research has been funded by Scientific Research Deanship at University of Ha’il - Saudi Arabia through project number IFP-22 025.

Data Availability Statement

Not applicable.

Acknowledgments

The authors would like to acknowledge the support provided by Scientific Research Deanship at University of Ha’il - Saudi Arabia through project number IFP-22 025.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Knuth, D.E. The Art of Computer Programming: Seminumerical Algorithms, 3rd ed.; Addison-Wesley: Reading, UK, 1997; Volume 2. [Google Scholar]
  2. Menezes, A.; van Oorschot, P.; Vanstone, S. Handbook of Applied Cryptography; CRC Press: Boca Raton, FL, USA, 1996. [Google Scholar]
  3. Yao, A. On the Evaluation of Powers. SIAM J. Comput. 1976, 5, 100–103. [Google Scholar] [CrossRef]
  4. Bleichenbacher, D. Efficiency and Security of Cryptosystems Based on Number Theory. Ph.D. Thesis, Swiss Federal Institue of Technology Zurich, Zurich, Switzerland, 1996. [Google Scholar]
  5. Fathy, K.; Bahig, H.; Farag, M. Speeding up multi-exponentiation algorithm on a multicore system. J. Egypt. Math. Soc. 2018, 26, 235–244. [Google Scholar] [CrossRef]
  6. Laih, C.; Yen, S.; Harn, L. Two efficient server-aided secret computation protocols based on the addition sequence. In Proceedings of the Advances in Cryptology-ASIACRYPT’91, Fujiyoshida, Japan, 11–14 November 1991; pp. 450–459. [Google Scholar]
  7. Bahig, H.M.; Nassr, D.I. Generating a Shortest B-Chain using Multi-GPUs. Inf. Sci. Lett. 2022, 11, 745–750. [Google Scholar]
  8. Guzmán-Trampe, J.E.; Cruz-Cortés, N.; Perez, L.J.D.; Ortiz-Arroyo, D.; Rodríguez-Henríquez, F. Low-cost addition–subtraction sequences for the final exponentiation in pairings. Finite Fields Their Appl. 2014, 29, 1–17. [Google Scholar] [CrossRef]
  9. Thurber, E.; Clift, N. Addition chains, vector chains, and efficient computation. Discret. Math. 2021, 344, 112200. [Google Scholar] [CrossRef]
  10. Downey, P.; Leong, B.; Sethi, R. Computing sequences with addition chains. SIAM J. Comput. 1981, 10, 638–646. [Google Scholar] [CrossRef]
  11. Laih, C.; Yen, S. Secure addition sequence and its applications on the server-aided secret computation protocols. In Proceedings of the Advances in cryptology-AUSCRYPT’92, Gold Coast, Australia, 13–16 December 1992; Lecture Notes in Computer Science. Volume 718, pp. 219–229. [Google Scholar]
  12. Bouillaguet, C.; Martinez, F.; Vergnaud, D. Cryptanalysis of Modular Exponentiation Outsourcing Protocols. Comput. J. 2022, 65, 2299–2314. [Google Scholar] [CrossRef]
  13. Matsumoto, T.; Kato, K.; Imai, H. Speeding Up Secret Computations with Insecure Auxiliary Devices. In Advances in Cryptology — CRYPTO’ 88. CRYPTO 1988; Goldwasser, S., Ed.; Lecture Notes in Computer Science; Springer: New York, NY, USA, 1990; Volume 403. [Google Scholar] [CrossRef]
  14. Nguyen, P.; Shparlinski, I.E. On the Insecurity of a Server-Aided RSA Protocol. In Advances in Cryp-tology — ASIACRYPT 2001. ASIACRYPT 2001; Boyd, C., Ed.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2001; Volume 2248. [Google Scholar] [CrossRef]
  15. Chen, X.; Li, J.; Ma, J.; Tang, Q.; Lou, W. New Algorithms for Secure Outsourcing of Modular Exponentiations. IEEE Trans. Parallel Distrib. Syst. 2014, 25, 2386–2396. [Google Scholar] [CrossRef]
  16. Chevalier, C.; Laguillaumie, F.; Vergnaud, D. Privately outsourcing exponentiation to a single server: cryptanalysis and optimal constructions. Comput. Secur.–ESORICS 2016, 261–278. [Google Scholar] [CrossRef]
  17. Di Crescenzo, G.; Khodjaeva, M.; Kahrobaei, D.; Shpilrain, V. Delegating a Product of Group Exponentiations with Application to Signature Schemes (Submission to Special NutMiC 2019 Issue of JMC). J. Math. Cryptol. 2020, 14, 438–459. [Google Scholar] [CrossRef]
  18. Bahig, H.M. A new strategy for generating shortest addition sequences. Computing 2011, 91, 285–306. [Google Scholar] [CrossRef]
  19. Bergeron, F.; Berstel, J.; Brlek, S. Efficient computation of addition chains. J Theor Nombres Bord 1994, 6, 21–38. [Google Scholar] [CrossRef]
  20. Bahig, H.M.; Kotb, Y. An Efficient Multicore Algorithm for Minimal Length Addition Chains. Computers 2019, 8, 23. [Google Scholar] [CrossRef]
  21. Bos, J.; Coster, M. Addition Chain Heuristics. In Advances in Cryptology — CRYPTO’ 89 Proceedings. CRYPTO 1989; Brassard, G., Ed.; Lecture Notes in Computer Science; Springer: New York, NY, USA, 1990; Volume 435. [Google Scholar] [CrossRef]
  22. Enge, A.; Hart, W.; Johansson, F. Short Addition Sequences for Theta Functions. J. Integer Seq. 2018, 21, 18.2.4. [Google Scholar]
  23. Nedjah, N.; de Macedo Mourelle, L. Colony. In Knowledge-Based Intelligent Information and Engineering Systems; Khosla, R., Howlett, R.J., Jain, L.C., Eds.; KES 2005. Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3684. [Google Scholar] [CrossRef]
  24. Abbas, M.; Gustafsson, O. Integer Linear Programming Modeling of Addition Sequences with Additional Constraints for Evaluation of Power Terms. arXiv 2023, arXiv:2306.15002. [Google Scholar] [CrossRef]
Figure 1. Percentage of differences in terms of the length of ASeq for the cases: (i) ExASt & SAAS, and (ii) ExaAS & CFAS. The bar in the figure contains four colors at maximum. The gold, green, blue and red colors represent the percentage of cases that have difference equal to 1, 2, 3, and 4, respectively. The figure includes four subfigures in case of (a) e=7, (b) e=8, (c) e=9, and (d) e=10. Each subfigure contains five pairs of bars, one bar for SAAS algorithm and the other for CFAS algorithm. The five pairs of bars represent the five cases k=2,4, 6, 8, and 10.
Figure 1. Percentage of differences in terms of the length of ASeq for the cases: (i) ExASt & SAAS, and (ii) ExaAS & CFAS. The bar in the figure contains four colors at maximum. The gold, green, blue and red colors represent the percentage of cases that have difference equal to 1, 2, 3, and 4, respectively. The figure includes four subfigures in case of (a) e=7, (b) e=8, (c) e=9, and (d) e=10. Each subfigure contains five pairs of bars, one bar for SAAS algorithm and the other for CFAS algorithm. The five pairs of bars represent the five cases k=2,4, 6, 8, and 10.
Preprints 93909 g001
Table 1. Comparison between three algorithms in terms of the length of ASeq.
Table 1. Comparison between three algorithms in terms of the length of ASeq.
Percentage of cases when
e k A S S A A S > A S E x A S A S C F A S > A S E x A S A S C F A S > A S S A A S
7 2 12% 28% 16%
4 40% 64% 36%
6 56% 76% 44%
8 76% 84% 20%
10 88% 92% 20%
8 2 20% 56% 44%
4 32% 68% 52%
6 80% 92% 40%
8 82% 92% 36%
10 92% 96% 32%
9 2 16% 56% 44%
4 44% 80% 56%
6 84% 88% 36%
8 92% 96% 32%
10 96% 100% 28%
10 2 16% 72% 60%
4 52% 80% 32%
6 88% 100% 24%
8 92% 100% 16%
10 100% 100% 16%
Table 2. Comparison between different algorithms in terms of running time in milliseconds.
Table 2. Comparison between different algorithms in terms of running time in milliseconds.
e
 
k
 
Exact Alg.
 
SAAS Alg.
 
CF Alg.
 
% of improvement
SAAS & ExAS
7 2 10 65 1 ---
4 12 76 1 ---
6 14 89 1 ---
8 16 95 2 ---
10 17 99.4 2 ---
8 2 12.44 81.84 1 ---
4 107 101.1 2 5.51%
6 175 112.2 2 35.89%
8 245 114.52 3 53.26%
10 307 116.3 4 62.12%
9 2 13 107.24 2 ---
4 423 131.23 2 68.98%
6 4375.64 144.52 3 96.70%
8 14782.28 158.24 4 98.93%
10 46592.12 162.2 4 99.65%
10 2 14.92 147.36 4 ---
4 57827.28 166.6 4 99.71%
6 805166.32 177.56 16 99.98%
8 15878846.4 185.7 16 100%
10 58645310 197.2 18 100%
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.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated