# Discrete Sliding Mode Control for Chaos Synchronization and Its Application to an Improved El-Gamal Cryptosystem

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Problem Formulation of Chaos Synchronization

**Theorem**

**1:**

**Proof:**

## 3. The Design of Improved El-Gamal Cryptosystem

#### 3.1. Traditional El-Gamal Encryption Algorithm

**Step 1:**Get a random prime number $\mathrm{p}$, $\mathrm{p}\in {\mathrm{Z}}_{\mathrm{P}}^{\ast}$ (Let ${\mathrm{Z}}_{\mathrm{P}}^{\ast}$ be a cyclic multiplicative group)

**Step 2:**Calculate in finite domain and get generator $\mathrm{g},\mathrm{g}\in {\mathrm{Z}}_{\mathrm{P}}^{\ast}$ (The results of $\left\{{\mathrm{g}}^{\mathrm{n}}\mathrm{mod}\mathrm{p},\mathrm{n}=1,2,\dots ,\mathrm{p}-1\right\}$ must be different from each other)

**Step 3:**Select private key $\mathrm{x},\mathrm{x}\in {\mathrm{Z}}_{\mathrm{p}-1}^{\ast}(1\le \mathrm{x}\mathrm{p}-1)$

**Step 4:**Calculate public key $\mathrm{y},\mathrm{y}={\mathrm{g}}^{\mathrm{x}}\mathrm{mod}\mathrm{p}$

**Step 5:**Let $\mathrm{N}=\left(\mathrm{y},\mathrm{p},\mathrm{g}\right)$ be the public key of the receiver, then adopt $\mathrm{x}$ as the private key of the receiver.

**Step 6:**Select plaintext $\mathrm{M},\mathrm{M}\in {\mathrm{Z}}_{\mathrm{p}}$, and select random positive integer $\mathrm{r},\mathrm{r}\in {\mathrm{Z}}_{\mathrm{p}-1}$

**Step 7:**Encryption function: ciphertext $\mathrm{c}=\left(\mathrm{c}1,\mathrm{c}2\right)\in {\mathrm{Z}}_{\mathrm{P}}^{\ast}\times {\mathrm{Z}}_{\mathrm{P}}^{\ast}$, we could get ciphertext $\mathrm{c}$ by calculating $\mathrm{c}1={\mathrm{g}}^{\mathrm{r}}\mathrm{mod}\mathrm{p},$ and $\mathrm{c}2=\mathrm{M}\xb7{\mathrm{y}}^{\mathrm{r}}\mathrm{mod}\mathrm{p}$

**Step 8:**Decryption function: plaintext $\hat{\mathrm{M}},\hat{\mathrm{M}}\in {\mathrm{Z}}_{\mathrm{p}}$, we could get plaintext $\hat{\mathrm{M}}$ by calculating $\hat{\mathrm{M}}={(\mathrm{c}{1}^{\mathrm{x}})}^{-1}\xb7\mathrm{c}2\mathrm{mod}\mathrm{p}$

#### 3.2. The Improved El-Gamal Encryption Algorithm

- Encryption function: $\mathrm{c}=\mathrm{M}\xb7{\mathrm{y}}_{\mathrm{m}}{}^{{\mathrm{r}}_{\mathrm{m}}}\mathrm{mod}\mathrm{p}$,
- Decryption function: $\hat{\mathrm{M}}={({\mathrm{c}}_{\mathrm{s}}{}^{{\mathrm{x}}_{\mathrm{s}}})}^{-1}\xb7\mathrm{c}\mathrm{mod}\mathrm{p}$,

## 4. Performance Analysis

#### 4.1. Visual Effect of Encrypted Images

#### 4.2. Statistical Analysis

#### 4.3. Histogram Analysis

#### 4.4. Speed Analysis

## 5. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Lorenz, E.N. Deterministic nonperiodic flow. J. Atmos. Sci.
**1963**, 20, 130–141. [Google Scholar] [CrossRef] - Hua, Z.; Zhou, Y.; Pun, C.M.; Chen, C.P. 2D Sine Logistic modulation map for image encryption. Inf. Sci.
**2015**, 297, 80–94. [Google Scholar] [CrossRef] - Lin, J.S.; Huang, C.F.; Liao, T.L.; Yan, J.J. Design and implementation of digital secure communication based on synchronized chaotic systems. Digit. Signal Process.
**2010**, 20, 229–237. [Google Scholar] [CrossRef] - Ye, G.; Huang, X. A feedback chaotic image encryption scheme based on both bit-level and pixel-level. J. Vib. Control.
**2015**, 22, 1171–1180. [Google Scholar] [CrossRef] - Zhang, J.; Zhang, Y. An image encryption algorithm based on balanced pixel and chaotic map. Math. Probl. Eng.
**2014**, 216048, 7. [Google Scholar] [CrossRef] - 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] - Elgamal, T. A public key cryptosystem and a signature scheme based on discrete logarithms. IEEE Trans. Inf. Theory.
**1985**, 31, 469–472. [Google Scholar] [CrossRef] - Koblitz, N. Elliptic curve cryptosystems. Math. Comput.
**1987**, 48, 203–209. [Google Scholar] [CrossRef] - Cheng, C.Y.; Lin, I.C.; Huang, S.Y. An RSA-Like Scheme for Multiuser Broadcast Authentication in Wireless Sensor Networks. Int. J. Distrib. Sens. Netw.
**2015**, 11, 743623. [Google Scholar] [CrossRef] - Zhang, C.; Luo, Y.; Xue, G. A new construction of threshold cryptosystems based on RSA. Inf. Sci.
**2016**, 363, 140–153. [Google Scholar] [CrossRef] - Wu, Z.; Su, D.; Ding, G. ElGamal algorithm for encryption of data transmission. In Proceedings of the IEEE 2014 International Conference on Mechatronics and Control (ICMC), Jinzhou, China, 3–5 July 2014. [Google Scholar]
- Chang, T.Y.; Hwang, M.S.; Yang, W.P. Cryptanalysis on an improved version of ElGamal-like public key encryption scheme for encrypting large message. Informatica
**2012**, 23, 537–562. [Google Scholar] - Lee, W.B.; Wu, C.C.; Tsaur, W.J. A novel deniable authentication protocol using generalized ElGamal signature scheme. Inf. Sci.
**2007**, 177, 1376–1381. [Google Scholar] [CrossRef] - Sharma, P.; Sharma, S.; Dhakar, R.S. Modified Elgamal Cryptosystem Algorithm (MECA). In Proceedings of the IEEE 2011 2nd International Conference on Computer and Communication Technology (ICCCT), Allahabad, India, 15–17 September 2011. [Google Scholar]
- Yan, J.J.; Chen, C.Y.; Tsai, J.S.H. Hybrid chaos control of continuous unified chaotic systems using discrete rippling sliding mode control. Nonlinear Anal. Hybrid Syst.
**2016**, 22, 276–283. [Google Scholar] [CrossRef] - Diffie, W.; Hellman, M.E. New directions in cryptography. IEEE Trans. Inf. Theory.
**1976**, 22, 644–654. [Google Scholar] [CrossRef] - Rukhin, A.; Soto, J.; Nechvatal, J.; Smid, M.; Barker, E. A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications; Booz-Allen and Hamilton Inc.: Mclean, VA, USA, 2001. [Google Scholar]
- Lancaster, H.O.; Seneta, E. Chi-Square Distribution; Wiley & Sons: New York, NY, USA, 1969. [Google Scholar]

**Figure 11.**(

**a**) Histograms of the original image and the encrypted images, (

**b**) RSA (

**c**) El-Gamal (

**d**) Improved El-Gamal.

Tests | RSA | El-Gamal | Improved El-Gamal |
---|---|---|---|

Frequency | 0 | 0.122325 | 0.739918 |

Block Frequency | 0 | 0.739918 | 0.911413 |

Cumulative Sums | 0 | 0.350485 | 0.911413 |

Runs | 0 | 0.739918 | 0.122325 |

Longest Run | 0.534146 | 0.122325 | 0.350485 |

Rank | 0.534146 | 0.534146 | 0.534146 |

FFT | 0.350485 | 0.350485 | 0.911413 |

NonOverlapping Template | 0.991468 | 0.991468 | 0.991468 |

Overlapping Template | 0.122325 | 0.739918 | 0.350485 |

Universal | 0.122325 | 0.122325 | 0.213309 |

Approximate Entropy | 0 | 0.350485 | 0.739918 |

Random Excursions | 0.907191 | 0.932495 | 0.951471 |

Random Excursions Variant | 0.948280 | 0.968182 | 0.983815 |

Serial | 0.534146 | 0.213309 | 0.350485 |

Linear Complexity | 0.350485 | 0.122325 | 0.534146 |

Original Image | RSA | El-Gamal | Improved El-Gamal | |
---|---|---|---|---|

${\chi}^{2}$ | 158350 | 422.4355 | 294.6641 | 248.3711 |

Algorithms | 256 × 256 (Size) | 512 × 512 (Size) | 1024 × 1024 (Size) | 2048 × 2048 (Size) | 4096 × 4096 (Size) |
---|---|---|---|---|---|

El-Gamal | 0.00220 | 0.00746 | 0.02684 | 0.10510 | 0.40369 |

Improved El-Gamal | 0.00124 | 0.00409 | 0.01617 | 0.06517 | 0.26920 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Wan, P.-Y.; Liao, T.-L.; Yan, J.-J.; Tsai, H.-H.
Discrete Sliding Mode Control for Chaos Synchronization and Its Application to an Improved El-Gamal Cryptosystem. *Symmetry* **2019**, *11*, 843.
https://doi.org/10.3390/sym11070843

**AMA Style**

Wan P-Y, Liao T-L, Yan J-J, Tsai H-H.
Discrete Sliding Mode Control for Chaos Synchronization and Its Application to an Improved El-Gamal Cryptosystem. *Symmetry*. 2019; 11(7):843.
https://doi.org/10.3390/sym11070843

**Chicago/Turabian Style**

Wan, Pei-Yen, Teh-Lu Liao, Jun-Juh Yan, and Hsin-Han Tsai.
2019. "Discrete Sliding Mode Control for Chaos Synchronization and Its Application to an Improved El-Gamal Cryptosystem" *Symmetry* 11, no. 7: 843.
https://doi.org/10.3390/sym11070843