﻿ 基于时变双边混沌符号系统的流密码算法设计 Design of One Stream Cipher Algorithm Based on a Time-Varying Generalized Symbolic Chaotic System

Computer Science and Application
Vol. 08  No. 10 ( 2018 ), Article ID: 27261 , 7 pages
10.12677/CSA.2018.810173

Design of One Stream Cipher Algorithm Based on a Time-Varying Generalized Symbolic Chaotic System

Chuanjun Tian, Xingling Li, Jing Lin, Quan Zeng

College of Information Engineering, Shenzhen University, Shenzhen Guangdong

Received: Oct. 8th, 2018; accepted: Oct. 18th, 2018; published: Oct. 25th, 2018

ABSTRACT

Based on the discussion of time-varying generalized symbolic chaotic systems and its construction method, pseudo-randomness of chaotic sequences produced by this system is firstly analyzed. Then, a stream cipher algorithm is designed based on chaotic sequences of this system and JK flip-flop. Finally, the designed algorithm is used in digital image encryption, and encryption and decryption effect is simulated. Simulation shows that the stream cipher algorithm has good effects in image encryption.

Keywords:Discrete System, Time-Varying Generalized Symbolic System, Devaney Chaos, Stream Cipher Algorithm

1. 引言

$Z=\left\{\cdots ,-1,0,1,\cdots \right\}$ 是一个双边整数集， ${N}_{t}=\left\{t,t+1,\cdots \right\}$ 是一个单边整数集，对任一 $t\in Z$ 。文献 [1] - [8] 讨论了多种时变或时不变单边离散时空系统。本文将讨论一类新的时变双边离散时空系统：

${x}_{m+1,n}=f\left(m,{x}_{m,n-1},{x}_{m,n},{x}_{m,n+1}\right)$$m=0,1,2,\cdots$$n=\cdots ,-1,0,1,\cdots$ (1)

${I}_{-\infty }^{\infty }=\left\{{\left\{{a}_{n}\right\}}_{n=-\infty }^{\infty }=\left(\cdots ,{a}_{-1},{a}_{0},{a}_{1},\cdots \right)|{a}_{i}\in I,i=\cdots ,-1,0,1,\cdots \right\}$ (2)

$x=\left\{{x}_{m,n}|m\in {N}_{0},n\in Z\right\}$ 是系统(1)的一个解， ${x}_{0,n}\in I$$n\in Z$，且

${x}_{m}=\left(\cdots ,{x}_{m,-1},{x}_{m,0},{x}_{m,1},\cdots \right)={\left\{{x}_{m,n}\right\}}_{n=-\infty }^{\infty }$$m\in {N}_{0}$ (3)

${x}_{m+1}={\left\{f\left(m,{x}_{m,n-1},{x}_{m,n},{x}_{m,n+1}\right)\right\}}_{n=-\infty }^{\infty }={g}_{m+1}\left({x}_{m}\right)$$m\in {N}_{0}$ (4)

2. 几个定义

${x}_{m+1}={g}_{m+1}\left({x}_{m}\right)$${x}_{0}\in X$$m\in {N}_{0}$ (5)

${G}_{m}\left(x\right)={g}_{m}\left({g}_{m-1}\left(\cdots \left({g}_{1}\left(x\right)\right)\cdots \right)\right)={g}_{m}\circ \cdots \circ {g}_{1}\left(x\right)$${G}_{0}\left(x\right)=x$ (6)

${d}_{1}\left(x,y\right)=\underset{n=-\infty }{\overset{\infty }{\sum }}\frac{|{x}_{n}-{y}_{n}|}{{2}^{|n|}}$，对任意 $x={\left\{{x}_{n}\right\}}_{n=-\infty }^{\infty },y={\left\{{y}_{n}\right\}}_{n=-\infty }^{\infty }\in {I}_{-\infty }^{\infty }$ (7)

3. 广义符号混沌系统的构造

$I={Z}_{q}=\left\{0,1,\cdots ,q-1\right\}$$f:{N}_{0}×{I}^{3}\to I$ 定义如下：对任意 ${x}_{-1},{x}_{0},{x}_{1}\in I$$m\in {N}_{0}$

$f\left(m,{x}_{-1},{x}_{0},{x}_{1}\right)=a{x}_{-1}+{c}_{m}{x}_{0}+b{x}_{1}\mathrm{mod}q=a{x}_{-1}\oplus {c}_{m}{x}_{0}\oplus b{x}_{1}$ (8)

${x}_{m+1,n}=f\left(m,{x}_{m,n-1},{x}_{m,n},{x}_{m,n+1}\right)=a{x}_{m,n-1}\oplus {c}_{m}{x}_{m,n}\oplus b{x}_{m,n+1}$${x}_{m,n}\in I$$m,n\in {N}_{0}$ (9)

${x}_{m+1}={g}_{m+1}\left({x}_{m}\right)$${x}_{0}\in {I}_{-\infty }^{\infty }$$m\in {N}_{0}$ (10)

${g}_{m+1}\left(u\right)={\left\{a{u}_{n-1}\oplus {c}_{m}{u}_{n}\oplus b{u}_{n+1}\right\}}_{n=-\infty }^{\infty }={\left\{a{u}_{n-1}\oplus {c}_{m+p}{u}_{n}\oplus b{u}_{n+1}\right\}}_{n=-\infty }^{\infty }={g}_{m+1+p}\left(u\right)$

${g}_{s+mp-1}\circ {g}_{s+mp-2}\circ \cdots \circ {g}_{s}={g}_{t+mp-1}\circ {g}_{t+mp-2}\circ \cdots \circ {g}_{t}$ (11)

$\begin{array}{l}\left\{x={\left\{{x}_{n}\right\}}_{n=-\infty }^{\infty }|{x}_{i}={s}_{i},|i|=0,1,\cdots ,M-1;{x}_{j}\in I;|j|\ge M\right\}\subseteq {B}_{\theta }\left(\alpha \right)\\ \left\{y={\left\{{y}_{n}\right\}}_{n=-\infty }^{\infty }|{y}_{i}={t}_{i},|i|=0,1,\cdots ,M-1;{y}_{j}\in I;|j|\ge M\right\}\subseteq {B}_{\theta }\left(\beta \right)\end{array}$ (12)

${G}_{1}\left(x\right)={g}_{1}\left(x\right)={\left\{a{x}_{n-1}\oplus {c}_{0}{x}_{n}\oplus b{x}_{n+1}\right\}}_{n=-\infty }^{\infty }={\left\{{x}_{n}^{\left(1\right)}\right\}}_{n=-\infty }^{\infty }={x}^{\left(1\right)}$

${G}_{m}\left(x\right)={g}_{m}\left({x}^{\left(m-1\right)}\right)={g}_{m}\left(\cdots \left({g}_{1}\left(x\right)\cdots \right)\right)={\left\{{x}_{n}^{\left(m\right)}\right\}}_{n=-\infty }^{\infty }={x}^{\left(m\right)}$${x}^{\left(0\right)}=x$

${x}^{\left(m\right)}={\left\{{x}_{n}^{\left(m\right)}={f}_{m-1}\left({x}_{n-m},\cdots ,{x}_{n+m-1}\right)\oplus {b}^{m}{x}_{n+m}={a}^{m}{x}_{n-m}\oplus {h}_{m-1}\left({x}_{n-m+1},\cdots ,{x}_{n+m}\right)\right\}}_{n=-\infty }^{\infty }$ (13)

${f}_{m-1}\left({x}_{n-m},\cdots ,{x}_{n+m-1}\right)\oplus {b}^{m}u=w$${a}^{m}v\oplus {h}_{m-1}\left({x}_{n-m+1},\cdots ,{x}_{n+m}\right)=w$ (14)

${f}_{M-1}\left({z}_{n-M},\cdots ,{z}_{n+M-1}\right)\oplus {b}^{M}{z}_{n+M}={t}_{n}$$n=0,1,2,\cdots$

${a}^{M}{z}_{n-M}\oplus {h}_{M-1}\left({z}_{n-M+1},\cdots ,{z}_{n+M}\right)={t}_{n}$$n=-1,-2,\cdots$

$\left\{y={\left\{{x}_{n}\right\}}_{n=-\infty }^{\infty }\in {I}_{-\infty }^{\infty }|{x}_{i}={s}_{i};{x}_{j}\in I,|i|=0,1,\cdots ,M-1;|j|\ge M\right\}\subseteq {B}_{{\epsilon }_{0}}\left(\alpha \right)$ (15)

${f}_{M-1}\left({z}_{n-M},\cdots ,{z}_{n+M-1}\right)\oplus {b}^{M}{z}_{n+M}={z}_{n}$$n=0,1,2,\cdots$

${a}^{M}{z}_{n-M}\oplus {h}_{M-1}\left({z}_{n-M+1},\cdots ,{z}_{n+M}\right)={z}_{n}$$n=-1,-2,\cdots$

$\alpha ={\left\{{s}_{n}\right\}}_{n=-\infty }^{\infty }\in {I}_{-\infty }^{\infty }$，且U是 $\alpha$ 的任一邻域，则存在 ${\epsilon }_{0}>0$ 和充分大整数 $M\in {N}_{1}$，使得 ${B}_{{\epsilon }_{0}}\left(\alpha \right)\subseteq U$ 和式(15)成立。因此，类似于上面证明，存在 $\lambda ={\left\{{t}_{n}\right\}}_{n=-\infty }^{\infty }\in {B}_{{\epsilon }_{0}}\left(\alpha \right)$，使得 ${t}_{i}={s}_{i}$，对任意 $i\in \left\{-M,\cdots ,-1,0,1,\cdots ,M-1\right\}$，且依次选取任一 $j\in \left\{M,M+1,\cdots \right\}\cup \left\{-M-1,-M-2,\cdots \right\}$，存在 ${t}_{j}\in I$，使得 $|{t}_{0}^{\left(m\right)}-{s}_{0}^{\left(m\right)}|>\delta$，以及

${t}_{0}^{\left(M\right)}={f}_{M-1}\left({t}_{-M},\cdots ,{t}_{M-1}\right)\oplus {b}^{M}{t}_{M}$${a}_{0}^{\left(M\right)}={f}_{M-1}\left({s}_{-M},\cdots ,{s}_{M-1}\right)\oplus {b}^{M}{t}_{M}$

$d\left({G}_{M}\left(\alpha \right),{G}_{M}\left(\gamma \right)\right)=\underset{i=-\infty }{\overset{\infty }{\sum }}\frac{|{t}_{i}^{\left(M\right)}-{s}_{i}^{\left(M\right)}|}{{2}^{|i|}}\ge |{t}_{0}^{\left(M\right)}-{s}_{0}^{\left(M\right)}|\ge \delta =0.1$

${x}_{m+1,n}=3{x}_{m,n-1}\oplus {r}_{m}{x}_{m,n}\oplus {x}_{m,n+1}=3{x}_{m,n-1}+{r}_{m}{x}_{m,n}+{x}_{m,n+1}\mathrm{mod}2$ (16)

Figure 1. Solution confusion and correlation

Table 1. Three common random number detection results

1) 选择一副数字灰度图像作为明文，利用Matlab语言将该图像表示为数字矩阵 $I={\left({m}_{ij}\right)}_{256×256}$，其中，每个明文数值 ${m}_{ij}\in {Z}_{256}=\left\{0,1,\cdots ,255\right\}$

2) 先选取一个JK序列，以它作为初始值，再利用系统(16)的某个解 $z=\left\{{x}_{m,n}\right\}$ 来产生密钥流序列，并将该二元密钥流序列转化为值为0~255的序列；

3) 加密变换： ${c}_{ij}={x}_{ij}\oplus {m}_{ij}$，其中， ${c}_{ij}$ 表示密文数值， $\oplus$ 表示逐比特异或运算；

4) 解密变换： ${m}_{ij}={x}_{ij}\oplus {c}_{ij}$

Figure 2. Add and decrypt renderings

Table 2. Correlation coefficient between original image and encrypted image

4. 小结

Design of One Stream Cipher Algorithm Based on a Time-Varying Generalized Symbolic Chaotic System[J]. 计算机科学与应用, 2018, 08(10): 1582-1588. https://doi.org/10.12677/CSA.2018.810173

1. 1. Devaney, R.L. (1989) An Introduction to Chaotic Dynamical Systems. 2nd Edition, Addision-Wesley, NY.

2. 2. Elaydi, S.N. (2000) Discrete Chaos. Chapman & Hall/CRC.

3. 3. Chen, G., Tian, C.J. and Shi, Y.M. (2005) Stability and Chaos in 2-D Discrete Systems. Chaos, Solitons and Fractals, 25, 637-647. https://doi.org/10.1016/j.chaos.2004.11.058

4. 4. Tian, C.J. and Chen, G. (2006) Chaos of a Sequence of Maps in a Metric Space. Chaos Solitons and Fractals, 28, 1067-1075. https://doi.org/10.1016/j.chaos.2005.08.127

5. 5. 田传俊, 陈关荣. 广义符号动力系统的混沌性[J]. 应用数学学报, 2008, 31(3): 440-446.

6. 6. Shi, Y.M. and Chen, G. (2009) Chaos of Time-Varying Discrete Dynamical Systems. Journal of Difference Equations and Applications, 15, 429-449. https://doi.org/10.1080/10236190802020879

7. 7. 田传俊, 李佳佳, 曾泉, 刘明刚. 时变广义符号动力系统的混沌性及其在流密码中的应用[J]. 信息安全与技术, 2016, 7(9-10): 33-36.

8. 8. 田传俊, 刘明刚, 郝红建, 李佳佳. 二维时变离散时空系统的混沌性及其在流密码中的应用[J]. 信息安全与技术, 2015(7): 71-75.

9. 9. 李大为, 冯登国, 陈华, 等, 编. 随机性检测规范[S]. 国家密码管理局, 2009.