## 4 Encryption Process
### Ciphertext Splitting
#### 4.3.3 Take Out the Two MD5 Values  
After the ciphertext FinalSTR extracts the sharing code and the length of the sharing code, only the combination of the encrypted data SplitSTR and two MD5 values (N and M) remains in FinalSTR, as shown in Figure 6.  
The length of the data sequence FinalSTR after the sharing code has been extracted is calculated and noted as MNLength. Then, the following specific formula is generated to discern whether the encrypted data SplitSTR can meet the interval insertion MD5 value.  
\[d1=length(M) \tag{1}\]  
Figure 4: \(nums>K\) sharing code extraction format.  
Figure 5: \(nums\leq K\) sharing code extraction format.  
Figure 6: Schematic diagram of the ciphertext format after extracting the sharing code.  
\[d2=length(N) \tag{2}\]  
The shortest plaintext message length that can satisfy the full interval insertion is  
\[minLength=length(d1+d2)/2+1 \tag{3}\]  
For FinalSTR, only SplitSTR and the minimum length of the combination of two MD5 values (N and M) is  
\[minInsertLength=minLength+d1+d2 \tag{4}\]  
Since the MD5 values are taken in 16-bit lowercase, the final result of the above formula is \(minInsertLength=49\).  
If \(MNLength<minInsertLength\), the encrypted data SplitSTR is not able to insert the complete combination of two MD5 values at intervals and restore the original data in the following way.  
Extracting the MD5 value N of the original data D.  
The extraction starts from the first bit of FinalSTR after the sharing code is extracted. The extraction interval is 2 bits, and the extraction times are \(49-MNLength\). The extracted partial MD5 value is defined as leftN. After extraction, the extraction starts from the position of the two bits after the last extraction position interval. In this stage of the extraction process, the extraction interval is 1 bit until the extraction reaches the end of the data sequence FinalSTR. The partial MD5 value of the original data N is defined as rightN. The sequential combination of leftN and rightN is defined as tmpN, and the subsequent judgment is whether the data are changed, i.e., whether they are the MD5 value N of the original data of D. The operation flow is shown in Figure 7.  
Extract the MD5 value M of a garbled encrypted data string.  
The extraction starts from the 2 nd bit of FinalSTR, where the extraction interval is 2 bits, the extraction count is \(49-MNLength\), and the component MD5 value is defined as leftM. After the extraction count is finished, the extraction starts from the position of one bit after the last extraction position interval. Additionally, the extraction interval is one bit in this stage of the extraction process until the extraction reaches the end of the data sequence FinalSTR to acquire part of the MD5 value as rightM. The sequential combination of leftM and rightM is defined as tmpM. The operation flow is shown in Figure 8.  
Figure 8: MD5 value extraction format for \(MNLength<minInsertLength\) plaintext message.  
Figure 7: MD5 value extraction format for \(MNLength<minInsertLength\) plaintext message.  
If \(MNLength\geq minInsertLength\), the original data D can be spaced to insert the complete combination of two MD5 values and restore the original data as follows.  
Take the MD5 value N of the original data D.  
As shown in Figure 9, the extraction starts from the first bit of the data sequence FinalSTR, where the extraction interval is 2 bits, the number of extractions is 16, and the final extraction result is the MD5 value of the original data N, defined as tmpN.  
The remaining data sequence FinalSTR is defined as SplitS, i.e., the data after chunking disorder, and the receiving end cooperates with the parsed sharing code FinalKey to restore the original data by decryption algorithm.