Answer the question
In order to leave comments, you need to log in
How to safely transfer openvpn keys from the server to the client, what will happen if the keys are caught?
According to all the manuals that I could google, the keys are generated on the server, both for the client and for the server. Then they are transferred.
And here a number of questions arise, because. I'm incompetent:
1. How to safely transfer the keys to the client? Indeed, in the event of a mitm, they will be immediately intercepted, and even without this, the provider stores logs, filters traffic, can catch these keys according to the criteria, who knows what kind of nanotechnologies are used, in general, how can they be safely transferred? In a password-protected archive, it seems to me, not very reliable. more options?
2. If, suppose, the keys are caught, then they will be able to collect and decrypt traffic, right? Indeed, in this case, having exchanged keys with the server, they will be able to find out the key with which they encrypt (in the case of diff-healman). Or are the keys needed only to connect, saying that by grabbing the keys they will be able to connect, but they will not be able to listen to the traffic and it will be encrypted?
Answer the question
In order to leave comments, you need to log in
I believe that among all the manuals you googled, you did not ignore the official one, namely the section on generating certificates: https://openvpn.net/index.php/open-source/document... At the end of this section there is an answer to your first question .
The final step in the key generation process is to copy all files to the machines which need them, taking care to copy secret files over a secure channel.
Now wait, you may say. Shouldn't it be possible to set up the PKI without a pre-existing secure channel ?
The answer is ostensibly yes. In the example above, for the sake of brevity, we generated all private keys in the same place. With a bit more effort, we could have done this differently. For example, instead of generating the client certificate and keys on the server, we could have had the client generate its own private key locally, and then submit a Certificate Signing Request (CSR) to the key-signing machine. In turn, the key-signing machine could have processed the CSR and returned a signed certificate to the client. This could have been done without ever requiring that a secret .key file leave the hard drive of the machine on which it was generated .
Правильно как раз ключи генерировать на клиенте, в центр сертификации передается запрос на сертификат, ЦС возвращает сертификат, клиент передает сертификат на сервер. ЦС и сервер в общем случае это разные сущности, и, если по взрослому, это даже разные организации.
1. User registration on the site (two-factor, SSL / TLS) - by clicking from the mail, we save the token on the client.
2. After the user logs in using the token and tries to download the certificate, we encrypt the file on the server using the token and the password hash.
3. On the client, decrypt with a token and a password hash, which is generated after the user enters the password.
Thus, two-factor registration (website + mail, all via SSL / TLS) and a never forwarded client token allow you to maximize the security of the certificate from MiTM attacks.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question