# Hybrid Encryption Scheme for Hospital Financial Data Based on Noekeon Algorithm

Authors: Fei Yao
Journal: Security and Communication Networks
 (2021)

---

## Abstract

The previous encryption methods of hospital financial data have the problem of overburden. Therefore, a research study on hybrid encryption of hospital financial data based on Noekeon algorithm is proposed. From the basic principles of the Noekeon algorithm and the application and implementation of the Noekeon algorithm, a hybrid encryption scheme for hospital financial data based on the Noekeon algorithm is designed. In order to improve the security of the encryption system, the RSA algorithm is used to encrypt the encrypted content twice. The hybrid algorithm realizes the hybrid encryption of the hospital's financial data. Finally, a hybrid encryption system for hospital financial data based on Noekeon algorithm is designed. Experimental results show that this method has a higher success rate and better comprehensive performance. It not only improves the encryption efficiency of hospital financial data but also enhances the security of hospital financial data, which has greater application value.


---

## Body

## 1. Introduction

With the rapid development of computer technology and network technology, the degree of digitization and informatization has also improved, in which a large amount of hospital data has increased sharply. Now that hospitals have entered the information age, many hospitals have learned to use integrated information management systems to manage medical data and financial data, but its security is not high, and data loss often occurs. In order to solve a series of problems such as the storage of large-scale hospital financial data, cloud computing technology came into being, providing reliable support for large hospital financial data retrieval and calculation [1]. Cloud environment is a cluster composed of massive computing nodes. It can not only store large-scale hospital financial data through the cloud, but also process hospital financial data according to the parallel characteristics of the cluster and the computing performance of each node. Among a large number of hospital information data, hospital financial data is most vulnerable to attack and theft in storage and retrieval [2, 3]. Therefore, the privacy protection of hospital financial data is not only an urgent problem to be solved in the operation of large hospital financial data, but also a very important topic in the field of information security, which has attracted extensive attention of relevant researchers.According to Gu [4], because there is much hospital financial data that need to be encrypted in the hospital financial information, the problem of poor system stability often occurs in the process of information encryption. Therefore, the hyperchaotic two-way authentication method is applied to the design of hospital financial information security encryption system. The hospital financial information security encryption system based on the hyperchaotic two-way authentication is more stable than the traditional system, but the security after application is poor. Pang [5] and others proposed an intelligent mining algorithm for homomorphic encrypted hospital financial data based on improved hybrid jumping. The nonlinear encrypted hospital financial data samples are mapped to the kernel space to solve the nonlinear problem of hospital financial data characteristics, and the hospital financial data samples encrypted in the kernel space are sparsely reconstructed. The expression of the original encrypted hospital financial data in the kernel space is obtained, the corresponding scoring mechanism is established, and the optimal hospital financial data features are selected. The selected hospital financial data features are clustered by using the improved hybrid leapfrog hospital financial data fuzzy clustering, and the adaptive adjustment factors are set to increase the ability of hybrid leapfrog local search, using the compactness and separation degree in the fuzzy class to construct a new fitness function, obtain the threshold of the class cluster, and complete the privacy protection of homomorphic encryption. The simulation shows that the proposed algorithm can improve the convergence of clustering and improve the accuracy of hospital financial data mining. But the cost of this system is too high to be applied in large quantities. Tian [6] aims at the security and confidentiality of hospital financial data under the cloud platform environment. Based on the MapReduce distributed framework and integrating the advantages of four chaotic mapping systems, a hybrid chaotic encryption method for cloud computing is proposed. Using the chaotic sequence generated by four chaotic maps as the key, the plaintext is encrypted with multiple keys generated iteratively from the chaotic system for many times. The experimental results show that the algorithm has high execution efficiency and large key space. It can effectively resist the attack of brute force key cracking. However, the operating stability of the system is poor.In recent years, thanks to the increasing popularity of information technology and network tools, great changes have taken place in modern people's work and life. But then, while people enjoy network services, they are also faced with severe risk of information theft. Homomorphic encryption not only has very high security, but also can be directly processed on the encrypted hospital financial data. The decryption result under this method is the same as that obtained by directly processing plaintext, which is very practical. Therefore, combined with the advantages of the current research results of hospital financial data encryption, a hybrid encryption method of hospital financial data based on Noekeon algorithm is proposed.


## 2. Design of Hybrid Encryption Scheme of Hospital Financial Data Based on Noekeon Algorithm

### 2.1. Basic Principle of Noekeon Algorithm

Noekeon algorithm is one of the commonly used symmetric encryption algorithms. It belongs to a block cipher. The packet length is 128 bits and the key length is 128 bits. The overall structure of Noekeon algorithm uses 16 rounds of SP network, each round is composed of byte rotation and linear transformation, and it is composed of 32 parallel 4-bit–4-bit S-boxes. The encryption and decryption structure of Noekeon algorithm are very similar, and each basic module algorithm is matched. [7]. Through actual testing, Noekeon algorithm can safely and effectively complete encryption and decryption operations on various operating platforms. In fact, there are many algorithms that can be used for encryption and decryption, such as symmetric and asymmetric encryption algorithms, digital signature encryption algorithms, and hash encryption algorithms. However, different algorithms are suitable for different occasions. For example, the encryption effect of asymmetric encryption algorithm is good, but the amount of calculation involved is also quite large, which is equivalent to hundred times the level of symmetric encryption algorithm. However, the storage space of the hospital financial database is often very small, and the use of asymmetric encryption algorithms in a small space obviously cannot play its role in its application. Therefore, it is more appropriate to use a symmetric encryption algorithm on the hospital financial database. In addition to the Noekeon algorithm, commonly used symmetric encryption algorithms also include DES, RSA, AES, etc. The four symmetric encryption algorithms are compared, as shown in Table 1.Table 1
Comparison of the addition and decryption of the four algorithms.
AlgorithmPacket length (bit)Key length (bit)Encryption and decryption speed (MS/10 kB)Main applicationSecurityDES64562.5Two-way authentication between IC and POS card, MAC verification of financial transaction hospital financial data packetDependent key is attacked by exhaustive searchAES64128/192/2562Wireless network, information security field, AES software application, etc.High security level, advanced encryption standardRSAPublic private key pair1024600Digital signature and key managementSafe, easy to understand, and easy to implementNoekeon1281283File content encryption and decryptionDepending on the wheel constant, it is vulnerable to sliding attack


### 2.2. Application and Implementation of Noekeon Algorithm

Noekeon algorithm has the characteristics of fast response speed, strong system adaptability, high software and hardware compatibility, and high encryption level. It has good application value in hospital financial data encryption transmission system. Specifically, when designing Noekeon algorithm, its implementation function is as follows:Noekeon_Encrypt (Key, State);//Encryption function Noekeon_Decrypt (Key, State);//Decryption function Round (Key,State, Round_ct1, Round_ct2);//Wheel function Gamma (State);//Gamma function module.Theta(key, State);//Theta function module.Pi1(State);//Shift operation module Pi1.Pi2(State);//Shift operation module Pi2.“Key” is the round key, “State” is the 128-bit intermediate variable, “Round_ct” is the round constant from hexadecimal numbers, such as 8A, 4B, 36, C7, 4D, AE, D4, 5A, 35, etc. When Noekeon algorithm is used for encryption, the round constants are selected one by one from left to right in order; when the Noekeon algorithm is used for decryption, the round constants are selected one by one from right to left in order “Gamma” is a nonlinear function module, “Theta” is a key function module, and “Pi1” and “Pi2” are shift operation modules.


### 2.3. Design of Hybrid Encryption Scheme for Hospital Financial Data

Figure1 shows the encryption and decryption scheme of hospital financial data. This paper uses Noekeon algorithm for encryption and logistic chaos algorithm for interference [8]. The process of A1 is the process of using the Noekeon algorithm to encrypt the financial data of the hospital. A2 is the process of decrypting the financial data of the financial hospital. The financial data of the hospital is first encrypted through the A1 process, turning the data into garbled codes. After the A1 process is processed, the timely information is intercepted and the corresponding information cannot be obtained. When the hospital personnel need to read the information, the node password can be used to decrypt it. Using encryption and decryption methods can improve the security of hospital financial data in the transmission process, and subsequent experiments can prove that the security of the algorithm is sufficiently reliable.Figure 1
Scheme design of the addition and decryption of hospital financial data.As shown in Figure2, the block diagram of hospital financial data scrambled by Noekeon algorithm encryption and logistic chaos algorithm is introduced.Figure 2
Box diagram after encryption and chaos of financial data of financial hospitals.As can be seen from Figure2, M1 represents the head of the hospital financial data body domain and SMIL domain, M2 represents the attachment part, and K represents the key. The specific encryption steps are as follows:(1)
Select M1 to perform logistic scrambling to obtain information C1(2)
Based on C1, find the attachment part m2, and then XOR encrypt m2 to obtain C4(3)
Based on C1, C2 is obtained by encrypting with key K and Noekeon algorithm(4)
The length of C2 is encrypted by Noekeon algorithm to obtain C3The decryption process of hospital financial data is shown in Figure2. It can be seen from the figure that the financial data and decryption process of the financial hospital are an inverse process of the encryption process. When a piece of financial data of the financial hospital is received, the tail of the financial data packet of the financial hospital is extracted to obtain the length of the financial data of the financial hospital and then decrypt the length information of the financial data of the financial hospital, divide the SMIL domain and the attachment domain, decrypt the attachment through the SMIL information and XOR decryption method, then decrypt the head and SMIL domain of the financial data domain of the hospital using the Noekeon algorithm, and decrypt the body domain and SMIL domain of the financial data of the hospital using the scrambling algorithm. Finally, all hospital financial data are merged to obtain the original hospital financial data sent by the sender. Flowchart of the financial data decryption of the financial hospital is shown in Figure 3.Figure 3
Flowchart of the financial data decryption of the financial hospital.


## 2.1. Basic Principle of Noekeon Algorithm

Noekeon algorithm is one of the commonly used symmetric encryption algorithms. It belongs to a block cipher. The packet length is 128 bits and the key length is 128 bits. The overall structure of Noekeon algorithm uses 16 rounds of SP network, each round is composed of byte rotation and linear transformation, and it is composed of 32 parallel 4-bit–4-bit S-boxes. The encryption and decryption structure of Noekeon algorithm are very similar, and each basic module algorithm is matched. [7]. Through actual testing, Noekeon algorithm can safely and effectively complete encryption and decryption operations on various operating platforms. In fact, there are many algorithms that can be used for encryption and decryption, such as symmetric and asymmetric encryption algorithms, digital signature encryption algorithms, and hash encryption algorithms. However, different algorithms are suitable for different occasions. For example, the encryption effect of asymmetric encryption algorithm is good, but the amount of calculation involved is also quite large, which is equivalent to hundred times the level of symmetric encryption algorithm. However, the storage space of the hospital financial database is often very small, and the use of asymmetric encryption algorithms in a small space obviously cannot play its role in its application. Therefore, it is more appropriate to use a symmetric encryption algorithm on the hospital financial database. In addition to the Noekeon algorithm, commonly used symmetric encryption algorithms also include DES, RSA, AES, etc. The four symmetric encryption algorithms are compared, as shown in Table 1.Table 1
Comparison of the addition and decryption of the four algorithms.
AlgorithmPacket length (bit)Key length (bit)Encryption and decryption speed (MS/10 kB)Main applicationSecurityDES64562.5Two-way authentication between IC and POS card, MAC verification of financial transaction hospital financial data packetDependent key is attacked by exhaustive searchAES64128/192/2562Wireless network, information security field, AES software application, etc.High security level, advanced encryption standardRSAPublic private key pair1024600Digital signature and key managementSafe, easy to understand, and easy to implementNoekeon1281283File content encryption and decryptionDepending on the wheel constant, it is vulnerable to sliding attack


## 2.2. Application and Implementation of Noekeon Algorithm

Noekeon algorithm has the characteristics of fast response speed, strong system adaptability, high software and hardware compatibility, and high encryption level. It has good application value in hospital financial data encryption transmission system. Specifically, when designing Noekeon algorithm, its implementation function is as follows:Noekeon_Encrypt (Key, State);//Encryption function Noekeon_Decrypt (Key, State);//Decryption function Round (Key,State, Round_ct1, Round_ct2);//Wheel function Gamma (State);//Gamma function module.Theta(key, State);//Theta function module.Pi1(State);//Shift operation module Pi1.Pi2(State);//Shift operation module Pi2.“Key” is the round key, “State” is the 128-bit intermediate variable, “Round_ct” is the round constant from hexadecimal numbers, such as 8A, 4B, 36, C7, 4D, AE, D4, 5A, 35, etc. When Noekeon algorithm is used for encryption, the round constants are selected one by one from left to right in order; when the Noekeon algorithm is used for decryption, the round constants are selected one by one from right to left in order “Gamma” is a nonlinear function module, “Theta” is a key function module, and “Pi1” and “Pi2” are shift operation modules.


## 2.3. Design of Hybrid Encryption Scheme for Hospital Financial Data

Figure1 shows the encryption and decryption scheme of hospital financial data. This paper uses Noekeon algorithm for encryption and logistic chaos algorithm for interference [8]. The process of A1 is the process of using the Noekeon algorithm to encrypt the financial data of the hospital. A2 is the process of decrypting the financial data of the financial hospital. The financial data of the hospital is first encrypted through the A1 process, turning the data into garbled codes. After the A1 process is processed, the timely information is intercepted and the corresponding information cannot be obtained. When the hospital personnel need to read the information, the node password can be used to decrypt it. Using encryption and decryption methods can improve the security of hospital financial data in the transmission process, and subsequent experiments can prove that the security of the algorithm is sufficiently reliable.Figure 1
Scheme design of the addition and decryption of hospital financial data.As shown in Figure2, the block diagram of hospital financial data scrambled by Noekeon algorithm encryption and logistic chaos algorithm is introduced.Figure 2
Box diagram after encryption and chaos of financial data of financial hospitals.As can be seen from Figure2, M1 represents the head of the hospital financial data body domain and SMIL domain, M2 represents the attachment part, and K represents the key. The specific encryption steps are as follows:(1)
Select M1 to perform logistic scrambling to obtain information C1(2)
Based on C1, find the attachment part m2, and then XOR encrypt m2 to obtain C4(3)
Based on C1, C2 is obtained by encrypting with key K and Noekeon algorithm(4)
The length of C2 is encrypted by Noekeon algorithm to obtain C3The decryption process of hospital financial data is shown in Figure2. It can be seen from the figure that the financial data and decryption process of the financial hospital are an inverse process of the encryption process. When a piece of financial data of the financial hospital is received, the tail of the financial data packet of the financial hospital is extracted to obtain the length of the financial data of the financial hospital and then decrypt the length information of the financial data of the financial hospital, divide the SMIL domain and the attachment domain, decrypt the attachment through the SMIL information and XOR decryption method, then decrypt the head and SMIL domain of the financial data domain of the hospital using the Noekeon algorithm, and decrypt the body domain and SMIL domain of the financial data of the hospital using the scrambling algorithm. Finally, all hospital financial data are merged to obtain the original hospital financial data sent by the sender. Flowchart of the financial data decryption of the financial hospital is shown in Figure 3.Figure 3
Flowchart of the financial data decryption of the financial hospital.


## 3. Hybrid Encryption of Hospital Financial Data Based on Noekeon Algorithm

### 3.1. RSA Algorithm Principle

RSA algorithm is mainly used for further encryption of Noekeon key, and its security level is largely determined by the decomposition level of integer factor. In terms of the structure of design and implementation, RSA algorithm mainly includes three links: key generation, information encryption, and information decryption. RSA algorithm requires a large number of primes, which are all in 2048-bit level [9]. Therefore, when using RSA algorithm for information encryption, a large number of complex large numerical operations must be carried out. In this way, although RSA algorithm can effectively improve the security of hospital financial data information, its operation efficiency is inevitably at a lower level compared with other encryption algorithms. Therefore, the hospital financial data encryption transmission system should still be based on Noekeon algorithm, and only RSA algorithm is used for the encryption of Noekeon key.In order to improve the efficiency and security of hospital financial data encryption, a hybrid encryption method of hospital financial data based on Noekeon algorithm is proposed. This paper analyzes the operation principle of RSA algorithm, parameter selection, and prime judgment, puts forward an improved RSA algorithm, and discusses the key technologies in the improvement process. Considering that RSA algorithm has strong security, but the encryption speed needs to be improved, DES algorithm is introduced to form a hybrid algorithm for homomorphic encryption of private hospital financial data sets. During the operation of the hybrid algorithm, the plaintext hospital financial data set is encrypted by DES algorithm, and the key used by DES algorithm is encrypted by RSA. The packed ciphertext and the encrypted key are transmitted to the receiving end. After the receiving end obtains the hospital financial data packet, the key ciphertext is decrypted to obtain the key encrypted by DES algorithm. Because the encryption and decryption keys of DES algorithm are the same, the ciphertext decryption can be realized after obtaining the key. The experimental results show that this method has the advantages of short encryption time, strong security performance, and wide application range compared with the improved RSA algorithm. According to the experimental results, this method has strong reliability and can provide support for the security protection of private hospital financial data.


### 3.2. RSA Algorithm and Its Improved Algorithm

#### 3.2.1. RSA Algorithm

The principle of using RSA algorithm to encrypt hospital financial data is simpler than symmetrical encryption algorithm. The calculation used for encryption and decryption is modular power multiplication [10]. Here, it is assumed that P is plaintext and C is ciphertext. Then the sender can use C=Pemodn to encrypt plaintext and the receiver can use P=Cdmodn to decrypt. e represents the public key, d represents the key, and n represents a very large integer. The detailed process is shown in Figure 4.Figure 4
Schematic diagram of the RSA algorithm encryption and decryption and key generation.The encryption and decryption process of RSA algorithm is as follows:Step 1: select two large prime numbersp, q, and p≠q, n=p×q, ϕn=p−1×q−1Step 2: select primee1<e<ϕn, where e and ϕn are mutually primeStep 3: takee,n as the public key and encrypt the plaintext according to formula C=PemodnStep 4: calculate the private keyd=e−1modϕn; decrypt the ciphertext according to P=CdmodnIn the above steps,e and n are public and everyone can know, but ϕn is the key and needs to be kept confidential. When ϕn is obtained, the security of the RRSA algorithm will be greatly weakened. The security of RSA algorithm is directly related to the length of p and q. The longer the length, the higher the security. Therefore, the length of p and q in practical application is at least 512 bits.


#### 3.2.2. Parameter Selection

RSA algorithm is the first encryption algorithm that relies on factor decomposition for system security. It can be predicted that ifn can be decomposed very easily, the RSA algorithm is no longer secure. In conclusion, it can be considered that RSA security and factor decomposition are equivalent. This means that the selection of public key n is very important in the running process of RSA algorithm. The following are the selection principles of parameters n, e, and d.(1) ParameternSelection. In this process, the n value should be large enough, which is the most fundamental principle to ensure the security performance of RSA algorithm. It must be ensured that the decomposition n cannot be carried out in calculation. For the purpose of ensuring the security of the algorithm, the length of the generated large prime number should be at least a decimal number above 100 bits, and the n can be more than 200 bits [11].Under the above constraints,n=p×q, p and q are preferably strong prime numbers. Among them, strong prime numbers can be defined as follows:Condition 1: there are large prime numbersp1 and p2, which can make p1|p−1 and p2|p+1Condition 2: there are large prime numbersr1, r2, s1, and s2, which can make r1|p1−1, s1|p1+1, r2|p2−1, and s2|p2+1Finally, the difference betweenp and q should be large, and the maximum common factor of p−1 and q−1 should be small enough. Assuming that the difference between p and q is very small, p+q/2≈n can be established. Since the basic mathematical principle p+q/22−n=p+q/22 is established, the values of p and q can be calculated by substituting the values of the above formula into the following formula.(2) ParametereSelection. During the operation of RSA algorithm, e only needs to meet gcde,ϕn=1, which means that e can be selected randomly. According to the basic principle of encryption, the smaller the e value, the smaller the encryption time. Therefore, relevant scholars suggest that the smaller e, the better. However, practice shows that decimal e can trigger security problems. To sum up, in actual operation, the conditions to be followed for parameter e selection are as follows:Condition 1:e cannot be too small. Considering the efficiency and security of hospital financial data encryption, it is best to select a prime number with a length of 16Condition 2: in the process of selecting parametere, the module with the largest order ϕn should be selected; that is, the smallest i in ei=1modϕn should be p−1q−1/2(3) ParameterdSelection. d as the key should be greater than n1/4. In practical application, it is hoped to improve the decryption or signature efficiency according to the small number d. When e is determined, d can be obtained based on Euclidean algorithm. In conclusion, assuming that the length of d is less than n1/4, the parameter d can be obtained efficiently only by mathematical algorithm.


#### 3.2.3. Prime Judgment

In the running process of RSA algorithm, arbitrarily generating large prime numbers is a necessary operation. Because thep and q digits can determine the security of RSA algorithm, it is a difficult problem to quickly solve the problem of large prime generation.Prime number determination is done using improved Miller Rabin algorithm [12]. In the process, considering that arbitrarily generated large integers are time-consuming in prime judgment, it is necessary to filter out some relatively significant composite numbers before transmitting large integers to the degree of prime judgment [13, 14]. The even number and the number with 5 as the mantissa are excluded first, then divide the decimal by the large number, select 53 small prime numbers, and divide the large integer. The detailed process is as follows:Step 1: arbitrarily generate a large integernStep 2: select a group of prime arrays with a length of 53 from 2 and record the array asaiStep 3:i=0Step 4: wheni<53, calculate y=nmodaiStep 5: ify=0 is assumed, it means that it can be divisible and is not a prime number. On the contrary, if i=i++, go to Step 4According to the improved Miller Rabin algorithm, the primality judgment is carried out for the values after the above processing. The improved prime judgment algorithm is to improve the modular power operation in Miller Rabin algorithm according to Montgomery's fast modular power method.The expression of Montgomery method is(1)MonproA,B,N=ABR−1modN,where R represents the power based on 2 and when R is 2k, N needs to meet 2k−1≤N<2k and gcdR,N=1.


#### 3.2.4. Improved RSA algorithm

RSA algorithm has significant advantages and disadvantages. The advantages are high security performance and the disadvantages are low encryption efficiency. The time-consuming operations in the running process of RSA algorithm are generation and determination of large prime numbers and modular power calculationce′modn. The prime judgment has been analyzed above, and the fast calculation of modular power is discussed below.For the fast calculation ofce′modn, the sliding window method is adopted and used in RSA algorithm.The principle of sliding window method is to modularize the indexe′ in ce′modn. For example, e′=1545485511510=0011100110010010111001011111110010112, if the length of the setting window is 3, the above binary numbers are grouped from the left, and the length of the grouping is 3 bits. The grouping principle is to ensure that the first bit of each group is 1, so part of 0 may be skipped in the middle. At the end, when the length is smaller than 3 digits, the remaining numbers form a group separately without 0 or 1 [15].After grouping, the ways of grouping to improve the efficiency of modular exponentiation operation are analyzed. Takea10112 as an example: a10112=a11=a10a=a1012×2a. Thus, the expression of e′ can be deduced:(2)e′=7×231+6×226+4×222+5×219+6×216+5×212+7×29+7×26+5×21+20.Simplifye′ and substitute the simplified e′ into ce′modn; then,(3)ce′modn=c7×25+6×24+423+5×23+6×24+5×23+7×23+7×25+5×21+1modn.According to the above calculation and analysis, the essence of the operation of the sliding window method is to preprocess the index, so as to reduce the amount of calculation.


### 3.3. Implementation of Homomorphic Encryption of the Private Hospital Financial Data Set

Considering that RSA algorithm has strong security, but the encryption speed needs to be improved, DES algorithm is introduced. The encryption speed of this algorithm is fast, but there are some problems in key management. The combination of the two algorithms can effectively complement each other.The key used in the operation of DES algorithm is based on 56 bits, of which 8 bits are parity bits. The encryption operation is implemented for 64-bit plaintext, and 16 rounds of encoding operation are implemented for 64-bit plaintext. In each round of encoding, each 48-bit key value is obtained according to the 56-bit complete key.Assume that plaintextm′ and key k′ are 64-bit 0 and 1 strings. Key MEY is only 56-bit valid, and k8′, k16′, k24′, k32′, k40′, k48′, k56′, and k64′ are parity bits, which will not affect encryption. Suppose KEY=K1′K2′⋯K64′MING=M1′M2′⋯M64′, mi′ and ki′ are 0 or 1, i=1,2,⋯,64.According to the above settings, the encryption process is defined as follows:(4)FDESMING=P′−1×T16×T15×⋯×T1×P′MING.Step 1:P′ represents the initial transformation, P′−1 represents the inverse transformation of P′, and both meet IP′×IP′−1=1Step 2: DES iterationStep 3: in the subkey generation process, the original key is reordered and divided into two parts, and then the two parts of the subkey are obtained through cyclic shift. Finally, the subkey is synthesized and reordered to form the subkeyThe decryption process of the encryption algorithm is similar to the encryption steps. 16 rounds of iteration can be reversed from the key sequence.Based on the above contents, the homomorphic encryption of private hospital financial data set is realized by using hybrid algorithm. Figure5 shows the principle of hybrid algorithm.Figure 5
Principles of the hybrid algorithm.During the operation of the hybrid algorithm, the plaintext hospital financial data set is encrypted by DES algorithm, and the key used by DES algorithm is encrypted by RSA. The packed ciphertext and the encrypted key are transmitted to the receiving end. After the receiving end obtains the hospital financial data packet, the key ciphertext is decrypted to obtain the key encrypted by DES algorithm. Considering that the encryption key of DES algorithm is the same as that of decryption, ciphertext decryption can be realized after obtaining the key.The mixed algorithm is implemented on the VC + + platform. Because there are many outputs involved, the MFC interface is written to realize the real-time display of state. The test file used in the implementation is. TXT file. The file encryption is realized according to DES algorithm, RSA encryption is implemented for DES algorithm key, and the encryption results are displayed by MFC interface. Here, the values ofp and q of RSA algorithm are defined as 512 bits. The time consumed in the encryption process, including the key generation time of RSA algorithm, is displayed in real time on the interface. In the process of decryption, the DES algorithm key must be obtained first. Thus, in the decryption operation, first decrypt the des key encrypted by RSA and output the result, and then decrypt the file according to the key.


### 3.4. Design of Hybrid Encryption Interface for Hospital Financial Data Based on Noekeon Algorithm

Based on the above analysis, the hybrid encryption interface of hospital financial data based on Noekeon algorithm is designed.


#### 3.4.1. Design Principle of Hybrid Encryption Interface

Firstly, three information bar modules that can be filled in “user key”, “file opening path”, and “file saving path” should be set in the main area of Noekeon encryption system interface as the operation basis of information processing and storage. Then, the two path modules should be connected with the storage disk of the computer system and the hospital financial database, and the “Browse” button should be set to facilitate users to freely select the extraction area and storage area of information. Finally, three keys of “encryption”, “decryption”, and “digital signature” should be set under the key information bar, and Noekeon algorithm and RSA algorithm should be set into the trigger module of the corresponding key.In this way, users can encrypt, decrypt, and sign files or hospital financial data by operating the main interface of the hospital financial data encryption and transmission system. In addition, in order to ensure the aesthetics and practicability of the system interface, it is also necessary to design the compatibility of the layout, frame, and other appearance structures of the system interface, so as to ensure that system users such as windows 7 and MacOS can complete the interface operation quickly and accurately.Noekeon algorithm has the characteristics of high encryption strength, fast speed, easy standardization, and easy software and hardware implementation. The main implementation functions of Noekeon algorithm are as follows:Noekeon_ Encrypt(Key,State); 〃 Encryption function.Noekeon_ Decrypt(Key,State); 〃 Decryption function.Round(Key, State, Round_ ctl, Round_ ct2);//Wheel function Gamma(State);//Gamma function module.Theta(Key,State);//Theta function module.Pil(State); 〃 Shift operation module Pil.Pi2(State);//Shift operation module Pi2.In the above function, Key represents round key, State represents 128-bit intermediate variable, and Round_ct is the round constant, which is taken from the following hexadecimal numbers 80, 1B, 36, 6C, D8, AB, 4D, 9A, 2F, 5E, BC, 63, C6, 97, 35, 6A, and D4. It is selected one by one from left to right during encryption and from right to left during decryption. Gamma is a nonlinear module, theta is a key correlation module, and PIL and Pi2 are shift operation modules, where Theta, Pil, and Pi2 are diffusion layer functions.


#### 3.4.2. Design and Implementation of RSA Algorithm

The security of RSA algorithm mainly depends on integer factorization. The implementation of RSA algorithm mainly includes three parts: key generation, hospital financial data encryption, and hospital financial data decryption. The following is the implementation process of RSA algorithm:void rsa init(rsa_ context∗ctx, int padding, inthash_ id);//Generate key_ _ _int rsa_ gen_ key(rsa_ context∗ctx, int (void∗),void∗p_ mg,intnbits, int exponent);intrsa_ public(rsa_ context∗ ctx, const (unsigned char ∗ input, unsigned char ∗ output) “public key operation.intrsa_ private(rsa_ context∗ ctx, const (unsigned char ∗ input, unsigned char ∗ output) “private key operation.Because the two large prime numbers selected by RSA algorithm are close to 2048 bits, a large number of large number addition, subtraction, multiplication, division, modulus, and modulus inverse operations need to be performed. This makes the operation efficiency of RSA very low compared with other symmetric cryptographic algorithms, which is also the reason why the system chooses RSA algorithm to exchange Noekeon keys.


#### 3.4.3. Interface Design

In order to realize the safe storage of files and the safe transmission between networks, the system selects visual studio 2012 programming software in Windows. On the operating system, the hospital financial data encryption transmission system is programmed. The main interface of the hospital financial data encryption transmission system is shown in Figure6. Users can complete the encryption, decryption, digital signature, plaintext, and ciphertext saving path setting of hospital financial data through the main interface.Figure 6
Main interface of the communication system.


## 3.1. RSA Algorithm Principle

RSA algorithm is mainly used for further encryption of Noekeon key, and its security level is largely determined by the decomposition level of integer factor. In terms of the structure of design and implementation, RSA algorithm mainly includes three links: key generation, information encryption, and information decryption. RSA algorithm requires a large number of primes, which are all in 2048-bit level [9]. Therefore, when using RSA algorithm for information encryption, a large number of complex large numerical operations must be carried out. In this way, although RSA algorithm can effectively improve the security of hospital financial data information, its operation efficiency is inevitably at a lower level compared with other encryption algorithms. Therefore, the hospital financial data encryption transmission system should still be based on Noekeon algorithm, and only RSA algorithm is used for the encryption of Noekeon key.In order to improve the efficiency and security of hospital financial data encryption, a hybrid encryption method of hospital financial data based on Noekeon algorithm is proposed. This paper analyzes the operation principle of RSA algorithm, parameter selection, and prime judgment, puts forward an improved RSA algorithm, and discusses the key technologies in the improvement process. Considering that RSA algorithm has strong security, but the encryption speed needs to be improved, DES algorithm is introduced to form a hybrid algorithm for homomorphic encryption of private hospital financial data sets. During the operation of the hybrid algorithm, the plaintext hospital financial data set is encrypted by DES algorithm, and the key used by DES algorithm is encrypted by RSA. The packed ciphertext and the encrypted key are transmitted to the receiving end. After the receiving end obtains the hospital financial data packet, the key ciphertext is decrypted to obtain the key encrypted by DES algorithm. Because the encryption and decryption keys of DES algorithm are the same, the ciphertext decryption can be realized after obtaining the key. The experimental results show that this method has the advantages of short encryption time, strong security performance, and wide application range compared with the improved RSA algorithm. According to the experimental results, this method has strong reliability and can provide support for the security protection of private hospital financial data.


## 3.2. RSA Algorithm and Its Improved Algorithm

### 3.2.1. RSA Algorithm

The principle of using RSA algorithm to encrypt hospital financial data is simpler than symmetrical encryption algorithm. The calculation used for encryption and decryption is modular power multiplication [10]. Here, it is assumed that P is plaintext and C is ciphertext. Then the sender can use C=Pemodn to encrypt plaintext and the receiver can use P=Cdmodn to decrypt. e represents the public key, d represents the key, and n represents a very large integer. The detailed process is shown in Figure 4.Figure 4
Schematic diagram of the RSA algorithm encryption and decryption and key generation.The encryption and decryption process of RSA algorithm is as follows:Step 1: select two large prime numbersp, q, and p≠q, n=p×q, ϕn=p−1×q−1Step 2: select primee1<e<ϕn, where e and ϕn are mutually primeStep 3: takee,n as the public key and encrypt the plaintext according to formula C=PemodnStep 4: calculate the private keyd=e−1modϕn; decrypt the ciphertext according to P=CdmodnIn the above steps,e and n are public and everyone can know, but ϕn is the key and needs to be kept confidential. When ϕn is obtained, the security of the RRSA algorithm will be greatly weakened. The security of RSA algorithm is directly related to the length of p and q. The longer the length, the higher the security. Therefore, the length of p and q in practical application is at least 512 bits.


### 3.2.2. Parameter Selection

RSA algorithm is the first encryption algorithm that relies on factor decomposition for system security. It can be predicted that ifn can be decomposed very easily, the RSA algorithm is no longer secure. In conclusion, it can be considered that RSA security and factor decomposition are equivalent. This means that the selection of public key n is very important in the running process of RSA algorithm. The following are the selection principles of parameters n, e, and d.(1) ParameternSelection. In this process, the n value should be large enough, which is the most fundamental principle to ensure the security performance of RSA algorithm. It must be ensured that the decomposition n cannot be carried out in calculation. For the purpose of ensuring the security of the algorithm, the length of the generated large prime number should be at least a decimal number above 100 bits, and the n can be more than 200 bits [11].Under the above constraints,n=p×q, p and q are preferably strong prime numbers. Among them, strong prime numbers can be defined as follows:Condition 1: there are large prime numbersp1 and p2, which can make p1|p−1 and p2|p+1Condition 2: there are large prime numbersr1, r2, s1, and s2, which can make r1|p1−1, s1|p1+1, r2|p2−1, and s2|p2+1Finally, the difference betweenp and q should be large, and the maximum common factor of p−1 and q−1 should be small enough. Assuming that the difference between p and q is very small, p+q/2≈n can be established. Since the basic mathematical principle p+q/22−n=p+q/22 is established, the values of p and q can be calculated by substituting the values of the above formula into the following formula.(2) ParametereSelection. During the operation of RSA algorithm, e only needs to meet gcde,ϕn=1, which means that e can be selected randomly. According to the basic principle of encryption, the smaller the e value, the smaller the encryption time. Therefore, relevant scholars suggest that the smaller e, the better. However, practice shows that decimal e can trigger security problems. To sum up, in actual operation, the conditions to be followed for parameter e selection are as follows:Condition 1:e cannot be too small. Considering the efficiency and security of hospital financial data encryption, it is best to select a prime number with a length of 16Condition 2: in the process of selecting parametere, the module with the largest order ϕn should be selected; that is, the smallest i in ei=1modϕn should be p−1q−1/2(3) ParameterdSelection. d as the key should be greater than n1/4. In practical application, it is hoped to improve the decryption or signature efficiency according to the small number d. When e is determined, d can be obtained based on Euclidean algorithm. In conclusion, assuming that the length of d is less than n1/4, the parameter d can be obtained efficiently only by mathematical algorithm.


### 3.2.3. Prime Judgment

In the running process of RSA algorithm, arbitrarily generating large prime numbers is a necessary operation. Because thep and q digits can determine the security of RSA algorithm, it is a difficult problem to quickly solve the problem of large prime generation.Prime number determination is done using improved Miller Rabin algorithm [12]. In the process, considering that arbitrarily generated large integers are time-consuming in prime judgment, it is necessary to filter out some relatively significant composite numbers before transmitting large integers to the degree of prime judgment [13, 14]. The even number and the number with 5 as the mantissa are excluded first, then divide the decimal by the large number, select 53 small prime numbers, and divide the large integer. The detailed process is as follows:Step 1: arbitrarily generate a large integernStep 2: select a group of prime arrays with a length of 53 from 2 and record the array asaiStep 3:i=0Step 4: wheni<53, calculate y=nmodaiStep 5: ify=0 is assumed, it means that it can be divisible and is not a prime number. On the contrary, if i=i++, go to Step 4According to the improved Miller Rabin algorithm, the primality judgment is carried out for the values after the above processing. The improved prime judgment algorithm is to improve the modular power operation in Miller Rabin algorithm according to Montgomery's fast modular power method.The expression of Montgomery method is(1)MonproA,B,N=ABR−1modN,where R represents the power based on 2 and when R is 2k, N needs to meet 2k−1≤N<2k and gcdR,N=1.


### 3.2.4. Improved RSA algorithm

RSA algorithm has significant advantages and disadvantages. The advantages are high security performance and the disadvantages are low encryption efficiency. The time-consuming operations in the running process of RSA algorithm are generation and determination of large prime numbers and modular power calculationce′modn. The prime judgment has been analyzed above, and the fast calculation of modular power is discussed below.For the fast calculation ofce′modn, the sliding window method is adopted and used in RSA algorithm.The principle of sliding window method is to modularize the indexe′ in ce′modn. For example, e′=1545485511510=0011100110010010111001011111110010112, if the length of the setting window is 3, the above binary numbers are grouped from the left, and the length of the grouping is 3 bits. The grouping principle is to ensure that the first bit of each group is 1, so part of 0 may be skipped in the middle. At the end, when the length is smaller than 3 digits, the remaining numbers form a group separately without 0 or 1 [15].After grouping, the ways of grouping to improve the efficiency of modular exponentiation operation are analyzed. Takea10112 as an example: a10112=a11=a10a=a1012×2a. Thus, the expression of e′ can be deduced:(2)e′=7×231+6×226+4×222+5×219+6×216+5×212+7×29+7×26+5×21+20.Simplifye′ and substitute the simplified e′ into ce′modn; then,(3)ce′modn=c7×25+6×24+423+5×23+6×24+5×23+7×23+7×25+5×21+1modn.According to the above calculation and analysis, the essence of the operation of the sliding window method is to preprocess the index, so as to reduce the amount of calculation.


## 3.2.1. RSA Algorithm

The principle of using RSA algorithm to encrypt hospital financial data is simpler than symmetrical encryption algorithm. The calculation used for encryption and decryption is modular power multiplication [10]. Here, it is assumed that P is plaintext and C is ciphertext. Then the sender can use C=Pemodn to encrypt plaintext and the receiver can use P=Cdmodn to decrypt. e represents the public key, d represents the key, and n represents a very large integer. The detailed process is shown in Figure 4.Figure 4
Schematic diagram of the RSA algorithm encryption and decryption and key generation.The encryption and decryption process of RSA algorithm is as follows:Step 1: select two large prime numbersp, q, and p≠q, n=p×q, ϕn=p−1×q−1Step 2: select primee1<e<ϕn, where e and ϕn are mutually primeStep 3: takee,n as the public key and encrypt the plaintext according to formula C=PemodnStep 4: calculate the private keyd=e−1modϕn; decrypt the ciphertext according to P=CdmodnIn the above steps,e and n are public and everyone can know, but ϕn is the key and needs to be kept confidential. When ϕn is obtained, the security of the RRSA algorithm will be greatly weakened. The security of RSA algorithm is directly related to the length of p and q. The longer the length, the higher the security. Therefore, the length of p and q in practical application is at least 512 bits.


## 3.2.2. Parameter Selection

RSA algorithm is the first encryption algorithm that relies on factor decomposition for system security. It can be predicted that ifn can be decomposed very easily, the RSA algorithm is no longer secure. In conclusion, it can be considered that RSA security and factor decomposition are equivalent. This means that the selection of public key n is very important in the running process of RSA algorithm. The following are the selection principles of parameters n, e, and d.(1) ParameternSelection. In this process, the n value should be large enough, which is the most fundamental principle to ensure the security performance of RSA algorithm. It must be ensured that the decomposition n cannot be carried out in calculation. For the purpose of ensuring the security of the algorithm, the length of the generated large prime number should be at least a decimal number above 100 bits, and the n can be more than 200 bits [11].Under the above constraints,n=p×q, p and q are preferably strong prime numbers. Among them, strong prime numbers can be defined as follows:Condition 1: there are large prime numbersp1 and p2, which can make p1|p−1 and p2|p+1Condition 2: there are large prime numbersr1, r2, s1, and s2, which can make r1|p1−1, s1|p1+1, r2|p2−1, and s2|p2+1Finally, the difference betweenp and q should be large, and the maximum common factor of p−1 and q−1 should be small enough. Assuming that the difference between p and q is very small, p+q/2≈n can be established. Since the basic mathematical principle p+q/22−n=p+q/22 is established, the values of p and q can be calculated by substituting the values of the above formula into the following formula.(2) ParametereSelection. During the operation of RSA algorithm, e only needs to meet gcde,ϕn=1, which means that e can be selected randomly. According to the basic principle of encryption, the smaller the e value, the smaller the encryption time. Therefore, relevant scholars suggest that the smaller e, the better. However, practice shows that decimal e can trigger security problems. To sum up, in actual operation, the conditions to be followed for parameter e selection are as follows:Condition 1:e cannot be too small. Considering the efficiency and security of hospital financial data encryption, it is best to select a prime number with a length of 16Condition 2: in the process of selecting parametere, the module with the largest order ϕn should be selected; that is, the smallest i in ei=1modϕn should be p−1q−1/2(3) ParameterdSelection. d as the key should be greater than n1/4. In practical application, it is hoped to improve the decryption or signature efficiency according to the small number d. When e is determined, d can be obtained based on Euclidean algorithm. In conclusion, assuming that the length of d is less than n1/4, the parameter d can be obtained efficiently only by mathematical algorithm.


## 3.2.3. Prime Judgment

In the running process of RSA algorithm, arbitrarily generating large prime numbers is a necessary operation. Because thep and q digits can determine the security of RSA algorithm, it is a difficult problem to quickly solve the problem of large prime generation.Prime number determination is done using improved Miller Rabin algorithm [12]. In the process, considering that arbitrarily generated large integers are time-consuming in prime judgment, it is necessary to filter out some relatively significant composite numbers before transmitting large integers to the degree of prime judgment [13, 14]. The even number and the number with 5 as the mantissa are excluded first, then divide the decimal by the large number, select 53 small prime numbers, and divide the large integer. The detailed process is as follows:Step 1: arbitrarily generate a large integernStep 2: select a group of prime arrays with a length of 53 from 2 and record the array asaiStep 3:i=0Step 4: wheni<53, calculate y=nmodaiStep 5: ify=0 is assumed, it means that it can be divisible and is not a prime number. On the contrary, if i=i++, go to Step 4According to the improved Miller Rabin algorithm, the primality judgment is carried out for the values after the above processing. The improved prime judgment algorithm is to improve the modular power operation in Miller Rabin algorithm according to Montgomery's fast modular power method.The expression of Montgomery method is(1)MonproA,B,N=ABR−1modN,where R represents the power based on 2 and when R is 2k, N needs to meet 2k−1≤N<2k and gcdR,N=1.


## 3.2.4. Improved RSA algorithm

RSA algorithm has significant advantages and disadvantages. The advantages are high security performance and the disadvantages are low encryption efficiency. The time-consuming operations in the running process of RSA algorithm are generation and determination of large prime numbers and modular power calculationce′modn. The prime judgment has been analyzed above, and the fast calculation of modular power is discussed below.For the fast calculation ofce′modn, the sliding window method is adopted and used in RSA algorithm.The principle of sliding window method is to modularize the indexe′ in ce′modn. For example, e′=1545485511510=0011100110010010111001011111110010112, if the length of the setting window is 3, the above binary numbers are grouped from the left, and the length of the grouping is 3 bits. The grouping principle is to ensure that the first bit of each group is 1, so part of 0 may be skipped in the middle. At the end, when the length is smaller than 3 digits, the remaining numbers form a group separately without 0 or 1 [15].After grouping, the ways of grouping to improve the efficiency of modular exponentiation operation are analyzed. Takea10112 as an example: a10112=a11=a10a=a1012×2a. Thus, the expression of e′ can be deduced:(2)e′=7×231+6×226+4×222+5×219+6×216+5×212+7×29+7×26+5×21+20.Simplifye′ and substitute the simplified e′ into ce′modn; then,(3)ce′modn=c7×25+6×24+423+5×23+6×24+5×23+7×23+7×25+5×21+1modn.According to the above calculation and analysis, the essence of the operation of the sliding window method is to preprocess the index, so as to reduce the amount of calculation.


## 3.3. Implementation of Homomorphic Encryption of the Private Hospital Financial Data Set

Considering that RSA algorithm has strong security, but the encryption speed needs to be improved, DES algorithm is introduced. The encryption speed of this algorithm is fast, but there are some problems in key management. The combination of the two algorithms can effectively complement each other.The key used in the operation of DES algorithm is based on 56 bits, of which 8 bits are parity bits. The encryption operation is implemented for 64-bit plaintext, and 16 rounds of encoding operation are implemented for 64-bit plaintext. In each round of encoding, each 48-bit key value is obtained according to the 56-bit complete key.Assume that plaintextm′ and key k′ are 64-bit 0 and 1 strings. Key MEY is only 56-bit valid, and k8′, k16′, k24′, k32′, k40′, k48′, k56′, and k64′ are parity bits, which will not affect encryption. Suppose KEY=K1′K2′⋯K64′MING=M1′M2′⋯M64′, mi′ and ki′ are 0 or 1, i=1,2,⋯,64.According to the above settings, the encryption process is defined as follows:(4)FDESMING=P′−1×T16×T15×⋯×T1×P′MING.Step 1:P′ represents the initial transformation, P′−1 represents the inverse transformation of P′, and both meet IP′×IP′−1=1Step 2: DES iterationStep 3: in the subkey generation process, the original key is reordered and divided into two parts, and then the two parts of the subkey are obtained through cyclic shift. Finally, the subkey is synthesized and reordered to form the subkeyThe decryption process of the encryption algorithm is similar to the encryption steps. 16 rounds of iteration can be reversed from the key sequence.Based on the above contents, the homomorphic encryption of private hospital financial data set is realized by using hybrid algorithm. Figure5 shows the principle of hybrid algorithm.Figure 5
Principles of the hybrid algorithm.During the operation of the hybrid algorithm, the plaintext hospital financial data set is encrypted by DES algorithm, and the key used by DES algorithm is encrypted by RSA. The packed ciphertext and the encrypted key are transmitted to the receiving end. After the receiving end obtains the hospital financial data packet, the key ciphertext is decrypted to obtain the key encrypted by DES algorithm. Considering that the encryption key of DES algorithm is the same as that of decryption, ciphertext decryption can be realized after obtaining the key.The mixed algorithm is implemented on the VC + + platform. Because there are many outputs involved, the MFC interface is written to realize the real-time display of state. The test file used in the implementation is. TXT file. The file encryption is realized according to DES algorithm, RSA encryption is implemented for DES algorithm key, and the encryption results are displayed by MFC interface. Here, the values ofp and q of RSA algorithm are defined as 512 bits. The time consumed in the encryption process, including the key generation time of RSA algorithm, is displayed in real time on the interface. In the process of decryption, the DES algorithm key must be obtained first. Thus, in the decryption operation, first decrypt the des key encrypted by RSA and output the result, and then decrypt the file according to the key.


## 3.4. Design of Hybrid Encryption Interface for Hospital Financial Data Based on Noekeon Algorithm

Based on the above analysis, the hybrid encryption interface of hospital financial data based on Noekeon algorithm is designed.


### 3.4.1. Design Principle of Hybrid Encryption Interface

Firstly, three information bar modules that can be filled in “user key”, “file opening path”, and “file saving path” should be set in the main area of Noekeon encryption system interface as the operation basis of information processing and storage. Then, the two path modules should be connected with the storage disk of the computer system and the hospital financial database, and the “Browse” button should be set to facilitate users to freely select the extraction area and storage area of information. Finally, three keys of “encryption”, “decryption”, and “digital signature” should be set under the key information bar, and Noekeon algorithm and RSA algorithm should be set into the trigger module of the corresponding key.In this way, users can encrypt, decrypt, and sign files or hospital financial data by operating the main interface of the hospital financial data encryption and transmission system. In addition, in order to ensure the aesthetics and practicability of the system interface, it is also necessary to design the compatibility of the layout, frame, and other appearance structures of the system interface, so as to ensure that system users such as windows 7 and MacOS can complete the interface operation quickly and accurately.Noekeon algorithm has the characteristics of high encryption strength, fast speed, easy standardization, and easy software and hardware implementation. The main implementation functions of Noekeon algorithm are as follows:Noekeon_ Encrypt(Key,State); 〃 Encryption function.Noekeon_ Decrypt(Key,State); 〃 Decryption function.Round(Key, State, Round_ ctl, Round_ ct2);//Wheel function Gamma(State);//Gamma function module.Theta(Key,State);//Theta function module.Pil(State); 〃 Shift operation module Pil.Pi2(State);//Shift operation module Pi2.In the above function, Key represents round key, State represents 128-bit intermediate variable, and Round_ct is the round constant, which is taken from the following hexadecimal numbers 80, 1B, 36, 6C, D8, AB, 4D, 9A, 2F, 5E, BC, 63, C6, 97, 35, 6A, and D4. It is selected one by one from left to right during encryption and from right to left during decryption. Gamma is a nonlinear module, theta is a key correlation module, and PIL and Pi2 are shift operation modules, where Theta, Pil, and Pi2 are diffusion layer functions.


### 3.4.2. Design and Implementation of RSA Algorithm

The security of RSA algorithm mainly depends on integer factorization. The implementation of RSA algorithm mainly includes three parts: key generation, hospital financial data encryption, and hospital financial data decryption. The following is the implementation process of RSA algorithm:void rsa init(rsa_ context∗ctx, int padding, inthash_ id);//Generate key_ _ _int rsa_ gen_ key(rsa_ context∗ctx, int (void∗),void∗p_ mg,intnbits, int exponent);intrsa_ public(rsa_ context∗ ctx, const (unsigned char ∗ input, unsigned char ∗ output) “public key operation.intrsa_ private(rsa_ context∗ ctx, const (unsigned char ∗ input, unsigned char ∗ output) “private key operation.Because the two large prime numbers selected by RSA algorithm are close to 2048 bits, a large number of large number addition, subtraction, multiplication, division, modulus, and modulus inverse operations need to be performed. This makes the operation efficiency of RSA very low compared with other symmetric cryptographic algorithms, which is also the reason why the system chooses RSA algorithm to exchange Noekeon keys.


### 3.4.3. Interface Design

In order to realize the safe storage of files and the safe transmission between networks, the system selects visual studio 2012 programming software in Windows. On the operating system, the hospital financial data encryption transmission system is programmed. The main interface of the hospital financial data encryption transmission system is shown in Figure6. Users can complete the encryption, decryption, digital signature, plaintext, and ciphertext saving path setting of hospital financial data through the main interface.Figure 6
Main interface of the communication system.


## 3.4.1. Design Principle of Hybrid Encryption Interface

Firstly, three information bar modules that can be filled in “user key”, “file opening path”, and “file saving path” should be set in the main area of Noekeon encryption system interface as the operation basis of information processing and storage. Then, the two path modules should be connected with the storage disk of the computer system and the hospital financial database, and the “Browse” button should be set to facilitate users to freely select the extraction area and storage area of information. Finally, three keys of “encryption”, “decryption”, and “digital signature” should be set under the key information bar, and Noekeon algorithm and RSA algorithm should be set into the trigger module of the corresponding key.In this way, users can encrypt, decrypt, and sign files or hospital financial data by operating the main interface of the hospital financial data encryption and transmission system. In addition, in order to ensure the aesthetics and practicability of the system interface, it is also necessary to design the compatibility of the layout, frame, and other appearance structures of the system interface, so as to ensure that system users such as windows 7 and MacOS can complete the interface operation quickly and accurately.Noekeon algorithm has the characteristics of high encryption strength, fast speed, easy standardization, and easy software and hardware implementation. The main implementation functions of Noekeon algorithm are as follows:Noekeon_ Encrypt(Key,State); 〃 Encryption function.Noekeon_ Decrypt(Key,State); 〃 Decryption function.Round(Key, State, Round_ ctl, Round_ ct2);//Wheel function Gamma(State);//Gamma function module.Theta(Key,State);//Theta function module.Pil(State); 〃 Shift operation module Pil.Pi2(State);//Shift operation module Pi2.In the above function, Key represents round key, State represents 128-bit intermediate variable, and Round_ct is the round constant, which is taken from the following hexadecimal numbers 80, 1B, 36, 6C, D8, AB, 4D, 9A, 2F, 5E, BC, 63, C6, 97, 35, 6A, and D4. It is selected one by one from left to right during encryption and from right to left during decryption. Gamma is a nonlinear module, theta is a key correlation module, and PIL and Pi2 are shift operation modules, where Theta, Pil, and Pi2 are diffusion layer functions.


## 3.4.2. Design and Implementation of RSA Algorithm

The security of RSA algorithm mainly depends on integer factorization. The implementation of RSA algorithm mainly includes three parts: key generation, hospital financial data encryption, and hospital financial data decryption. The following is the implementation process of RSA algorithm:void rsa init(rsa_ context∗ctx, int padding, inthash_ id);//Generate key_ _ _int rsa_ gen_ key(rsa_ context∗ctx, int (void∗),void∗p_ mg,intnbits, int exponent);intrsa_ public(rsa_ context∗ ctx, const (unsigned char ∗ input, unsigned char ∗ output) “public key operation.intrsa_ private(rsa_ context∗ ctx, const (unsigned char ∗ input, unsigned char ∗ output) “private key operation.Because the two large prime numbers selected by RSA algorithm are close to 2048 bits, a large number of large number addition, subtraction, multiplication, division, modulus, and modulus inverse operations need to be performed. This makes the operation efficiency of RSA very low compared with other symmetric cryptographic algorithms, which is also the reason why the system chooses RSA algorithm to exchange Noekeon keys.


## 3.4.3. Interface Design

In order to realize the safe storage of files and the safe transmission between networks, the system selects visual studio 2012 programming software in Windows. On the operating system, the hospital financial data encryption transmission system is programmed. The main interface of the hospital financial data encryption transmission system is shown in Figure6. Users can complete the encryption, decryption, digital signature, plaintext, and ciphertext saving path setting of hospital financial data through the main interface.Figure 6
Main interface of the communication system.


## 4. Experimental Results and Analysis

In order to verify the effectiveness of the hybrid encryption method of hospital financial data based on Noekeon algorithm, a correlation test was carried out. The experimental platform is built on VC + +. The financial data of the experimental hospital is a. Doc text file with the size of 1 MB. The experimental operation process is described above. The experimental results are shown in Figure7.Figure 7
Time consumption for the addition and decryption of hospital financial data.According to the analysis of Figure7, the hybrid encryption method of hospital financial data based on Noekeon algorithm takes less time and is more efficient than RSA algorithm.Figure8 shows the success rate of resisting attacks in different research results.Figure 8
Comparison of hospital financial data encryption and security.As can be seen from Figure8, compared with the single algorithm, the hybrid algorithm has a higher success rate in resisting attacks and can better ensure the security of hospital financial data. Table 2 shows the overall performance of different hospital financial data encryption methods, so as to show which aspects of the performance of various hospital financial data encryption methods are more superior.Table 2
Performance comparison of various financial data encryption methods in hospitals.
Performance indexComparison resultsEncryption efficiencyDES algorithm ≈ hybrid algorithm > RSA algorithmSafety performanceHybrid algorithm > RSA algorithm > DES algorithmKey generation and controlHybrid algorithm > DES algorithm ≈ RSA algorithmImplementation and applicationCompared with other algorithms, the hybrid algorithm has a wider application range and environmentAccording to Table2, compared with other encryption algorithms, the hybrid algorithm has better comprehensive performance, makes up for the defects of DES algorithm and RSA algorithm, and not only improves the encryption efficiency of hospital financial data, but also enhances the security of hospital financial data.


## 5. Conclusion

Since the end of the 20th century, with the rapid development of computer and communication technology, computer network has been more and more widely used in public life and work. With the progress of science and technology, the public is entering an information age, in which the security of information becomes more and more important. A hybrid encryption method for hospital financial data based on Noekeon algorithm is proposed. In the process, firstly, RSA algorithm and improved algorithm are analyzed, and then combined with improved algorithm and DES algorithm, private hospital financial data encryption is realized efficiently. Experimental results show that this method has strong encryption performance, higher efficiency, and stronger practicability than the improved encryption method. With the increasing development of computer network, private hospital financial data intrusion technology is also constantly improving. At this time, the hospital financial data encryption method will be more challenged. In the next research, we should constantly improve the encryption algorithm and combine it with the hardware system to lay a more solid foundation for ensuring the security of hospital financial data.The hospital financial data encryption transmission system designed in this paper adopts the hybrid encryption system and realizes the encryption and decryption of hospital financial data by using the characteristics of fast encryption speed, high encryption intensity, and efficient encryption and decryption of a large amount of hospital financial data. Using public key cryptography algorithm, the encryption strength is high, the key is easy to manage, and the encryption and decryption of plaintext key are realized. The two are combined to ensure the security of hospital financial data storage and transmission. In short, based on the advantages and disadvantages of different encryption methods, the hospital financial data encryption transmission system under Noekeon algorithm should focus on the information processing mode of hybrid encryption, so as to improve the application security of Noekeon algorithm, avoid the inefficient impact of RSA algorithm, and realize the rapid and secure transmission and storage of files, hospital financial data, and other information.



---

*Source: 7578752-2021-10-19.xml*