Asymmetric Key Algorithm VPN
Summary:Generation and maintenance of asymmetric keysBefore using asymmetric key technology, all participants, whether users or network devices such as router…
This book is available as an e-book in EPUB format
PayPal sponsors this website for any amount. I will send you an EPUB e-book via email. Please send me an email
Email: shuxueha@outlook.com
PayPal: https://paypal.me/zhipinglei
You can also scan the PayPal QR code below to sponsor
You can also purchase this book on Amazon: click to enter the Amazon official website
Generation and maintenance of asymmetric keys
Before using asymmetric key technology, all participants, whether users or network devices such as routers, need to use asymmetric key algorithms (such as RSA) in advance to generate a pair of keys, including a public key and a private key. The public key can be shared on the server with all users and devices belonging to this key system, while the private key needs to be strictly protected by the holder to ensure that only the holder can uniquely own it!
The characteristic of asymmetric key algorithm is that information encrypted by one key must be decrypted using another key, that is, public key encryption and private key decryption, private key encryption and public key decryption. Data encrypted by public key cannot be decrypted by public key, and data encrypted by private key cannot be decrypted by private key. We can use asymmetric key algorithms to encrypt and digitally sign data!
Let's introduce how to use asymmetric key algorithms to encrypt data!
Step 1: "User 1" (initiator) needs to obtain the public key of "User 2" (receiver) in advance!
Step 2: "User 1" encrypts important information using the public key of "User 2"!
Step 3: The attacker who intercepted the data midway cannot decrypt the data because they do not have the private key of "User 2"!
Step 4: User 2 decrypts the encrypted data (encrypted by User 2's public key) using their own private key. The method of encrypting the data using the public key and decrypting the private key achieves data privacy!
However, due to the extremely slow computation speed of asymmetric key algorithms (thousands of times faster than symmetric key algorithms), it is basically impossible to use asymmetric key algorithms to encrypt actual data. In practical applications, we mainly use the characteristic of asymmetric key algorithm to encrypt keys for key exchange. The specific operation method will be introduced in detail in the subsequent parts of this chapter!
The second use of asymmetric key algorithms is to implement digital signatures. Before introducing digital signatures, let's first discuss the signatures in real life and why they are necessary? The purpose of signing is nothing more than to confirm a certain document. For example, IOUs. Zhang San owes Li Si 10000 yuan, and the debtor Zhang San signs and confirms on the promissory note. The main purpose of the signature is for Zhang San to confirm this promissory note, which cannot be denied afterwards (non repudiation). Who will ultimately see this signature? It is obvious that Li Si does not need to repeatedly confirm the signature. Usually, after a dispute arises, for example, when Zhang San denies returning the debt, Li Si can take out the promissory note and present it to authoritative third parties such as the village chief or judge for verification. If they confirm that the signature on the promissory note is indeed from Zhang San, Zhang San cannot deny the established fact that Li Siqian is involved anymore!
To implement digital signatures using asymmetric key algorithms!
After understanding the working principle of signatures in real life, we can use it to see how digital signatures work!
Step 1: Calculate the hash value of important plaintext information through a hash function!
Step 2: "User 1" (initiator) encrypts the hash value calculated in step 1 using their own private key, and the encrypted hash is called a digital signature!
Step 3: Package important plaintext information and digital signature together and send it to "User 2" (recipient)!
Step 4: "User 2" extracts important plaintext information from the packaged file!
Step 5: "User 2" uses the same hash function as "User 1" to calculate the hash value of the important plaintext information extracted in step 4, and the result obtained is referred to as "Hash Value 1"!
Step 6: "User 2" extracts the digital signature from the packaged file!
Step 7: "User 2" uses the pre obtained public key of "User 1" to decrypt the digital signature extracted in step 6, obtaining the plaintext "hash value 2"!
Step 8: Compare whether "Hash Value 1" and "Hash Value 2" are equal. If they are equal, the digital signature verification is successful!
What issues can a successful digital signature verification indicate? Firstly, it ensures the integrity of important plaintext information transmitted. Because hash functions have two major characteristics: conflict avoidance and avalanche effect. Secondly, it can be determined that the user who digitally signs important plaintext information is "User One", because we successfully decrypted the digital signature using "User One's" public key. Only "User One" can use his private key to encrypt and hash the digital signature, and then use "User One's" public key for decryption. An example of a universal digital signature illustrates that digital signatures, like the previously discussed KBC technology, can provide the following two security features!
Integrity verification!
Source authentication!
Below we summarize the characteristics of asymmetric key algorithms!
Work characteristics!
Data encrypted with one key can only be decrypted with another key!
Only used for key exchange (encryption key) and good digital signature (encryption hash)!
Advantages:
Safety!
Since there is no need to worry about the exchanged public key being hijacked, the distribution of asymmetric keys is more secure!
The number of keys is the same as the number of participants!
There is no need to establish a trust relationship in advance before exchanging public keys!
Support digital signatures and non repudiation!
Disadvantages:
The encryption speed is very slow!
The ciphertext will become longer!
The mainstream protocols for asymmetric key algorithms:
RSA (the mainstream protocol for digital signatures and certificates)!
DH (the main protocol for generating key resources in IPSec)!
ECC (elliptic curve algorithm)!
After introducing how asymmetric key algorithms work, let's talk about their advantages and disadvantages. The advantages of asymmetric key algorithm are very prominent. Due to the characteristics of asymmetric key algorithm, the public key is shared and there is no need to guarantee the security of the public key. Therefore, key exchange is relatively simple and there is no need to worry about being intercepted halfway. In addition, in environments using asymmetric key algorithms, for every additional user, only one public key needs to be added, and the number of keys is the same as the number of participants. That is to say, 10000 users only need to manage and store 10000 public keys. Compared to symmetric key algorithms, the number of keys can be greatly reduced. In addition, asymmetric key algorithms can also support digital signatures and non repudiation, and the basis for non repudiation is that only the holder of the private key can uniquely own this private key!
After discussing the advantages of asymmetric key algorithms, let's also take a look at their serious drawbacks. The main problem with asymmetric key algorithms is that their encryption speed is extremely slow. If we compare RSA, an asymmetric key algorithm, with DES, a symmetric key algorithm, to encrypt data of the same size, DES is probably several hundred times faster than RSA. It is almost impossible to encrypt actual data using asymmetric key algorithms. In addition, encrypting ciphertext using asymmetric encryption algorithms can become very long. Taking an exaggerated example, using RSA to encrypt 1GB of data (although RSA certainly cannot encrypt 1GB of data), the encrypted ciphertext may become 2GB, which is not too tight compared to symmetric key algorithms. Due to these drawbacks, like symmetric key algorithms, we cannot use asymmetric key algorithms alone in a security solution. So, how can we use the advantages of symmetric and asymmetric key algorithms to encrypt actual data? Let's move on to a clever encryption solution!
| High-speed VPN | Fast VPN | Preferred Accelerator VPN | Reliable VPN |
| High quality VPN | Old fashioned VPN | Stable VPN(Recommend) | Smooth VPN |

