pki
- asymmetric keys can provide confidentiality by encryption (encrypt with partners public, partner decrypts with its private) and provide authenticity by signing (encrypt with my private, partner decrypts with my public)
- asymmetric encryption is slow and computationally expensive; thats why its used in the tls handshake only; application data is encrypted symmetrically
- keys are per-session - if one session is compromised, the others are not affected
- tls handshake 1.2 (c sent by client, s sent by server, o optional): cClientHello, sServerHello, sCertificate, soServerKeyExchange, soCertificateRequest (if mtls), sServerHelloDone, cClientCertificate (if mtls), cClientKeyExchange, cCertificateVerify (if mtls), cChangeCipherSpec, cFinished, sChangeCipherSpec, sFinished
- tls handshake 1.3: cClientHello, sServerHello, sChangeCipherSpec, sFinished, cChangeCipherSpec, cFinished
- reasons for paying for the cert: need for OV or EV due to compliance and contracts (Let's encrypt provides only DV cuz its the only one possible to automate), some boxes only allow manual upload of the certs, wanting to have a vendor to whom you can cry when stuff breaks, rate limits, client compatibility (older devices dont trust the chain)
- pki is not just used for https, but for ssh, email security, code signing, user/device/machine authenticaion