What level of encryption is used during the authentication part of the connection?
Here’s a sample
config setup charondebug="ike 1, knl 1, cfg 0" uniqueids=no conn ikev2 auto=add compress=no type=tunnel keyexchange=ikev2 fragmentation=yes forceencaps=yes ike=aes256gcm16-sha384-modp3072! esp=aes256gcm16-sha384-modp3072! dpdaction=clear dpddelay=300s rekey=no left=%any firstname.lastname@example.org leftcert=/etc/ipsec.d/certs/vpn-server-cert.pem leftsendcert=always leftsubnet=0.0.0.0/0 right=%any rightid=%any rightauth=eap-mschapv2 rightdns=22.214.171.124,126.96.36.199 rightsourceip=10.0.2.1/24 rightsendcert=never eap_identity=%identity
The encryption of IKEv2 messages has nothing to do with the authentication method. What exactly is it you want to know?
I’m trying to understand how safe the credentials (and later shared secret) are while in transit to the server. In the case of HTTPS, this is very well documented. TLS uses Diffie-Hellman (an asymmetric key algorithm) to generate a shared secret that is then used to establish a channel protected by symmetric key cryptography derived from that shared secret. The encryption of that channel is usually publicly disclosed. For example, on YouTube.com, it’s
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (128 bit AES-GCM encryption with a 256 bit SHA2 integrity algorithm). I’m fairly new to cryptography so hopefully the above is accurate. Now, I can’t find an equivalent to the above spec in the context of eap-mschapv2 using openSwan. I expect something similar is going on, but I would love to make sure I fully understand the protocol.
Added some links in case others want to learn more about cryptography.