**Implementation steps of algorithm**

The multi-level encryption algorithm for user-related information across social networks proposed in this paper combines the above three chaotic models. The initial values and parameters of each chaotic model (a total of 7) can be used as keys. However, in order to ensure that the designed algorithm is in chaos [15], the parameter *A* = 6 *X*_{b} = 3 in the hybrid optical bistability model is defined, and the remaining four values of the parameter *μ* = 4 in the logistic mapping are defined as the initial key of the algorithm and entered by the user. So the initial key is a 4-tuple: *Key* = (*X*, *P*, *Y*, *Z*). Among them:

X: initial value of model I, requires 0 < *X* < *A*

P: initial value of model II, requires 0 < *P* < 1

Y: initial value of model II, requires 0 < *Y* < 1

Z: initial value of model III, requires 0 < *Z* < 1

The multi-level chaotic encryption algorithm is described as follows:

First, enter the key *Key* (*X*, *P*, *Y*, *Z*).

Second, open the file and take out 2 characters (or a Chinese character) for a total of 16 bits, and then feed into the variable *C*_{1}, *C* _{2}.

Third, the 16-bit information is expanded to 32 bits by sequentially inserting a binary digit 1, 0 between adjacent two bits.

Fourth, iterate 32 times according to the input key X and the chaotic model 1, and 32 values are obtained. These 32 values are respectively taken to the remainder of 32, and the same remainder is processed to ensure that 32 different results are obtained, which are sequentially stored in the array *P* in the order of generation.

Fifth, the 32-bit data generated in the third step is replaced according to the array *P* [16].

Sixth, according to the input key *P*, *Y* and chaotic model 2, the *Y*_{n}_{+1} is obtained through iteration. Since the value of *Y*_{n}_{+1} is in [0, 1], this range is equally divided, and *Y*_{n}_{+1} is quantized into an integer *K* accordingly. The algorithm in this paper is quantized into 10 levels, that is, *K* is an integer between 1 and 10.

Seventh, according to the input key *Z*, the chaotic model 3 is iterated *K* times to generate the encrypted key *Key*_{1}.

Eighth, the 32-bit information after the fifth is replaced with *Key*_{1} to generate the ciphertext *C*.

Ninth, the 32-bit ciphertext *C* is processed into 4 character outputs. The next 2 characters are read until the end of the file.

The input of this encryption algorithm is 16 bits and the output is 32 bits. The 16-bit plaintext is extended, replaced, and then interacted with the key stream *Key*_{1} to generate ciphertext. The original key entered is 4 real numbers; one is used to generate the permutation matrix and the other 3 are generated by the level 2 chaotic system to produce the key stream *Key*_{1}.

**Discussion of algorithm**

The multi-level chaotic encryption algorithm proposed in this paper is designed in C language [17] and the specific implementation of the algorithm is discussed as follows: First of all, in the fourth step of the algorithm design, the chaotic model 1 is iterated 32 times to obtain 32 values. In order to obtain better pseudo-randomness [18], the values from the initial iterations should be discarded and the iteration values from the first *k* + 1 to the *k* + 32 times are chosen. The iteration of chaotic model 2 in step 6 should also be the same.

Then, in the fourth step of the algorithm, the 32 numbers obtained are used for the remainder operation. When the result of the remainder of 32 is the same, the linear detection method is adopted; that is, the remainder is incremented by 1. If the number obtained is not the same, it is stored in the array, otherwise it is incremented by 1 (when it is full, it will be 0 again).

At last, the key *Key*_{1} obtained in step 7 of the algorithm; because 0 < *Key*_{1} < 1, *Key*_{1} will be XORed with a 32-bit number in the eighth step. The data type of *Key*_{1} is float. In order to ensure that the binary code circumference of the long type is as large as possible, it should be transformed: *Key*_{1} = *Key*_{1} * 1000000000.

## Comments (0)

General note:By using the comment function on degruyter.com you agree to our Privacy Statement. A respectful treatment of one another is important to us. Therefore we would like to draw your attention to our House Rules.