system
Given the following post, respond as if you're commenting on Reddit:
human
How do open source VPNs (Such as OpenVPN) protect your data when the source code available?

I'm aware that VPNs encrypt your data in a way where that if someone did see your data, it wouldn't be legible unless they had the "Key." 

My question is, how do open source VPNs defend against a third party who knows the code from decrypting your data?

I'm sure there has to be a way to defend from that, otherwise their security would be almost nonexistent, so what is the way VPNs defend against this?


Apologies for any formatting problems, I'm on mobile.
gpt
The strength of cryptosystem does not come from secrecy of the algorithm! In fact all strong algorithms like RSA, ECC and AES are public, and yet it changes nothing about their security. They're specifically designed like that. They are as strong as your "password" is.

Let's look at RSA since it's very simple. RSA encryption is just `ciphertext = message^e mod N` where `e` is commonly `65537`. So it's a single modular exponentiation, a trivial mathematical operation. However finding the `message`, even when you're given all other values (e,N and ciphertext) is a hard problem. It requires you to know the factorization of N into primes, and there is no fast algorithm to do that for large numbers.

As you can see the algorithm is known, and rather simple, but the strength comes from mathematics.