Next Article in Journal
Design and Implementation of a Quantum-Assisted Digital Signature
Previous Article in Journal
A Self-Sovereign Identity Blockchain Framework for Access Control and Transparency in Financial Institutions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On the Effectiveness of a Common Attack to Chebyshev Chaotic Encryption Scheme

by
Xiaoqi Liu
1,† and
Guillermo Morales-Luna
2,*,†
1
Mathematics & Computer Science Program, Guangdong Technion Israel Institute of Technology, Shantou 515063, China
2
Computer Science Department, Cinvestav, Mexico City 07300, Mexico
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Cryptography 2025, 9(1), 10; https://doi.org/10.3390/cryptography9010010
Submission received: 7 December 2024 / Revised: 18 January 2025 / Accepted: 27 January 2025 / Published: 29 January 2025

Abstract

:
Chebyshev polynomials define a rather canonical chaotic cryptosystem and some strong attacks have been designed to that cryptosystem. We report the numerical experiments performed with multiple precision arithmetic using conventional software as gmp and mpfr to test the Chebyshev cryptosystem and Bergamo’s attack. As a conclusion, we point out the relevance in the cryptosystem robustness of the number of significant digits (length) of plaintexts and the number of correct digits (precision) of the arithmetical calculations. Furthermore, after the observed experimental results, we use techniques of Numerical Analysis to explain the occurrences of the observed results and to reinforce the importance of the above-mentioned parameters and m.

1. Introduction

The sequence T r ( X ) r N of Chebyshev polynomials provides a typical example of a chaotic system and it was used to obtain a well-known and exhaustively analyzed public-key encryption scheme based on chaos [1,2,3]. For any index r, T r ( X ) has degree r and its restriction to the open real interval I = ( 1 , + 1 ) has as an image this interval, namely it is an onto map I I ; hence, the corresponding cryptosystem has I as the space of both plaintexts and ciphertexts. Since the sequence of Chebyshev polynomials forms a semigroup, namely for any r , s N , T r T s ( X ) = T r s ( X ) , the sequence has served as the basis of several chaotic cryptosystems:
  • For encryption, a public key has the form ( x , y ) = ( x , T s ( x ) ) for x I and s Z + is the private key. Then, for a message μ I the ciphertext is ( c 0 , c 2 ) = ( T r ( x ) , μ · T r ( y ) ) , where r Z + is a random index selected by the sender of the message, and for decryption, the owner of the private key calculates c 2 T s ( c 0 ) ,
  • For key agreement (KA), the classic Diffie–Hellman KA scheme can be translated quite directly by the semigroup property [4],
  • For authentication, a general scheme is introduced in [5] in which servers should authenticate client using a central registry (RC). Each server has a key s j and each client an index r i and the corresponding Chebyshev polynomials are evaluated on secret numbers owned by the RC; hence, the servers and the clients just know the values of their polynomials at the secret points. Also, there is an interesting application of the sequence of Chebyshev polynomials for Radio Frequency IDentification (RFID), where the index s is broadcasted by a transceiver and each transponder selects a particular index r and codifies it in order to form an identification label [6],
  • For image encryption the chaotic methods have been extensively used as well as some refinements of chaotic maps [7,8].
In [9] the behaviour Chebyshev sequence in modular arithmetic, as well as its impact on the security of cryptosystems have been analyzed within the context of Number Theory.
In 2005 the most common attack to this cryptosystem was introduced [10] (see [4,11] as well). The attack strategy is based on solving equations of the form T r ( x ) = c for x , c I with respect to index r. To this end, they are considered just real numbers in I with a finite-length decimal representation. For any m Z + , let I m be the collection of numbers in I whose decimal representation consists of m digits. Thus, by multiplying the involved real numbers by the power 10 m the stated problem gives rise to congruence relations on the integers solvable by Number Theory techniques.
We performed several experiments in order to test Bergamo’s attack [10] using multiple precision arithmetic provided by the already conventional software tools gmp [12] and mpfr [13], we report here the results. We consider a length   Z + for the specification of plaintexts and a precision  m Z + , with m , for the number of significant digits in decimal representation. The space of plaintexts is coded as the set of words of length with symbols in { 0 , 1 , , 9 } , with cardinality 10, and the space of ciphertexts is the set of words of length m with symbols in { 0 , 1 , , 9 } .
Bergamo’s attack [10] is effective whenever is known by the attacker. This attack technique would produce several possible solutions for the recovering secret key depending on the assumed value of the length . An exhaustive search for the right secret key may still be rather costly. The length may be part of the private key in the chaotic crypto-scheme.
The purpose of the current report is to illustrate the importance of fixing the length of the plaintexts and the precision m among the participants in the crypto scenario.
It is worth mentioning that some similar remarks related to the difficulties in making the attack in [10] effective have been pointed out in [5] and the authors consider attacks based on impersonation. In [14], the importance of limiting the numerical domains of Chebyshev polynomials is also pointed out.
In Section 2, we recall the Chebyshev polynomials and in Section 3, we recall the corresponding chaotic cryptosystem and the attack in [10]. In Section 4, we present the performed experiments. Our contribution consists in testing the effectiveness of Bergamo’s attack. We have concluded that it is essential for the attacker to know the length of plaintexts and certainly the arithmetical precision should be greater than this length.

2. Chebyshev Polynomials

We use the following notation: we write for any i , j Z , i j , [ [ i , j ] ] = { i , , j } , and for any a , b R , with a < b we may consider open, semiclosed or closed intervals:
( a , b ) = { x R | a < x < b } , ( a , b ] = { x R | a < x b } , [ a , b ) = { x R | a x < b } , [ a , b ] = { x R | a x b } .
For a radix R Z + , R > 1 , let D R = [ [ 0 , R 1 ] ] be the collection of R digits, then for each m Z + , D R [ R m ] will denote the set of real numbers in ( 1 , 1 ) that can be written as polynomial expressions in terms of R m with coefficients in D R , in other words D R [ R m ] is the set of fractional numbers than can be written with exactly m digits in radix R.
As a very basic trigonometric identity, we recall that for any n Z + and any z [ 0 , π ] :
cos ( ( n + 1 ) z ) + cos ( ( n 1 ) z ) = 2 cos ( z ) cos ( n z ) .
Furthermore, cos ( 0 z ) = 1 and cos ( 1 z ) = cos ( z ) . With the change of variable [ 0 , π ] [ 1 , + 1 ] , z x = cos ( z ) (see Figure 1), the sequence of Chebyshev polynomials follows:
T 0 ( X ) = 1 ; T 1 ( X ) = X n 1 : T n + 1 ( X ) = 2 X T n ( X ) T n 1 ( X )
Remark 1.
The sequence T n n N is a semigroup, namely n , m : T n T m = T n · m .
Indeed, using the above-mentioned change of variables, x [ 1 , 1 ] :
T n T m ( x ) = T n ( T m ( x ) ) = T n ( cos ( m z ) ) = cos ( n arccos ( cos ( m z ) ) ) = cos ( n m z ) = T n m ( x ) .
From the definition of the Chebyshev polynomials,
T n 1 ( X ) T n ( X ) = 0 1 1 2 X · T n 2 ( X ) T n 1 ( X )
hence
t n ( X ) = M ( X ) n 1 t 1 ( X )
where t n ( X ) = T n 1 ( X ) T n ( X ) and M ( X ) = 0 1 1 2 X .
   Let us write the powers of matrix M ( X ) as
M ( X ) n = p 00 n ( X ) p 01 n ( X ) p 10 n ( X ) p 11 n ( X ) .
Then
p 00 , n + 1 ( X ) p 01 , n + 1 ( X ) p 10 , n + 1 ( X ) p 11 , n + 1 ( X ) = M ( X ) n + 1 = M ( X ) · M ( X ) n = 0 1 1 2 X · p 00 n ( X ) p 01 n ( X ) p 10 n ( X ) p 11 n ( X ) = p 10 n ( X ) p 11 n ( X ) p 00 n ( X ) + 2 X p 10 n ( X ) p 01 n ( X ) + 2 X p 11 n ( X )
hence
p 001 ( X ) p 011 ( X ) p 101 ( X ) p 111 ( X ) = 0 1 1 2 X ,
p 00 , n + 1 ( X ) p 01 , n + 1 ( X ) p 10 , n + 1 ( X ) p 11 , n + 1 ( X ) = p 10 n ( X ) p 11 n ( X ) p 00 n ( X ) + 2 X p 10 n ( X ) p 01 n ( X ) + 2 X p 11 n ( X ) .
From here, it follows that n Z + : deg ( p 11 n ( X ) ) = n .
The powers of the matrix M ( X ) can be calculated via square-and-product:
r = i = 0 k r i 2 i M ( X ) r = i = 0 k M ( X ) 2 i r i ,
namely, by the procedure sketched in Algorithm 1.
Algorithm 1 Square-and-product procedure
Input:  The matrix M ( X ) and the integer r Z +
Output:  The power M ( X ) r
1.
  Express r in binary, r = ( r k r 1 r 0 ) 2 ;
2.
   P : = I 2 (the identity matrix of order 2 × 2 );
3.
   S : = M ( X ) (this matrix will be squared at each step);
4.
  for i = 0 to k do
  (a)
  if r i = = 1 then P : = S P ;
  (b)
   S : = S S ;
5.
  output P
The Chebyshev polynomials are defined in the interval [ 1 , + 1 ] , and the absolute values of the points in this domain are in the unit interval [ 0 , 1 ] .
Consider the conventional decimal radix, R = 10 . Suppose that x [ 1 , + 1 ] is such that x D 10 [ 10 m ] for some m Z + , then there is an integer x m [ [ 10 m , + 10 m ] ] such that x = x m 10 m , or x m = 10 m x . Consequently, from relations (1) and (2) it follows that
n Z + : p 11 n ( x ) D 10 [ 10 n m ] .
Furthermore,
10 m M ( x ) = 10 m 0 1 1 2 x = 0 10 m 10 m 2 x m = : N x m Z 2 × 2
and
n Z + : M ( x ) n = 10 n m N x m n .
On the other hand, from step 4(a) of the procedure in Algorithm 1
S P = 1 10 2 m ( 10 m S ) ( 10 m P )
as well as, from step 4(b),
S S = 1 10 2 m ( 10 m S ) ( 10 m S ) .
Through these relations, the square-and-product algorithm can be performed within multiple precision arithmetic in [ 1 , 1 ] using a multiple precision arithmetic on the integers.
Remark 2.
In the current experiments, we calculate the Chebyshev polynomials through the above “square-and-product” method in order to maintain the multiple precision of the calculations through additions and products and to avoid the dependency of implementations of the maps cos and arccos.

3. The Cryptosystem Based on Chebyshev Polynomials

3.1. The General Scheme

The following is a public-key encryption scheme where the plaintext space and the ciphertext space are both the real interval [ 1 , 1 ] :
Key generation
Choose x [ 1 , 1 ] and s Z + large enough. The public key is ( x , y ) = ( x , T s ( x ) ) and the private key is s. See Table 1 below to obtain an estimation of the order of s with respect to the number of exact digits of x and the precision of the used real arithmetic.
Encryption
For a plaintext μ [ 1 , 1 ] , choose a random index r Z + , and calculate c 0 = T r ( x ) , c 1 = T r ( y ) , c 2 = μ c 1 . The ciphertext is c = ( c 0 , c 2 ) .
Decryption
Given the ciphertext c = ( c 0 , c 2 ) recover the message as μ = c 2 T s ( c 0 ) .
Hence, the time complexity of the encryption procedure is
time C h ( m , r ) = O M ( m · r ) r log r
where M ( k ) is the time complexity of the chosen algorithm for multiplication in D R [ R m ] , m is the precision of calculations and r is the chosen random number.
Table 1. Relations between length , precision m and secret key s.
Table 1. Relations between length , precision m and secret key s.
msNOAvDiscAvTime (s)
100120 10 8 1815 2.969 · 10 108 0.00090
140 10 16 6306 4.067 · 10 112 0.00335
180 10 32 24582 1.167 · 10 117 0.01414
240 10 64 103427 4.709 · 10 112 0.07522
380 10 128 380561 5.433 · 10 119 0.46595
640 10 256 1589338 1.865 · 10 113 3.92343
1180 10 512 6091120 2.019 · 10 102 39.40116
200220 10 8 1815 3.132 · 10 205 0.00113
240 10 16 6306 8.434 · 10 208 0.00457
280 10 32 24582 8.226 · 10 215 0.02075
340 10 64 103427 1.024 · 10 208 0.11672
480 10 128 380561 1.174 · 10 213 0.64108
740 10 256 1589338 1.579 · 10 210 5.00373
1280 10 512 6091120 3.132 · 10 218 43.47840
300320 10 4 418 2.051 · 10 307 0.00045
340 10 8 1815 2.314 · 10 320 0.00202
340 10 16 6306 2.197 · 10 304 0.00696
380 10 32 24582 3.078 · 10 311 0.03044
440 10 64 103427 1.150 · 10 304 0.15059
580 10 128 380561 4.789 · 10 311 0.78394
840 10 256 1589338 8.638 · 10 305 6.22619
1380 10 512 6091120 3.156 · 10 314 46.61281
400420 10 4 418 1.079 · 10 403 0.00049
440 10 8 1815 1.755 · 10 416 0.00259
460 10 16 6306 2.497 · 10 420 0.00933
480 10 32 24582 1.720 · 10 407 0.04019
560 10 64 103427 7.364 · 10 421 0.20285
680 10 128 380561 9.281 · 10 407 1.03725
940 10 256 1589338 1.974 · 10 402 6.52374
1480 10 512 6091120 6.663 · 10 411 50.79987
NO: Number of operations (multiplications); Disc: Discrepancy between plaintext and recovered text: Each row displays averaged statistics corresponding to 20 iterations for random selections of the index r in the interval [ [ s 2 , s ] ] .
With respect to the Decryption Procedure let us make a remark:
Suppose that a number x in the open interval ( 0 , 1 ) is written in radix R as x = i = 1 m 1 x i R i , with digits x i [ [ 0 , R 1 ] ] , namely x D R [ R m 1 ] . Then, for any m 0 < m 1 :
x = i = 1 m 0 x i R i + i = m 0 + 1 m 1 x i R i = : x m 0 ¯ + x m 1 m 0 ¯ ,
where x m 0 ¯ is the decimal number expressed by the first m 0 digits of x and x m 1 m 0 ¯ = x x m 0 ¯ . Thus
x m 1 m 0 ¯ = i = m 0 + 1 m 1 x i R i = R ( m 0 + 1 ) j = 0 m 1 ( m 0 + 1 ) x m 0 + 1 + j R j < R ( m 0 + 1 ) j = 0 m 1 ( m 0 + 1 ) R R j = R m 0 1 1 R 1 = 1 R 1 R ( m 0 1 )
besides
R m 1 x = R m 1 x m 0 ¯ + x m 1 m 0 ¯ = R m 1 m 0 R m 0 x m 0 ¯ + R m 1 x m 1 m 0 ¯ Z .
Assume now that there are given two numbers a , b D R [ R m 1 ] , b 0 . By expressing them as in (5),
R m 1 a = R m 1 m 0 R m 0 a m 0 ¯ + R m 1 a m 1 m 0 ¯ R m 1 b = R m 1 m 0 R m 0 b m 0 ¯ + R m 1 b m 1 m 0 ¯
thus by division there are quotients q , q m 0 Z and remainders r [ [ 0 , R m 1 b 1 ] ] , r m 0 [ [ 0 , R m 0 b m 0 ¯ 1 ] ] such that
R m 1 a = q R m 1 b + r
R m 0 a m 0 ¯ = q m 0 R m 0 b m 0 ¯ + r m 0
From Equation (7),
R m 1 a m 0 ¯ = R m 1 m 0 R m 0 a m 0 ¯ = R m 1 m 0 q m 0 R m 0 b m 0 ¯ + R m 1 m 0 r m 0 = q m 0 R m 1 b m 0 ¯ + R m 1 m 0 r m 0
by substracting (8) from (6)
R m 1 a m 1 m 0 ¯ = R m 1 a R m 1 a m 0 ¯ = q R m 1 b + r ( q m 0 R m 1 b m 0 ¯ + R m 1 m 0 r m 0 )
hence from (4)
R m 1 q b q m 0 b m 0 ¯ + r R m 1 m 0 r m 0 < R m 1 1 R 1 R ( m 0 1 ) = R R 1 R m 1 m 0
and this last inequality entails q R m 1 m 0 q m 0 < R m 0 , consequently the radix-R expression of q and q m 0 coincide up to the ( m 0 1 ) -digit.
In summary:
Lemma 1.
If a , b D R [ R m 1 ] , b 0 , for any m 0 [ [ 1 , m 1 1 ] ] the quotients a b and a m 0 b m 0 coincide up to the ( m 0 1 ) -digit.
Thus, in the Chebyshev encryption scheme the precision m, which is the number of significant digits in the arithmetical calculations within the interval [ 1 , 1 ] , shall be greater than the length of plaintexts since in the decryption process a division is involved. However, due to Lemma 1, for any m 0 [ [ + 1 , m ] ] the recovered plaintext is plausible up to the ( m 0 1 ) -th digit. In order to determine the original plaintext the decipherer should know .
In an attack on the cryptosystem, given a public key ( x , y ) and the ciphertext ( c 0 , c 1 ) , the random index r Z + such that T r ( x ) = c 0 should be recovered and the plaintext should be μ m = c 1 T r ( y ) consisting of m digits where m is the precision of calculations. The original plaintext shall be the -length prefix μ of μ m . Thus, a brute force procedure to recover is to look for the first length such that Encryption ( μ , r ) = ( c 0 , c 1 ) . According to (3), the cost in time of this procedure is
O m · time C h ( m , r ) = O m M ( m · r ) r log r .
It is worth mentioning that in this consecutive search, for some tested lengths Bergamo’s attack, presented below, fails because the conditions stated in Section 3.2.1 are not satisfied.

3.2. Bergamo’s Attack

Let us recall first some basic facts of number theory.

3.2.1. Solving Linear Equations in Remainder Rings

Let M Z + be a modulus greater than 1 and consider the equation b x = a mod M , with a , b Z M .
  • If b Z M * then the solution x = a b 1 mod M is unique.
  • If b Z M { 0 } and d = gcd ( b , M ) > 1 , the equation has a solution if and only if d | a . In this case, express d = c 0 b + c 1 M , then for x 0 = c 0 a d we have
    b x 0 = b c 0 a d = ( d c 1 M ) a d = a c 1 a d M = a mod M ,
    hence x 0 is a solution and all residues of the form x = x 0 + j M d , j [ [ 0 , d 1 ] ] are solutions as well.

3.2.2. A Number Theory Problem

Consider the following
Main Problem : Given   a , b ( 0 , 1 [ find   k Z : a + b k Z a + b k Z .
We consider in particular the case in which the following condition holds:
a , b   have   a   finite - length   representation   in   a   radix ,   say   R ,   namely , for   an   m Z + , a , b D R [ R m ] .
Assume that a + b k = z with z Z . Then, ( a R m ) + ( b R m ) k = z R m , and this last equation is stated over Z . By writing a m = a R m and b m = b R m the equation is equivalent to
b m k = a m mod R m .
In fact:
b m k = a m mod R m b m ( R m k ) = a m mod R m .
Hence, the sign in the right side of (11) is not relevant and just an equation in (9) may be considered.
As mentioned in Section 3.2.1, if gcd ( b m , R m ) = 1 then the unique solution of (11) is k = a m b m 1 in Z R m * . If d = gcd ( b m , R m ) > 1 and d = c 0 b m + c 1 R m , only when d | a m the equation (11) can be solved and its d solutions are given as c 0 a m d + j R m d , j [ [ 0 , d 1 ] ] .
In summary:
Remark 3.
With the above notation, Equation (11) has solutions if d | a m where d = gcd ( b m , R m ) , and d is the number of solutions.
If we deal just with rational numbers in [ 1 , + 1 ] then for any radix R Z + any such rational number has a periodic R-representation. But for any pair of rational numbers, there is a radix such that those numbers have finite representations for that radix.
Remark 4.
Whenever a , b Q ( 0 , 1 ] , a radix R may be found such that for the main problem, a , b D R [ R m ] for some length m Z + .
Proof. 
For a rational number a b ( 0 , 1 ] , with a , b Z + , a < b , and a radix R Z , let α 0 = a and m 1 = 0 . For any current index i, let k i N be the minimum power such that α i R k i b and m i = m i 1 + k i . Then, α i R k i = a i b + α i + 1 with a i [ [ 0 , R 1 ] ] and α i + 1 [ [ 0 , b 1 ] ] . Thus, the radix-R expression of the rational number a b consists of 0’s except that at each entry m i there appears the digit a i . Since the remainder sequence ( α i ) i takes values on the finite set [ [ 0 , b 1 ] ] , it is eventually periodic and so is the digit sequence ( a i ) i . Clearly, the length of the period will be bounded by the denominator b; and if there is an index i such that α i + 1 = 0 then a b Z [ R m i ] . Obviously, for R = b such an index exists. □

3.2.3. The Attack

Each Chebyshev polynomial may be written as T n ( x ) = cos ( n arccos ( x ) ) .
Given the public key ( x , y ) of Alice, the attacker, Eve, looks for r Z + such that T r ( x ) = c 0 , then she evaluates c 1 : = T r ( y ) and she recovers the plaintext as μ = c 2 c 1 .
Consider the sequence
C x c 0 = arccos ( c 0 ) + 2 k π arccos ( x ) k Z arccos ( c 0 ) + 2 k π arccos ( x ) k Z R .
Remark 5.
r Z + : T r ( x ) = c 0 r C x c 0 .
Proof. 
Indeed, let r Z + .
⇒)
Assume r C x c 0 and that for some k Z , r = arccos ( c 0 ) + 2 k π arccos ( x ) (the case in which r = arccos ( c 0 ) + 2 k π arccos ( x ) is similar because cos is an even function). Then
cos ( arccos ( x ) r ) = cos arccos ( x ) arccos ( c 0 ) + 2 k π arccos ( x ) = cos arccos ( c 0 ) + 2 k π = cos arccos ( c 0 ) = c 0
⇐)
Assume T r ( x ) = c 0 , then r arccos ( x ) = arccos ( c 0 ) and necessarily r C x c 0 .    □
Let a = arccos ( c 0 ) arccos ( x ) and b = 2 k π arccos ( x ) . We may calculate arccos by its Taylor series  [15]:
For | x | < 1 : arccos ( x ) = π 2 k = 0 + x 1 + 2 k κ = 0 k 1 x 2 2 κ + 1 2 κ + 2 .
Eve’s goal consists in recovering r Z + such that
k Z : a + b k = r a + b k = r ,
or in an equivalent form, we have:
Find   k Z : either ( a mod 1 ) + k ( b mod 1 ) Z + or ( a mod 1 ) + k ( b mod 1 ) Z + .
Thus, Eve’s goal (13) is an instance of the main problem (9) and it can be solved, by the method seen in Section 3.2.2.
As a final remark in this section we point out that if k , r are solutions of (12), then for a sign ε { 1 , + 1 } ,
ε arccos ( c 0 ) = r arccos ( x ) 2 k π .

4. Experiments

We have used the Multiple Precision Arithmetic provided by gmp: the gnu Multiple Precision Arithmetic Library, operating on signed integers, rational numbers, and floating-point numbers. The main used function categories and data structures are mpz, the high-level signed integer arithmetic structure, and mpf, the high-level floating-point arithmetic structure. The used version is gmp 6.3.0.
When dealing with Bergamo’s attack, we used the High Performed Trigonometric Function provided by mpfr: the gnu Multiple Precision Floating-Point Reliable Library. The used version is mpfr 4.2.1.
The platform was a computer with a processor intel(r) core(tm) i7-10750h cpu @ 2.60 ghz and 64-bit operating system ubuntu 22.04.3 lts.
The precision of any mpf structure from gmp, namely the number of digits in the decimal part of floating numbers, can be fixed in advance. Since log 2 ( 10 ) 3.2 , N digits precision shall be required by the built-in function mpf_set_default_prec( 3.2 · N ), where the function only supports argument with N a multiple of 20. Alternatively, N digits precision may be required by the built-in function mpfr::mpreal::set_default_prec( 3.33 · N ), for any integer N. Nevertheless, the arithmetic still loses digits beyond the specified precision.
In our experiments, we use two precision parameters:
  • : number of digits to codify plaintexts, we will refer to this parameter as length,
  • m: precision of arithmetical calculations in gmp and mpfr, we will refer to this parameter as precision by itself.
In order to obtain correct crypto operations, for any given length , the secret keys s and the random indices r shall be bounded from above and the precision m shall be bounded from below (see Table 1 below).

4.1. A Numerical Example for Symmetric Block Ciphering

Let μ be the ascii simple message:
                   Hi! I’m Xiaoqi.
                   Nice to meet you! ^_^
consisting of 38 characters (there is a Line Feed at the end of each row). We take = 100, and m = 120 as we discussed above in this example. Since 100 8 = 12 , we can split the message into 4 sections, 3 consisting of 12 characters and the last of 2 characters. Each ascii symbol is a byte and we write it in bits. By concatenating these bit strings we codify the message by the following real numbers expressed in radix 10 with = 96 = 12 · 8 “significant digits”:
x 0 = 0.010010000110100100100001001000000100100100100111 011011010010000001011000011010010110000101101111 , x 1 = 0.011100010110100100101110000010100100111001101001 0110001101100101001000000111010001101111001 , x 2 = 0.011011010110010101100101011101000010000001111001 011011110111010100100001001000000101111001011111 , x 3 = 0.010111100000101 .
With secret key:
s = 100000000 = 10 8
we calculate the public key ( x , y ) = ( x , T s ( x ) ) where
x = 0.111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111 1111111111111111 , y = 0.18814040799950743365079853649690904592037149891015 60025733572256087872987422552175312563914718206977 01208500438767478 .
In order to cipher, we consider the index
r = 50000000 = 10 8 2
then
c 0 = T r ( x ) = 0.63712620099964989838379022273202966608309142004703 95526936628991032039023673808752686692047258891779 52974562960402237
and by making c 1 j = x j · T r ( y ) , for j [ [ 0 , 3 ] ] , we obtain the following values for the second entries of the ciphertexts:
c 10 = 0.009445053383906845090333757525690843288709928928825 01800250586160808163588618939290696190069021278695 80364061056324859 , c 11 = 0.010473545144721555820569852972432275743747523235501 68388586972875746923277080577905161530296641668282 3844352563913556 , c 12 = 0.010389568147441647850994177502777150289696917683650 71968973418687747841165698228908959059526383578938 21486076187951678 , c 13 = 0.009540447374682341741591475088180184070674785807833 26051227973824647541225502961370205012402245410258 799535033258606012 .
In order to decipher, we calculate the values z j = c 1 j c 0 , for j [ [ 0 , 3 ] ] , and we obtain the following values:
z 0 = 0.010010000110100100100001001000000100100100100111011011 01001000000101100001101001011000010110111100000000000 02488501815 , z 1 = 0.011100010110100100101110000010100100111001101001011000 11011001010010000001110100011011110010000000000000000 02759480021 , z 2 = 0.011011010110010101100101011101000010000001111001011011 11011101010010000100100000010111100101111100000000000 0273735448 , z 3 = 0.010111100000101000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000 02513635408 .
The original plaintexts are obtained by cutting at length = 96.
Remark 6.
In the stated Cryptographic Scheme based on Chebyshev polynomials, two parameters are essential: ℓ which is the length, or the number of significant digits of plaintexts, and m which is the precision, or the number of correct digits in arithmetical calculations.
A rough estimation from Table 1 is that for integer k and secret key s 10 k , the precision m must be greater or equal than + 5 · k.

4.2. Using an Enveloping Technique for Large Plaintexts

Evidently, block ciphering of long plaintexts by this method is excessively inefficient. We may compose symmetric block ciphering with this method through the OpenSSL library EVP in order to envelop large plaintexts. We take = 100, and m = 120 in this example. For the private key:
s = 100000000 = 10 8
we calculate the public key ( x , y ) = ( x , T s ( x ) ) where
x = 0.111111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111 1111111111111111 y = 0.18814040799950743365079853649690904592037149891015 60025733572256087872987422552175312563914718206977 01208500438767478
and consider an envelope_key
ek = 0.010101010101010101010101010101010101010101010101010 10101010101010101010101010101010101010101010101
Then by selecting
r = 50000000 = 10 8 2
we obtain the cipher of ek as ( c 0 , c 1 ) with
c 0 = 0.63712620099964989838379022273202966608309142004703 95526936628991032039023673808752686692047258891779 52974562960402237 c 1 = 0.009530926931674991853838857210166414106379469381218 67286561147343567726511202587408257389424454157364 058055848041956983
and effectively
c 1 T s ( c 0 ) = 0.0101010101010101010101010101010101010101010101010101 010101010101010101010101010101010101010101010101000 000002511127043
The envelope key ek can be obtained by cutting the decimal representations up to the -th decimal digit.

4.3. A Numerical Example for Bergamo’s Attack

We try here the same example that illustrates the attack in [1]. It is proposed to take:
  • Secret key. s = 106000
  • Public key. For θ = 5 18 π , take
    x = cos ( θ ) = cos 5 18 π and y = T s ( x ) = cos s 5 18 π = cos 530000 + 4 9 π = cos 4 9 π ,
    hence ( x , y ) is the public key.
  • Random exponent for ciphering.  r = 81500 . Hence
    T r ( x ) = cos ( r arccos ( x ) ) = cos r 5 18 π = cos 22638 + 8 9 π = cos 8 9 π T r ( y ) = cos ( r arccos ( y ) ) = cos r 4 9 π = cos 36222 + 2 9 π = cos 2 9 π
  • Ciphertext. For any plaintext μ ( 1 , + 1 ] the ciphertext is
    ( c 0 , c 1 ) = cos 8 9 π , μ cos 2 9 π .
However, these calculations are purely symbolic. All angles involved in the above calculations are irrational numbers; hence, when dealing with them with a computer we just have approximations to their values. For instance, up to 8 digits, we have
5 18 π 0.87266462 = : θ cos θ 0.64278761 = : x
then | r s 5 18 π r s θ | 3.53502559 consequently | r s cos 5 18 π r s x | is comparable with 2 | x | . Indeed, for the current example
T r s ( x ) = cos r s cos 5 18 π 0.76604444 while T r s ( x ) = cos r s x 0.95393723
obviously the calculation of Chebyshev polynomials is highly sensitive to small errors, they are ill-conditioned. In this situation using numerical approximations we have
  • Secret key.  s = 106000
  • Public key.  ( x , y ) = ( x , T r ( x ) ) = ( 0.64278760 , 0.17364817 )
  • Ciphering. Take r = 81500 . Then, for any plaintext μ ( 1 , + 1 ] , the ciphertext is
    ( c 0 , c 1 ) = ( T r ( x ) , μ T r ( y ) ) = ( 0.93969262 , μ · 0.76604444 ) .
Then, the attacker Eve should solve the problem (13) with
a = 3.2000000000 and
b = 7.1999999999
in decimal representation, namely with radix R = 10 , where those coefficients are obtained according to the relations stated before problem (13).
Suppose that the values (15) and (16) are cut up to the m-th digit. According to the method described in Section 3.2.2, condition (10) does hold and consequently the problem is reduced to solve Equation (11), which, by Remark 3, has solutions only when
d | a where d = gcd ( b , 10 m ) .
We proposed two cases of different precision covering the two situations listed in Bergamo’s algorithm that result in the correct r , such that T r ( x ) = T r ( x )
Case m = 20 . In this case, the coefficients in Equation (11) are
a 20 = 0.20000000000000070759 , b 20 = 0.19999999999999999999
and gcd ( 10 20 b 20 , 10 20 ) = 1 with
( 10 20 b 20 ) 1 = 79999999999999999999
The unique solution of the corresponding instance of Equation (11) is
k 20 = ( 10 20 a 20 ) ( 10 20 b 20 ) 1 mod 10 20 = 70759 .
Hence, the corresponding iteration r such that T r ( x ) = c 0 is
r 20 = a + k 20 · b = 509468 .
Comparing with the original index r = 81500 , we obtain
T r 20 ( x ) = 0.939692620785909704047 , T r ( x ) = 0.939692620785908595211 , e r r o r = 1.1088359707509228942 · 10 15 .
Case m = 97 . In this case, the coefficients in Equation (11) are
a 97 = 0.1999999999999999999999999999999999999999999999999 999999999999999999999999999999999999999999884368 , b 97 = 0.1999999999999999999999999999999999999999999999999 999999999999999999999999999999999999999999999996 ,
and ( 10 97 b 97 ) x 97 + 10 97 y 97 = 4 = gcd ( 10 97 b 97 , 10 97 ) with
x 97 = 94999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999999 , y 97 = 18999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999999996 ,
and the solutions of the corresponding instance of Equation (11) are
k 97 , 0 = x 97 · 10 97 a 97 4 mod 10 97 = 39999999999999999999999999999999999999999999999999 99999999999999999999999999999999999999999971092
and k 97 , i = k 97 , 0 + i · 10 97 4 .
Hence, there are four corresponding iterations r 97 , i such that T r 97 , i ( x ) = c 0 and they are r 97 , i = a + k 97 , i · b , i [ [ 0 , 3 ] ] . Take
r 97 , 0 = a + k 97 , 0 · b = 879999999999999999999999999999999999999999999999 9999999999999999999999999999999999999999999791864 .
Comparing with the original index r = 81500 , we obtain
T r 97 , 0 ( x ) = 0.798375679639044035429574245118989681891634222656 3771425989271896557574773604459217627398202050981 , T r ( x ) = 0.939692620785908384054109277324731469936208134264 4646330902866627742212109958894589497458898387058 , e r r o r = 0.40738331968914697735 .
While applying the symbolic computation to r 97 , 0 , we get indeed a correct solution:
T r ( x ) = cos ( r arccos ( x ) ) = cos r 5 18 π = cos 22638 + 8 9 π = cos 8 9 π , T r 97 , 0 ( x ) = cos ( r 97 , 0 arccos ( x ) ) = cos r 97 , 0 5 18 π = cos 24444444444444444444444444444444444444 44444444444444444444444444444444444444 444444444444444386628 + 8 9 π = cos ( 8 9 π ) .
Thus, for different values of m it may happen that either there are no solutions of Equation (11) ( d / | ( 10 m a m ) ) or there are several solutions ( d > 1 and d | ( 10 m a m ) ). And as m increases, the solution r increases as well. However, when r is much larger than r, the calculations of Chebyshev polynomials may differ from that of the original index due to precision error propagation.
However, as reported in [10], Bergamo’s attack succeeds by considering symbolic, not numerical, calculations:
Suppose that for some rational number q Q , x = cos ( q π ) . Then, according to the selection of coefficients a, b, as in Equation (12), a = r ε q π q π = ε r , for a sign ε { 1 , + 1 } , and b = 2 k π q π = 2 k q . Then, by selecting a radix R such that both a and b have finite R-radix representation, as stated in Remark 4, Bergamo’s attack would succeed in recovering the index r.
Besides the above example in which Bargamo’s attack may fail to recover the original index r, which is the random index when ciphering in Chebyshev’s chaotic cryptosystem, we also remark on the following:
By considering the relation (14), we have that the left side lies in the real interval [ 0 , π ] while the right side is the difference of two big numbers r arccos ( x ) , 2 k π , of the same order of magnitude. Depending on the chosen precision m of the computing platform this difference can be great when the true values of the operands are approximated. Hence, this difference may differ too much from the right side and that may provoke that for the alleged recovered index r, c 0 cos ( r arccos ( x ) 2 k π ) and consequently c 0 T r ( x ) .

5. Conclusions

Due to the chaotic behaviour of Chebyshev polynomials, the breaking attack in [10] may fail if the length , the number of significant digits, in plaintexts, is unknown. Hence, must be a part of the secret key. The precision m, the number of significant digits in arithmetical calculations, may be part of the public key.
In order to evaluate the effectiveness of Bergamo’s attack, we implemented numerical experiments utilizing GMP and MPFR. The square-and-product procedure is suitable for performing efficient calculations within the Chebyshev cryptographic scheme and the above-mentioned software packages manage efficiently the required multiple precision arithmetic. In Lemma 1 of the current paper, we emphasize the importance of knowing the length of plaintext in advance. The parameters (length of plaintexts) and m (precision in numerical calculations), influence greatly the effectiveness of both decryption and attack procedures. Due to the chaotic behaviour of Chebyshev polynomials, the breaking attack in [10] may fail if the length , the number of significant digits, in plaintexts is unknown. Hence, must be a part of the secret key. But also, the precision m, the number of significant digits in arithmetical calculations, should be part of the public key for effective decryption.

Author Contributions

G.M.-L. proposed the experiments, X.L. made the implementations and performed the experiments. Writing the report was a joint task. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

All c/c++ programs developed for the current experimentation are available https://github.com/ChillingLiu/Chebyshev-Polynomial-based-Cryptosystem, accessed on 1 January 2025.

Acknowledgments

These experiments were realized during the stay at the Guangdong Technion Israel Institute of Technology (GTIIT) of the second author Morales-Luna kindly acknowledges the academic and administrative authorities of GTIIT for their hospitality and the great teaching and research environment in GTIIT.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Kocarev, L. Chaos-based cryptography: A brief overview. IEEE Circuits Syst. Mag. 2001, 1, 6–21. [Google Scholar] [CrossRef]
  2. Kocarev, L.; Makraduli, J.; Amato, P. Public-Key Encryption Based on Chebyshev Polynomials. Circuits Syst. Signal Process. 2005, 24, 497–517. [Google Scholar] [CrossRef]
  3. Mishkovski, I.; Kocarev, L. Chaos-Based Public-Key Cryptography. In Chaos-Based Cryptography: Theory, Algorithms and Applications; Kocarev, L., Lian, S., Eds.; Springer: Berlin/Heidelberg, Germany, 2011; pp. 27–65. [Google Scholar] [CrossRef]
  4. Xiao, D.; Liao, X.; Deng, S. A novel key agreement protocol based on chaotic maps. Inf. Sci. 2007, 177, 1136–1142. [Google Scholar] [CrossRef]
  5. Ryu, J.; Kang, D.; Won, D. Improved Secure and Efficient Chebyshev Chaotic Map-Based User Authentication Scheme. IEEE Access 2022, 10, 15891–15910. [Google Scholar] [CrossRef]
  6. Kardaş, S.; Genç, Z.A. Security Attacks and Enhancements to Chaotic Map-Based RFID Authentication Protocols. Wirel. Pers. Commun. 2018, 98, 1135–1154. [Google Scholar] [CrossRef]
  7. Jiang, M.; Yang, H. Image Encryption Algorithm Using Multi-Level Permutation and Improved Logisticc-Chebyshev Coupled Map. Information 2023, 14, 456. [Google Scholar] [CrossRef]
  8. Jiang, M.; Yang, H. Image Encryption Using a New Hybrid Chaotic Map and Spiral Transformation. Entropy 2023, 25, 1516. [Google Scholar] [CrossRef] [PubMed]
  9. Chen, F.; Liao, X.; Xiang, T.; Zheng, H. Security analysis of the public key algorithm based on Chebyshev polynomials over the integer ring ZN. Inf. Sci. 2011, 181, 5110–5118. [Google Scholar] [CrossRef]
  10. Bergamo, P.; D’Arco, P.; De Santis, A.; Kocarev, L. Security of public-key cryptosystems based on Chebyshev polynomials. IEEE Trans. Circuits Syst. I Regul. Pap. 2005, 52, 1382–1393. [Google Scholar] [CrossRef]
  11. Yoshioka, D. Security of Public-Key Cryptosystems Based on Chebyshev Polynomials over Z/pkZ. IEEE Trans. Circuits Syst. II Express Briefs 2019, 67, 2204–2208. [Google Scholar] [CrossRef]
  12. Free Software Foundation. GMP: The GNU Multiple Precision Arithmetic Library. Available online: https://gmplib.org/ (accessed on 1 December 2024).
  13. Fousse, L.; Hanrot, G.; Lefèvre, V.; Pélissier, P.; Zimmermann, P. MPFR: A multiple-precision binary floating-point library with correct rounding. ACM Trans. Math. Softw. 2007, 33, 13-es. [Google Scholar] [CrossRef]
  14. Cheong, K.Y. One-Way Functions from Chebyshev Polynomials. Cryptology ePrint Archive, Paper 2012/263. 2012. Available online: https://eprint.iacr.org/2012/263 (accessed on 1 December 2024).
  15. WolframAlpha. ArcCos Taylor Series. Available online: https://www.wolframalpha.com/input/?i=taylor+series+arccos&lk=3 (accessed on 1 December 2024).
Figure 1. Change of variable.
Figure 1. Change of variable.
Cryptography 09 00010 g001
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

Liu, X.; Morales-Luna, G. On the Effectiveness of a Common Attack to Chebyshev Chaotic Encryption Scheme. Cryptography 2025, 9, 10. https://doi.org/10.3390/cryptography9010010

AMA Style

Liu X, Morales-Luna G. On the Effectiveness of a Common Attack to Chebyshev Chaotic Encryption Scheme. Cryptography. 2025; 9(1):10. https://doi.org/10.3390/cryptography9010010

Chicago/Turabian Style

Liu, Xiaoqi, and Guillermo Morales-Luna. 2025. "On the Effectiveness of a Common Attack to Chebyshev Chaotic Encryption Scheme" Cryptography 9, no. 1: 10. https://doi.org/10.3390/cryptography9010010

APA Style

Liu, X., & Morales-Luna, G. (2025). On the Effectiveness of a Common Attack to Chebyshev Chaotic Encryption Scheme. Cryptography, 9(1), 10. https://doi.org/10.3390/cryptography9010010

Article Metrics

Back to TopTop