I was reading about TLS1.3 and my question is that are the server hello extensions encrypted? Why is it so and how are they encrypted?
I was reading about TLS1.3 and my question is that are the server hello extensions encrypted?
Yes, everything after the ServerHello/key_share is encrypted. For example, the certificate is encrypted in TLS1.3, but not in TLS1.2. You can read all about it here.
In addition, a really nice website to help "see" all the parts of the TLS1.3 handshake is the "Illustrated TLS" website for TLS1.3. You can see that the ServerHello is followed by encrypted data, such as the encrypted certificate.
Why is it so and how are they encrypted
They are encrypted using the cipher suite that was agreed on in the earlier part of the handshake. The mandatory cipher suite for TLS1.3 is the "TLS_AES_128_GCM_SHA256" suite.
As you might expect, the TLS1.3 protocol performs encryption in order to protect the confidentiality of the data in transit (the encryption suite also protects the integrity of the data).