HTTP-TCP
로 직접 통신하지만, HTTPS에서는 HTTP-SSL-TCP
로 통신SSL 인증서의 목적
SSL 인증서 내용
SSL 통신 과정
[SSL 통신 과정]
⇒ Server와 Client가 데이터를 대칭키 암호화해서 통신하고 싶음.. Client가 대칭키를 보내줬으면 좋겠는데 평문으로 보내면 안되잖아.. 어떻게 공유하지? Client가 Server공개키로 Client 개인키를 암호화해서 보내주자.
- SSL handshake C: S야 나 너랑 통신하고 싶어 S: 오키. 여기 인증서 줄게. 인증서에는 S의 공개키와, 발급받은 CA정보가 있어.
- C가 S의 공개키로 pre master secret를 암호화 하여 S에게 보낸다. 그후 pre master secret를 활용하여 대칭키(session key)를 만든다.
- S는 암호문을 받아, 자신의 개인키로 복호화 하여pre master secret를 활용하여 대칭키(session key)를 생성한다.
- 이제부터 C와 S는 대칭키(session key)로 통신하면 됨!
<aside> 💡 [대칭키, 비대칭키 암호화]
대칭키 : 하나의 key로 암호화/복호화 모두 함 key 노출하면 안됨
비대칭키 : (공개키, 개인키)로 암호화/복호화 각각 함 A가 B의 공개키로 암호화하면, B가 자기만 알고있는 B의 개인키로 복호화함
</aside>