## 2 Preliminary Knowledge
### Advanced Encryption Standard (AES) Encryption Algorithm
[PERSON] proposed a privacy-preserving cloud-aided diagnostic scheme for IoMT based on two non-collusive servers. By using a hybrid data encryption method based on homomorphic encryption and AES to efficiently generate user requests, the final security analysis and evaluation further showed that the author's scheme was superior to previous work in terms of security and user friendliness [23]. [PERSON] proposed a variational subattack algorithm (VQAA) suitable for classical Advanced Encryption Standard (AES) class symmetric cryptography. That paper studied the relationship between entanglement entropy, concurrency and cost function, and showed that entanglement plays a crucial role in acceleration [24]. [PERSON] proposed a federated learning secure transmission scheme combining the AES, DES, and RSA encryption algorithms and blockchain checksum mechanism. Experiments showed that its detection rate in attack detection reached 81% [25]. These studies were based on AES encryption algorithms to cope with the security challenges that arise in different models, illustrating the strong performance of AES in data protection. The following is the exact implementation of AES encryption:  
Step 1: First, choose a suitable length of key as the initial key \(k_{0}\), this key is the key for encryption and decryption. After that, generate a set of round keys \(\{K_{0},K_{1},K_{2},K_{Nr}\}\) based on the initial key \(k_{0}\) and the round key generation function \(R()\), where \(Nr\) is the number of rounds. Step 2: Generate the initial round key \(K_{0}\) and the plaintext \(P\) by a byte by byte dissimilarity operation and obtain the initial ciphertext \(C\):  
\[C=P\oplus K_{0} \tag{1}\]  
Step 3: The plaintext \(P\) is populated into the state matrix by column priority, and then perform \(Nr\) encryption operations, where the result of each round of encryption is used as the input for the next round of encryption until the final round of encryption is reached, where each round of encryption consists of four steps:  
1. Byte substitution via S-box replaces each byte in the state matrix with the corresponding value in the S-box:  
\[S(P)=\big{\{}s(p_{i,j})\bigm{|}p_{i,j}\in P\big{\}} \tag{2}\]  
2. Perform a cyclic left shift for each row in the state matrix, leaving the first row unchanged, the second row shifted left by one byte, the third row shifted left by two bytes, and the fourth row shifted left by three bytes:  
\[S(S(P))=\big{\{}s(p_{i,j})\bigm{|}p_{i,j}\in P\big{\}} \tag{3}\]  
3. Perform a linear transformation on each column in the state matrix to confuse the data in the columns by a fixed matrix multiplication:  
\[M(S(S(P)))=\big{\{}m(s(p_{i,j}))\bigm{|}p_{i,j}\in P\big{\}} \tag{4}\]  
4. Perform a byte-by-byte dissimilarity operation between the current round's round key and the state matrix to obfuscate the data in the state matrix:  
\[A(M(S(P)))=\big{\{}a(m(s(p_{i,j})))\bigm{|}p_{i,j}\in P\big{\}} \tag{5}\]  
5. However, in the last round of encryption, the column obfuscation step is omitted and the byte substitution, cyclic left shift and round key addition are still performed. Step 4: After several rounds of encryption, the encrypted ciphertext can be obtained:  
\[C=A(M(S(S(P)))) \tag{6}\]