1. execution time of AES (des upgraded version) (symmetric encryption)
[1] Test Data
Here, the string is encrypted by reading a plain text file, one line and one line, and the encrypted content is stored in another file to calculate the file encryption time. After the file is encrypted, the encrypted content is also read and decrypted in one row, and the decrypted file is stored in the decrypted file.
Note: When testing large files, you need to add the configuration (-xmx1535m-xms1536m) to the virtual machine to set the memory size.
|
Serial number |
Original file size (M) |
Encrypted File size (M) |
During encryption (Seconds) |
When decryption (Seconds) |
|
1 |
1.639 |
3.335 |
0 |
0 |
|
2 |
3.278 |
6.669 |
0 |
1 |
|
3 |
6.556 |
13.338 |
1 |
2 |
|
4 |
13.111 |
26.676 |
3 |
5 |
|
5 |
26.226 |
53.351 |
6 |
11 |
|
6 |
52.441 |
106.701 |
12 |
23 |
|
7 |
104.882 |
213.401 |
23 |
Memory overflow (needs to be adjusted to parse by byte) |
|
8 |
209.763 |
426.801 |
47 |
Memory overflow (needs to be adjusted to parse by byte) |
|
9 |
839.051 |
1707.204 |
203 |
Memory overflow (needs to be adjusted to parse by byte) |
|
10 |
1048.813 |
2134.005 |
255 |
Memory overflow (needs to be adjusted to parse by byte) |
[2] Conclusion
1) The time for AES encryption is increasing linearly with the size of the encrypted file. It takes about four minutes to encrypt 1 GB of files. The encryption speed is still very fast.
2) The encrypted file size is twice the size of the original file.
3) The time required to decrypt the file is twice the encryption time (this should be because the encrypted file is twice the size of the original file)
Ii. RSA (asymmetric encryption) execution time
[1] Test Data
Here, we use the read text content and RSA encryption for the content. The encrypted content is stored in a file and then decrypted Based on the RSA private key. The test time is as follows:
Note: When testing large files, you need to add the configuration (-xmx1535m-xms1536m) to the virtual machine to set the memory size.
|
Serial number |
Original file size (KB) |
Encrypted File size (KB) |
During encryption (Seconds) |
When decryption (Seconds) |
|
1 |
6 |
6 |
0 |
1 |
|
2 |
12 |
12 |
0 |
3 |
|
3 |
24 |
24 |
0 |
5 |
|
4 |
45 |
45 |
0 |
10 |
|
5 |
90 |
90 |
1 |
21 |
|
6 |
180 |
180 |
2 |
40 |
|
7 |
360 |
360 |
2 |
98 |
|
8 |
720 |
721 |
2 |
165 |
|
9 |
1440 |
1440 |
5 |
325 |
[2] Conclusion
1) RSA EncryptionAlgorithmEncryption takes a short time, which is negligible. However, when the RSA is decrypted, the decryption time and the size of the decrypted file are linearly increasing. It takes about five seconds to encrypt a 1 M file, but it takes four minutes to decrypt the file.
2) The size of the encrypted file is basically the same as that of the original file.
3) The decryption efficiency is far lower than the encryption efficiency. According to this time, it takes 1 minute to encrypt 1g files, but 65 hours to decrypt the files.