DATA ENCRYPTION ALGORITHM FOR E-COMMERCE PLATFORM BASED ON BLOCKCHAIN TECHNOLOGY

. Aiming at the poor encryption eﬀect existing in the data encryption algorithm of e-commerce platform, and the data lost and distorted easily after encrypting, a data encryption algorithm based on blockchain technology is proposed in this paper. By analyzing the symmetric key algorithm and the public key algorithm, the DES encryption algorithm is described in detail. The two related technologies of digital envelopes and message authentication are analyzed to ensure the accuracy of the data and the one time encryption of the data. Based on this, in order to ensure the eﬀectiveness of encryption, the process of asymmetric encryption algorithm based on chaotic sequence of neural network and asymmetric encryption algorithm based on neural network chaotic attractor are analyzed, and the security is tested. While ensuring the accuracy of data, it improves the eﬀect of data encryption and realizes the encryption of e-commerce platform data, which is to realize data encryption algorithm based on blockchain technology. Experimental results show that the proposed algorithm can encrypt the data of e-commerce platform, and the encryption process is relatively simple, the encryption eﬀect is better, and the accuracy of the encrypted data is relatively high, which provides a theoretical basis for further research of the subject.


1.
Introduction.With the development of Internet technology, network space has become the basis for people to survive and develop in modern society [3,8].However, because the Internet is not secure, there are all kinds of information security problems.There are network attacks such as camouflage (deception), eavesdropping, illegal access, tampering, repudiation, forgery, denial of service, setting back doors, spreading viruses and so on [12,15].Blockchain is a new data structure with decentralization and no need for trust.It is owned, managed, and supervised by all nodes in the network, and does not accept single party control [1,4].The technology is the core of the new encrypted digital currency, such as bitcoin.Although the encrypted digital currency is controversial in economics and sociology, the technological innovation has attracted more and more attention.It has been highly evaluated by Bill Gates, Eric Schmidt [13,18].IBM also has block chain technology, which is TCP/IP in the era of Internet of things.It will become the key technology to solve the core problems of information security, data storage and interactive processing in the Internet of things [17,20].

FEI GAO
Usually, the authenticity of data depends on the trust of the system center or the third party entity, such as the main node, the central database, the head of the system, the administrator of the database, etc.Once the system center is no longer trusted, it will destroy the authenticity of the data, and it is difficult to be found, so it is necessary to encrypt the data of the e-commerce platform.There is no centralization of nodes, servers, and databases in the encrypted digital e-commerce platform data.The operation and maintenance of the system is not dependent on the management staff.The network nodes strictly encapsulate the digital fingerprints of transaction information in the specific time into blocks, and quickly broadcast to the whole network.Hash technology is used to form a tightly linked chain between blocks to make up a highly secure public account, which refers to blockchain.By using blockchain technology, even the top 500 supercomputers of the world will jointly initiate force attack, which will not effectively challenge the overall security of e-commerce platform data.So the blockchain technology has a good effect on data encryption, but for e-commerce platform data encryption with block chain technology, the encryption process is complex, the encrypted data is prone to distortion or even loss, which affects the application of blockchain technology in data encryption for e-commerce platform.
For the above problems, a data encryption algorithm based on blockchain technology is proposed in this paper.Through the analysis of the traditional join algorithm, the first encryption of data is realized.Based on this, in order to improve the encryption effect, the symmetric block encryption algorithm based on the chaotic sequence of neural network and the asymmetric encryption algorithm based on the chaotic attractor of neural network are used for second encryption of data.Experimental results show that the proposed algorithm can better guarantee the primordial nature of data, and the encryption effect is better, which provides a theoretical basis for further research of the subject.

2.
Efficient extraction algorithm for local fuzzy feature of dynamic image.
2.1.Dynamic image local fuzzy feature preprocessing.Symmetric key algorithm is also called traditional encryption algorithm.In other words, the key used in decrypting ciphertext can be deduced from complex mathematical formula from encrypted plaintext key [9].In most symmetric algorithms, encryption and decryption are implemented through complex nonlinear transformations, and in most cases the same key is used for encryption and decryption.The traditional encryption algorithm requires both communication parties to contract a private key before exchanging information.The security of the algorithm depends mainly on the secrecy of the key itself.Once the key is stolen, it means that the encryption algorithm is completely cracked.So ensuring the privacy of the key is the focus of the symmetric encryption algorithm.Its encrypted plaintext and decryption ciphertext expressions are given as Eq.(1) and Eq.(2).Symmetric key algorithms include two types, which are sequence encryption algorithm and packet encryption algorithm.In the process of encrypting plaintext, the sequence encryption algorithm encrypts only single bit data at a time.In the process of encrypting data, the packet encryption algorithm operates on a set of bits each time.The current popular symmetric encryption algorithm produces a session key.Once the attacker has stolen the session key, it has no use in subsequent communication, which greatly enhances anti-capture ability.Encryption function and decryption function are expressed as where E K (M ) and D K (C) denotes the encryption and decryption.
There is a certain relationship between the encryption process and the decryption process, given by As a famous symmetric key encryption algorithm, the DES algorithm [1,5] is a symmetric encryption system using the block cipher of the traditional encryption method.The overall process of the DES key encryption algorithm is shown in Fig. 1.The plaintext to be encrypted is 56bits.With the 8 bit check, the total bits are 64bits.
The right part of Fig. 1 is the encryption process of the algorithm.First, plaintext is to be initially transformed, and the information block will be divided into two parts, and then the product is transformed by f function.It needs to be executed 16 times.After the product transformation, the two parts of the information are combined to carry out the inverse initial transformation operation.Taking the first reverse initial transformation as an example, the left shifted message becomes 48 bits, and then the 32 bit new data is replaced by the final result instead of the replacement result.The replacement operation is carried out according to the above steps [21].The above process is the execution process of the f function, and the result is XOR operated with the left part, and the latest result is replaced with the original part.After 16 cycles of execution, the DES encryption process has been completed.For decryption with DES, the same algorithm is used.The only difference is that the key must be in reverse in the process of decryption.If the encryption key is K1, k2, . . ., k16, then decryption key is K16, . . ., k2, k1.DES generates a circular key for each round and moves to the right in turn for displacement.

FEI GAO
Assume a given key k.If the subkey generated by k is K1, k2, . . ., k16, then k is called as weak key.
), where M , C , and k is the operation of NOT.This connection is called symmetry complementarity.This makes the attacker reduce the time of deciphering the DES encryption algorithm by half.In order to solve the problem of symmetric cryptography, the public key algorithm will use two different keys in the process of encryption and decryption.The public key is used when encrypting the message, while using its own private key when deciphering the message.
The algorithm relies mainly on the mathematical function, which uses two unconnected keys to encrypt the data.Compared with this, the traditional symmetric encryption system uses the same key each time for encryption and decryption.The public key encryption system uses two unrelated keys to ensure the security of the network, the security of the data and the key itself.The expression is given by Both symmetric encryption and public key encryption have their advantages and disadvantages.The symmetric encryption system has high efficiency in secure communication, but there are a large number of keys and problems in distribution and management.While public key encryption system is very convenient, but the efficiency is relatively low.When the information is large, the key length of public key encryption is longer than the encrypted information block.If the two encryptions can be merged into one, the performance of all aspects of the algorithm will be improved.So the digital envelope appears.Digital envelope technology is mainly used to ensure the safe transmission of data.It combines symmetric encryption and public key encryption system, which not only solves the key distribution management problem of symmetric encryption system, but also overcomes the problem of public key encryption and decryption of low efficiency.It fully improves the flexibility and efficiency of the overall algorithm and ensures the safety of information.
Message authentication [11,23] (Hash function with key) is a verification mechanism used by both communication parties in cryptography to ensure the integrity of the message data.The construction method is proposed by M.Bellare.The security depends on the Hash function, so it is also called the Hash function with key.The basic encryption idea is as follows.When the node P transmits a secret information M , the node P use a mutually predetermined key to generate a message check code M AC = T k (M ), which is attached to the message to another node Q, expressed by Eq. (10).After the node Q receives the data sent by the node P , the M AC check code is obtained by using the private key.The node Q compares the received M AC check code and the calculated M AC check code through the key.If the two check codes are the same, the information maintains the integrity of the data in the process of communication.
The message authentication method can be expressed as follows.
1) Encryption function.Encrypted ciphertext is transmitted after encrypting data using symmetric or asymmetric encryption functions.2) Hash function.The message with arbitrary length is transformed into message digest value with the fixed length through a specific mathematical formula and is authenticated.3) Message authentication code.An open function is used to process confidential messages to be sent, to generate a fixed identifier and authenticated.There are two main implementations, which are encrypting the digest value of a message using an encryption algorithm and using a special MAC algorithm.
2.2.Chaotic encryption algorithm based on neural network.In order to guarantee the effect of data encryption on the e-commerce platform, the chaotic encryption algorithm of the neural network [16,19] is used to re-encrypt the data of the e-commerce platform.
The chaotic neural network [6] has very rich and complex nonlinear dynamic characteristics, especially the chaotic dynamic characteristics.It can not only generate unpredictable pseudo random sequence trajectory, but also is a very complex and difficult NP problem.In addition, because the neural network is a high-speed parallel computing network, it is easy to use the integrated circuit to directly fulfill its parallel operation mode.Its encryption algorithm can achieve real-time encrypted communication, which can meet the requirements of modern network real-time communication.In this paper, based on the Aihara chaotic neural network, a chaotic neural network model which facilitates the realization of chaotic binary sequence is designed, and the packet encryption algorithm is implemented.
Aihara chaotic neural network is composed of chaotic neurons, external input and internal feedback input.A single Aihara chaotic neuron has feedback and external input terms from the internal neurons, as well as the refractoriness item and threshold from the neuron itself.The dynamic equation of the i neuron of a chaotic neural network composed of M chaotic neurons [2,10] is given by where x i (t + 1) is the output of the ith chaotic neuron at the discrete time t + 1, f i is the continuous output function of the ith chaotic neuron, M is the number of the chaotic neurons, W i,j is the connection weight of the jth chaotic neuron and the ith chaotic neuron, h j is the axon transform transfer function of the jth chaotic neuron, N is the number of external inputs, V ij is the connection weight of the jth input and the ith chaotic neuron, I j (t − r) is the intensity of the jth input at the discrete time t − r, g i is the refractoriness function of the ith chaotic neuron, k is the refractoriness attenuation coefficient, r is the self-feedback coefficient, usually a positive number, t i is the full or non-excitation threshold of the ith chaotic neuron.If y i (t + 1) represents the internal state of the ith chaotic neuron at the discrete time t + 1, iterative representation of Aihara chaotic neural network is given by FEI GAO x i (t + 1) = f i (y i (t + 1)) (13) Chaotic neural network selects Aihara chaotic neural network, and its chaotic characteristic depends on the selection of network parameters.In order to facilitate the realization of digital circuits, the function of the Aihara chaotic neural network in Eq. ( 12) and Eq. ( 13) is defined specifically.For all the neurons, the function h and g is defined as h(x) = g(x) = x.The function f is defined as sign function, that is, f (x) 1, x ≥ 0 0, x < 0 .The external input intensity of each neuron at any time is set to the initial external input intensity value, that is, , and the value is 0 or 1. Assume all the excitation threshold for each neuron is θ, then where y i (t) and y i (t + 1) is the internal state of the ith chaotic neuron at the discrete time t and t + 1, respectively.Assume W ij is composed of 1, 0, and −1.
When the chaotic neurons j and W ij = −1.When they are in inhibitory state, then W ij = 1.When they are not directly connected, W ij = 0. Based on the statistical characteristics of neural network, the number of excitatory connections and inhibitory connections is made to be equal, and the unpredictability of the neural network output sequence is increased.Since the Aihara chaotic neural network is introduced on the basis of Hopfield neural network model [14] with time delay.Therefore, according to Hopfield's requirement of constructing connection matrix, assume W ij = 0 when i = j to obtain the value of connection weight matrix.For the case of M = 8, the connection matrix is given by For the selection of the parameters k, r, and i, it is required to be integer.The second is to make y i (t + 1) fluctuate non-periodically with the center 0. The values of the parameters k, r, and i are 1, 5, and −2 by repeated comparison and analysis.The designed Aihara chaotic neural network as Eq. ( 14) becomes Assume a discrete Hopfield neural network with N interconnected neurons.The state of each neuron is S i (t) = {S 0 (t), S 1 )(t), . . ., S N −1 (t)}.S i (t) is 0 or 1.The next state S i (t + 1) depends on the current state of the neurons [7], that is, where T ij is the connection weight of the neuron i and j, which is a symmetric matrix, t i is the threshold of the neuron i, f (x) is a nonlinear function, which is a sign function, given by By using Eq. ( 17) and Eq. ( 18), is obtained.The energy of the neural network at t time is given by The energy function declines monotonously with the evolution of the state of the system.Because the energy of the neural network is limited, it will eventually reach a stable state, which is the attractor [22].The attractor is a chaotic attractor, that is, the attractor is not associated with the MHD rule between the attractor and the initial state.There is an unpredictable relationship between the state messages in the attraction domain of each attractor.If the connection weight matrix T is changed, the attractor and its corresponding attraction domain will change accordingly.After the random transformation matrix H is introduced, the original initial state S and the attractor S N are changed into new initial state Ŝ and attractor ŜN , respectively.
OHNN with N = 8 neurons is taken as an example.The Synaptic connection matrix between the neurons is made up of +1, 0, and −1.+l, 0, and −1 indicate that two neurons are in the excitatory state, no direct connection, and the inhibitory state, respectively.The stability of any state in HNN depends on the values of +1, 0, or −1.According to the statistical probability, if there are more unpredictable attractors, the number of excitatory synaptic connections and the number of inhibitory synaptic connections in the network are equal.Assume the number of the stored samples in the network P is 8 and the convergent domain element is 20, then the connection synaptic matrix is given by  From table 1, it can be seen that the application software of the proposed algorithm is deployed on the Dell server.There are two main servers of Weblogic and Tomcat on the server.In three database servers, one routing database is deployed on the system platform, and the other two are deploying business databases.
The related software in the experiment mainly is Weblogic, Apache, OepnSSL and other software, as shown in Table 2.
In the process of experiment, the change of signal-noise-ratio (SNR) is compared for encryption with different algorithms.The classical data encryption algorithm based on chaotic sequence and the data encryption algorithm based on chaotic parameter modulation is introduced.The experimental results are shown in Fig. 3.
From Fig. 3, it can be seen that in the process of encryption, SNR of the traditional algorithm is gradually reduced, so that the noise content in the data is increased.For the proposed algorithm, SNR of data is not changed obviously, which shows that the noise change of data is smaller in the encryption process, so the proposed algorithm better ensures the primitiveness of data.
By comparing the noise after data encryption and decryption with the proposed algorithm, classic data encryption algorithm based on chaotic sequence, and the data encryption algorithm based on chaotic parameter modulation, the accuracy of data after encryption and decryption is analyzed.Experimental results are shown in Fig. 4.
From Fig. 4, it can be seen that after encryption and decryption of the e-commerce platform data, there is less noise in the data, which ensures the accuracy of data encryption and decryption, and alleviates the loss and distortion of data after encryption.Due to the analysis of two related technologies of digital envelope and message authentication, the problem of data loss and distortion is easily solved, which ensures the accuracy of data after encryption and decryption.
The running time of the proposed algorithm is compared with other algorithms.Comparison results are shown in Table 3.
From Table 3, it can be seen that the proposed algorithm has the shortest running time, so the proposed algorithm has the fastest speed of encryption.As the proposed algorithm reduces the process of data encryption algorithm, the computing process of encryption is reduced and the speed of encryption is improved.

Conclusions.
With the development of the data of the e-commerce platform, the management of the data of the e-commerce platform has received more and more attention.Data encryption has become an important content of data management.

Figure 2 .
Figure 2. Packet symmetric encryption communication scheme based on chaotic neural network

Figure 3 .Figure 4 .
Figure 3.Comparison of SNR for encryption with different algorithms

Table 3 .
Running time of different algorithms