Abstract
The more and more developed network has caused more and more impact on people’s life and work, providing convenient channels for people’s information exchange, and then improving people’s living and working conditions. However, when data is transmitted through the network, there are hidden security risks, especially important accounting data. Once intercepted and used by criminals, it may cause serious harm to the owner of the data. Based on the above background, the purpose of this article is to study the use of the DES algorithm to encrypt accounting data in a computing environment. This paper proposes an improved quantum genetic algorithm and applies it to the S-box design of the DES algorithm, which improves the non-linearity of the S-box, reduces the differential uniformity, and enhances the security of the DES algorithm. This improved DES algorithm reduces the number of iterations by increasing the key length and iterative processing using a two-round function, which further increases the security of the algorithm and improves the operation speed of the encryption process. It is found that the 64 ciphertexts of the DES algorithm and the number of changed bits compared to the original ciphertext fluctuates around 32 bits, which explains the problems that should be paid attention to when using the DES algorithm to encrypt accounting data. The validity of key characters should be guaranteed to prevent key loss or leakage. Shorter data encryption regular solution.
Introduction
The current society is an information society, and data is the basis for carrying information. Ensuring the security of data in the transmission process is of great practical significance [1]. When data is transmitted on the network, it needs to be completed with the help of a certain media foundation, but in the process of data transmission through the network, it is unavoidable that it will be subject to more or less various attacks, which will cause the secure transmission of data. No small threat. In addition to computer viruses, network threats also include data interception, interruption, tampering, and forgery. Therefore, to improve the security of data in the network transmission process and eliminate various threats during the transmission process, by effectively applying the DES encryption algorithm to the data transmission process, it can effectively improve the security of data transmission and avoid its Attacks are received during transmission, providing a reliable guarantee for the secure transmission of data.
The continuous progress and development of computer science and technology, people’s living standards are constantly improving, the role of information in people’s lives is becoming more and more important, people’s words and deeds are closely related to information exchange, and the Internet has become inseparable from people tools [2, 3]. People shopping online, chatting online, sending e-mails and enjoying the changes in the lifestyle brought by the Internet are also facing a huge threat from information leakage [4, 5]. The network continuously improves people’s quality of life, makes life more convenient, and pays more attention to saving and sending data protection. In a society with a high level of information technology, its security cannot be ignored [6, 7]. Accounting data includes accounting invoices, books, lists and related basic data. Accounting data exists in paper or paperless form in the information environment. In these, in the process of input, processing and output management, the method to ensure the management of paperless accounting data is secure. Developers, managers, and users need to discuss carefully Question [8, 9]. At present, many encryption algorithms such as MD5, RSA, DES, AES, DSA can be used. Among them, the Data Encryption Standard (DES) encryption algorithm is a symmetric encryption method. It was developed by IBM in 1972. More mature classical algorithms [10, 11]. Relatively speaking, DES encryption is fast and the algorithm is simple and practical. Both safety and efficiency requirements are considered [12, 13]. This article describes the application of DES encryption technology for account data processing, and achieves the goal of data security management under the premise of ensuring efficiency [14, 15].
Lalithamani proposed a new DES variant, the Hashed Data Encryption Standard (HDES for short), to enhance the limitations of the static S-box arrangement in DES. The proposed HDES combines multiple technologies and components into a new algorithm, enhancing the original DES. HDES uses a hash function at the beginning of each block encryption process to generate a plaintext fingerprint, which will be used later to generate a seed, which will coordinate the generation of the S-box during the 16-round encryption process. The performance of HDES was evaluated and compared with DES and DESX. The randomness and encryption time of cryptographic data were evaluated [16, 17]. To establish effective security measures in the generation of fuzzy vaults, it is necessary to use the method of double cryptography, using AES and DES cryptography. Wendelin used two types of algorithms, AES (Advanced Encryption Standard) and DES (Data Encryption Standard), both of which are symmetric encryption technologies. First, the AES algorithm is used to encrypt the feature points of the palm and hand veins. Then, the private key generated by the AES algorithm is given to the DES algorithm for encryption. Finally, a multi-modal biometric template and key are used to generate a fuzzy vault. For decryption, the private key of the AES algorithm is decrypted using the public key of DES. Then, the encrypted feature points are decrypted using the AES algorithm. The performance of the system was analyzed using evaluation indicators. The results show that this method achieves more than 90% GAR in both no-noise and noisy situations, and achieves good results. This technology provides good security for modal-based biometric recognition [18]. TAO proposed two formal models of the Data Encryption Standard (DES), one using the international standard LOTOS and the other using a newer process to calculate LNT. Both models use asynchronous circuits to encode DES, that is, the data stream blocks of the DES algorithm are represented by processes that communicate through sets. To ensure the correctness of the model, several techniques have been applied, including model checking, equivalence checking, and comparing the results generated by the prototype automatically generated by the formal model with the existing implementation of DES [19]. Blum implemented the Naive Bayes and K nearest neighbor classification algorithm on 9 real datasets, and classified AES, Triple-DES and Rijndael. The purpose of the study is to evaluate the performance of the classification algorithms when encrypting the data set using various performance indicators: classification accuracy, precision, recall (sensitivity), specificity and boost map/gain map, and determine the performance of encryption on these algorithms influences. We found that apart from the obvious time penalty of implementing an encryption algorithm that protects user privacy, the performance of the classification algorithm in most data sets remains the same. However, the time penalty for encrypting data before it can be used for classification varies depending on the type of algorithm used to encrypt the data [20]. Xi introduced an improved method to overcome the security problems of the DES algorithm. Enhancement depends on Elliptic Curve Cryptography (ECC) technology. The ECC method is also used to implement the key generation and distribution required to establish a communication session. Xi proposed a new ECC-based DES algorithm that can be applied to any file format to encrypt and decrypt image files. Experimental results show that the scheme has a very large keyspace to resist brute force attacks, and has a strong immunity to statistical attacks. The results show that the ECC-based DES algorithm can be used as a highly secure algorithm [21–25].
In this paper, an improved quantum genetic algorithm is proposed and applied to the S-box design of the DES algorithm. This improves the non-linearity and differential uniformity of the S box, and enhances the security of the DES algorithm. The improved DES algorithm reduces the number of repetitions by increasing the key length and repetitive processing, further improving the security of the algorithm and increasing the working speed of the encryption process. Compared with the original encrypted text, the number of modified bits is about 32 bits. This will explain the issues that need to be paid attention to when using DES algorithm to encrypt account data. To prevent key loss or leakage, the validity of keywords must be guaranteed, a common solution for shorter data encryption.
Overview of the DES algorithm
DES algorithm encryption principle
The DES encryption algorithm uses a 64-bit key, and processes 64-bit group plaintext or group ciphertext. After 64-bit plaintext encryption, 64-bit ciphertext is output. The 64-bit ciphertext is decrypted and restored to 64-bit plaintext.
Assume that the input 64-bit plain text is: M = m1m2... mi... m64 (1 ⩽ i ⩽ 64); the 64-bit key is: K = k1k2... ki... k64 (1 ⩽ i ⩽ 64), of which 56 bits are valid keys, k8, k16, k24, k32, k40, k48, k56, and k64 are all parity bits and do not play a role in the algorithm. Let T be a loop iterative operation, the entire encryption process can be expressed by the following formula:
In the formula, IP is the initial permutation operation and IP-1 is the inverse initial permutation operation.
The encryption flow chart of DES encryption algorithm is shown in Fig. 1. The encryption flow of DES encryption algorithm can be summarized into three processes: initial replacement operation, 16 rounds of iterative operation, and reverse initial replacement operation.

Encryption flowchart.
(1) Initial replacement IP
The initial replacement is used to transpose the input flat text. This is to disrupt the bit order in the plain text, achieve the purpose of confusion, and increase the complexity of the plain text. Table 1 shows the initial replacement IP list. The numbers in the table indicate the sequence number of the 64-bit input packet at the time of initial replacement, and the position in the table indicates the bit order of the output after replacement. For example, the plain text input is M = m1m2m3...m62m63m64, and the initial replacement function IP performs initial replacement of M to obtain 64-bit data IP (M)=m58m50m34...m23m15m17
Initial replacement IP for DES
(2) Loop iteration operation
1) F function
The data after the initial replacement is divided into two groups, l0 and R0, each 32-bit. L0 takes the high 32-bit and l0 takes the low 32-bit. If the data after initial replacement is D = d1...d31d32d33...d61, then L0 = d1...d31d32, R0 = d33...d63d64. Then R (32 bits) performs 16 rounds of cyclic iteration. The core of cyclic iteration is F-function, which is nonlinear and the key module to realize chaos and diffusion in each round. The function diagram of the F function is shown in Fig. 2, which can be expressed by the following formula:

Flow chart of function F (R, K).
The ⊕ symbol stands for the XOR operation. The input of the F function in the formula is 32-bit data Ri - 1 and 48-bit sub-Ming Ki. After Ri - 1 undergoes four operations: extended replacement E, XOR operation with subkey Ki, S-box replacement, and P-box replacement, the output F (Ri - 1, Ki) of the F function is obtained.
The DES encryption algorithm is based on the F function for 16 rounds of loop iterations. The 16-round iteration process can be expressed by the following formula:
Where Li - 1 and Ri - 1 represent the input of the i-th round of F-function iteration, F(Ri - 1, Ki) represents the output of the F-function, Ki is the i-th 48-bit sub-key, and Li and Ri represent the i-th The result of round F function iteration.
After the last round (16 rounds) of the repetition, the left half and the left half are not swapped, and care should be taken to merge to form a 64-bit packet as the next inverse initial replacement input. The purpose is to make the DES encryption algorithm usable in both encryption and decoding.
2) XOR with subkey
The 48-bit data E output by the extended replacement E is obtained by the sub-key K and XOR operation to obtain 48-bit output data. The output 48-bit data will be compressed and replaced with an S box.
3) S-box transformation
S-box transformation is also called compression replacement, because it transforms a 48-bit input into a 32-bit output. S-box replacement consists of a total of eight S-boxes and eight S-box replacements. Assume that the 48-bit data of the input S box is B = b1b2b3... b47b48. The data bits entering the first S1 are b1b2b3b4b5b6, the first bit b1, and the last bit b6 form the row number b1b6, and the middle four bits form the column number b2b3b4b5. Find the S box by the row and column number, and the corresponding data is the output 4-bit data. For example, if you enter 011011, the row number is 01, which is the second row, the column number is 1101, which is the fourteenth column, and the corresponding data is 5, which is 0101.
4) P-box replacement
The 32-bit data transformed by the S-box is replaced by a P-box, and the result is the output F (Ri - 1, Ki) of the F-function. The P-box replacement table is shown in Table 2. The replacement process of the P-box is similar to the initial replacement and will not be described again.
Replacement P
The reverse initial replacement is the last step of the DES encryption algorithm, the purpose is to restore the order of the original text. The data after the 16th repetition is used as the input of the reverse initial replacement. After the reverse initial replacement, the encryption of the plaintext M is completed, and the encrypted text is finally obtained. The ciphertext is a 64-bit ciphertext obtained through the DES encryption algorithm. The reverse initial permutation is shown in Table 3:
Reverse initial permutation IP-1 for DES
Reverse initial permutation IP-1 for DES
DES is a symmetric cryptographic algorithm. The process of decryption and encryption is the same. The input during decryption is the encrypted ciphertext, and the output is the plain text during encryption, but the order of the keys used in each round is different. Assume that the subkeys used in the 16 repeated operations are K1, K2, K3, K4... K15, K16. When decoding, the keys used from the first round to the sixteenth round are K16, K15, K14, K13, K12... K2, K1. In other words, if 64-bit encrypted text is input as plain text, then the first step of the decoding process. The sub-key K16 is repeatedly used in cycles, the sub-key K15 is used in the second time, and the sub-key K1 is used in the sixteenth time. The sub-keys used for encryption and decryption are generated by the same initial key, but the order of invocation is different. The initial permutation and reverse initial permutation of the decryption process are the same as the encryption.
Accounting data entry review and processing
It is mainly for various information on various business accounting data (basic management operations such as entry, verification, review, modification, deletion.), and multi-condition, arbitrary combination query of data information can be performed. It also includes business type and data type. Management of basic data such as status, etc. The main functions are as follows: Business data management: input, modify, delete operations of business data, and perform basic verification on the basic data type and format of the entered data. You cannot modify the primary key when modifying data. After the business data is modified, the data must be re-entered for review. The approved data cannot be modified or deleted. Data audit management: audit the entered business accounting data. The unapproved data will be rejected to the previous state, which can be modified or directly deleted by the staff. Only audited data can be processed further. Data query: Business data information is the core basic data of the entire system, and all system functions are performed around the data. In addition to the basic management functions of data information addition, modification, and deletion, the query of business data is particularly important. It is necessary to query various attributes of business data, and the query conditions can be arbitrarily combined. For the data inquired, you can also browse related data such as its status, handler, reviewer and opinions. Basic data management: Add, modify, delete and other basic data such as business type, data type, and status used by the system.
The approved business data is processed according to the relevant business rules. When a business rule is matched, the execution action defined in it will be executed. Execution actions are implemented by program code. The implementation of this module is mainly used to be mapped into the execution actions of rules. By analyzing and abstracting the enterprise accounting standards, the relevant execution actions corresponding to its business rules are abstracted as code implementation. For subsequent business rule editing definitions, map the execution actions. According to different business types in the business activities of enterprises, sort out and define different business execution action sets. It also supports the mutual inheritance of executive actions.
Textualization of ciphertext
In the information environment, the types of database account data mainly include text, numbers, dates, and logical types. If the data exported from the accounting software is saved as a TXT file, it is saved as plain text data as other types of files. Usually binary data.
After the plain text is encrypted to DES encrypted text, the original text will become non-text type, and data storage or network transmission may have problems. To fix this, process the ciphertext and convert it to text type. Converts each byte into an ASCII hexadecimal expression corresponding to the byte. For example, the character “A” is converted into two characters “41”, and the character return and line feed are converted into four characters “0D0A”. The textualization process helps save and send text-type data, but the data length doubles. To be stored in a raw data table, the matching of the length of the encrypted data must be considered when designing the table structure. When decoding textual encrypted text, each two characters in the encrypted text must be split into combinations, the corresponding hexadecimal values are analyzed, DES encrypted text blocks are restored, and then DES decoding is performed. The important function of the swap is the corresponding character of hexadecimal conversion, and the corresponding character is converted to hexadecimal.
Other encryption methods can also be used in the textualization process to further increase the level of encryption security according to security needs. A simple secondary encryption method, such as changing the character sequence and Xor processing of the data bits, can realize the encryption function, and has higher encryption efficiency. It also works with DES to ensure data security.
Simulation analysis of accounting data encryption based on DES algorithm
Encryption processing of text fields in experimental A/C set database
The basic information of the unit in the A / C set, the data of the accounting system, the user name, ID card number, contact information, customer and supplier information, and inventory name are all important contents. Once leaked, it will bring security risks to the unit or individual. During development, the underlying DES encryption process ensures that even if the data is obtained by an illegal user, it can only be ciphertext, and the plain text content cannot be known.
This field is encrypted with DES, and the value is changed drastically. For example, the key “12345678” can process text with encrypted text, but if the number of characters in the plain text is not a multiple of 8, spaces will be added. The ciphertexts of the account codes “1001” and “100201” are “98b843260952f3b1” and “31e46014dbf66dcd”. The ciphertext of the title “cash in cash” is “d171c6dbb165019f”. The password for the account group event date is “July 1, 2016”. That is “97bd605ee088362016d67558ac2242f”, the amount is “1000.00”, and the ciphertext is “77e70225251d7487”. “00000000000” and other more special character strings are encrypted, and the ciphertext is “5f6a7d528e394f39”. As literally, the regularity of ciphertext and plain text cannot be found.
You can write variable-length character (VarChar) data directly back to the original field, fixed-length string, or other types of data field. The VarChar field must be set to save untextified encrypted text. You can also set a binary text field to hold the ciphertext.
Although the DES encryption algorithm is faster than other encryption methods, the encryption processing incorporated into the software requires a certain amount of time, and the management software has a large amount of data, which requires high timeliness. Therefore, select only the fields with higher security requirements for encryption.
Encryption processing of experimental accounting software export data
Data exported by accounting software are usually saved separately in file format. Generally, there are many types of files, such as text files, Excel files, Word files, and Vfp table (Dbf) files. For example, the UFIDA ERP-U8.Rep report file. In addition to files in custom formats, you can open other types of files for third-party software. Due to the popularity of third-party software, the risk of data leakage is prone to occur. For confidential data, DES encryption can be performed on data files.
In Excel books or Vfp Dbf tables, you can encrypt the local data or the entire file in the table. In text files, Word files, or custom format files of accounting software, you can DES encrypt the entire file. In some encryption, the related software can open the encrypted text file, but if you manually edit the encrypted text at this time, it will not be able to be decrypted, so appropriate protection measures are needed. Particularly important confidential data uses multiple means to ensure data security. While DES is encrypted, Word, Excel software’s original encryption method can also be used. Compression software can also apply secure passwords when compressing standalone files.
Analysis of ciphertext distribution of accounting data
The ciphertext distribution is an important index to measure the security of the encryption algorithm. A good encryption algorithm should be uniform regardless of whether the plaintext distribution is uniform or not. If the ciphertext distribution is uneven, it means that there is some statistical law in the ciphertext, and the attacker can use this statistical characteristic to analyze and crack the algorithm through a ciphertext-only attack. To verify the security of the DES algorithm in this paper, the plaintext text in the previous section is encrypted using this algorithm. The histogram of the ciphertext distribution is shown in Fig. 3.

The ciphertext histogram.
Because the ASCII value of the character in the general text file is between 32–127. It can be seen from Fig. 3 that the ciphertext is mostly distributed in the range of 0–255, while the plaintext is more evenly distributed between 150–255. The plaintext distribution is shown in Fig. 4. The ciphertext distribution obtained after encryption by the DES algorithm in this paper is uniform, which obscures the distribution law before encryption. Cryptoanalysts cannot perform statistical analysis, cannot obtain any useful information from it, and effectively resist statistical analysis attacks.

Plaintext histogram.
If the ratio of 0 and 1 in the ciphertext generated by an encryption algorithm is closer to 1, it means that the encryption algorithm can well confuse the content of the plaintext into the ciphertext and can effectively resist the statistical analysis attack. The following uses the DES algorithm and the general algorithm to encrypt the same text, and then counts the number of 0 and 1 in the initial plaintext and the corresponding ciphertext, respectively. The results are shown in Table 4.
Comparison of the number of initial plaintext and two ciphertexts 0 and 1
As can be seen from the table, both the DES algorithm and the general algorithm in this article can reduce the gap between 0 and 1 in the plaintext. The ratio of 0 and 1 in the ciphertext is closer to 1, indicating that the DES algorithm has better differential uniformity than the general algorithm.
The purpose of the plaintext sensitivity test is to determine whether the ciphertext generated by an encryption algorithm is very sensitive to changes in the plaintext, which is embodied in the same key bit. If a slight change occurs in the plaintext, the corresponding ciphertext will be There will be huge differences. If an encryption algorithm is sensitive to plaintext, its ability to resist known plaintext attacks and selective plaintext attacks is very strong. The sensitivity of the plaintext can be measured by the avalanche effect, that is, the change of each bit of the plaintext will cause each bit of the ciphertext to change with a probability of 0.5. To verify that the encryption algorithm proposed in this paper is sensitive to plaintext, an initial key with a length of 256 bits is randomly generated, and the initial key is kept unchanged. A plaintext with a length of 64 bits is randomly selected, and then each of the plaintexts is sequentially selected in order. The bits are reversed to obtain 64 plaintexts that are still 64 bits in length. The algorithm in this paper is used to encrypt with the same key to generate 64 ciphertext groups with a length of 64 bits. The 64 ciphertexts obtained and the initial ciphertext is compared, and the results are shown in Fig. 5.

Plaintext sensitivity comparison.
Figure 5 compares the plaintext sensitivity of the DES algorithm with the traditional algorithm in this paper. It can be seen that when the plaintext is changed by 1 bit, the number of changed bits of the 64 ciphers of the DES algorithm compared with the original ciphertext fluctuates around 32 bits, of which 39 ciphertext changed bits in the range, it accounts for 60.94% of all ciphertexts, with an average changed bit of 32.2656 bits, of which the most changed is 40 bits and the least changed is 23 bits. The number of changed bits of the 64 ciphertexts of the traditional algorithm compared with the original ciphertexts also fluctuates up and down by 32 bits, of which a total of 34 ciphertext change bits are in the range, accounting for 53.13% of all ciphertexts. Change the bit to 31.5531 bits, of which the most changed is 40 bits and the least changed is 17 bits. Generally speaking, the DES algorithm in this paper has a stronger ability to replace plain text than traditional algorithms. Each bit change in the plain text input is evenly reflected in each bit of the ciphertext output.
The most intuitive manifestation of whether a cryptographic system is qualified is its operating speed. A text file with a size of 1KB was selected for encryption and decryption operations using the DES algorithm and the traditional algorithm in this paper. The operating speeds of the two algorithms were compared. The results are shown in Table 5. As can be seen from the table, the DES algorithm in this paper takes less time, and the encryption and decryption speed is faster. Compared with the traditional DES algorithm, the speed is about doubled.
Comparison of encryption and decryption speeds of the two algorithms
Comparison of encryption and decryption speeds of the two algorithms
Accounting data packets are generally about 1KB. The algorithm encryption and decryption time in this article is about 1 s, so it can meet the real-time needs of accounting data.
The time-consuming comparison of the two algorithms for encrypting and decrypting text of different sizes is shown in Fig. 6. It can be seen that no matter how large the data is, the DES algorithm in this paper is faster than the traditional algorithm.

Encryption and decryption time of two algorithms.
Because the DES algorithm in this article only uses XOR, shift, permutation, and substitution operations, and the decryption process and the encryption process are reciprocal, the operations are the same. Therefore, the calculation amount during the encryption and decryption operations is relatively small and the calculation overhead is low. Besides, the DES algorithm in the accounting data encryption algorithm has relatively low energy consumption, and the DES algorithm in this paper is improved based on the traditional algorithm, reducing the number of iterations, removing the initial permutation and inverse initial permutation. Consume less.
Encryption technology is the basis for ensuring the security of accounting data. At present, the mainstream method is to use a symmetric encryption algorithm for accounting data. With the development of decryption technology, the encryption technology that was considered safe in the past is difficult to ensure its security. This paper focuses on the DES algorithm and improves it to make it more suitable for wireless sensor networks. This paper summarizes several encryption algorithms commonly used in accounting data, and analyzes and compares them. The required memory space is analyzed theoretically, and their running speed and communication bandwidth are simulated and compared through simulation. It is analyzed that the DES algorithm is the most suitable for accounting data encryption.
This paper first attempts to design an S-box using a quantum genetic algorithm. Because the S-box coding is a discrete problem, this paper improves the quantum genetic algorithm. By comparing with the S-box generated by the genetic algorithm design and the S-box used in the traditional DES algorithm, it is found that the algorithm in this paper effectively enhances the S-box pair differential cipher. The resistance of analysis and linear cryptanalysis provides a guarantee for further design of cryptographic algorithms with good security performance. The DES algorithm uses a Feistel network structure. The advantage of this structure is that the encryption and decryption process is reciprocal, which is convenient for software and hardware implementation. The biggest disadvantage is that the security is not high. Only half of the data in each iteration has changed. It provides convenience for cryptanalysts; and the initial key bit of the DES algorithm is 64 bits, and only 56 bits are used in the iteration process. The key length is too short, and it cannot resist the exhaustive attack well.
The high-level language of Visual FoxPro used in this article, from processing efficiency, although the completion efficiency of encryption and decoding processing is very low, the data processing efficiency is very high, with its database and data table management functions, suitable for commercial accounting software Secondary development. When extracting account data from other software, you need to consider security issues, so you must use this language to implement DES encryption. The encryption program can be executed independently, so it is suitable for the control of the encryption process and the improvement of the encryption method, but the encryption efficiency of some field data is also within the allowable range. If you need to quickly encrypt a large amount of data, you can consider using more efficient languages such as NET, C #, C, JAVA. These languages include DES processing functions, making it easy to implement encryption.
