SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets...

23
SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1

Transcript of SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets...

Page 1: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

Secure Sockets Layer e Transport Layer Security 1

SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS)

Leonardo Bentes Arnt

Page 2: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

Secure Sockets Layer e Transport Layer Security 2

DEFINIÇÕES

Leonardo Bentes Arnt

Page 3: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

3

Criptografia

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

É a ciência que manipula os dados de forma a proteger a informação que eles transmitem.

Page 4: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

4

Criptografia com Chave Simétrica

Cifra de Thomas Jefferson

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Page 5: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

5

Criptografia com Chave Assimétrica

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Page 6: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

6

Assinatura digital (chaves assimétricas)

1. João aplica sua chave privada e a função de decriptação na mensagem.

2. João encripta a mensagem usando a chave pública de Maria e envia a mensagem.

3. Maria decripta a mensagem usando sua chave privada.

4. Maria encripta a mensagem com a chave pública de João e, com isso, espera ter o conteúdo original novamente.

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Page 7: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

Secure Sockets Layer e Transport Layer Security 7

INTRODUÇÃO E HISTÓRICO

Leonardo Bentes Arnt

Page 8: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

8

Introdução e Histórico

Demanda por segurança na Rede Web Protocolos de troca de mensagem (e.g.

Telnet) E-mail

1994: Netscape cria SSL IETF cria TLS

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Page 9: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

Secure Sockets Layer e Transport Layer Security 9

SSL

Leonardo Bentes Arnt

Page 10: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

10

SSL e TLS

Protocolo para segurança mais usado Arquitetura Benefícios

Confidencialidade Autenticidade Integridade

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Page 11: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

11

SSL → TLS

TLS > SSL Hash

TLS usa Keyed-Hashing for Message Authentication Code (HMAC)

SSL usa Message Authentication Code (MAC).

Outras pequenas diferenças no cabeçalho e nas mensagens de alerta.

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Page 12: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

Secure Sockets Layer e Transport Layer Security 12

FUNCIONAMENTO

Leonardo Bentes Arnt

Page 13: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

13

Protocolos

Record Encapsulamento e desencapsulamento Encriptação e compressão

Handshake Negociação

Change Cipher Spec Anuncia a troca de tipo de criptografia

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Page 14: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

14

Protocolos

Alerta Fatal

Recebimento de uma mensagem inesperada (Unexpected_message)

Hash não confere (Bad_record_mac) O tamanho da mensagem após a descompressão excede o

limite (Decompression_failure) Problema de segurança durante o handshake

(Handshake_failure) Algum parâmetro do handshake não confere (Illegal_parameter)

Aviso Invalidez do certificado (por ter expirado, por ter sido revogado,

ou por ser desconhecido, por exemplo) etc.

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Page 15: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

15

Estágios

Handshake Autenticação do servidor Autenticação do cliente Geração das chaves secretas usando

criptografia assimétrica para transmissão dessa chave

Estabelecimento de uma conexão segura via SSL

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Page 16: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

16

Estágios

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Handshake

Page 17: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

17

Estágios

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Transmissão Protocolo da camada de aplicação

(mensagem) Record Protocol (mensagem encriptada) TCP (transmissão)

Page 18: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

18

Principais Implementações

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

OpenSSL GnuTLS SSLeay

Page 19: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

Secure Sockets Layer e Transport Layer Security 19

CONSIDERAÇÕES FINAIS

Leonardo Bentes Arnt

Page 20: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

20

Conclusão

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

Segurança* Bancos web Comércio eletrônico ...

Flexibilidade Vantagens da chave simétrica +

vantagens da chave assimétrica Ampla aceitação

* (teoricamente)

Page 21: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

Secure Sockets Layer e Transport Layer Security 21

PERGUNTAS E RESPOSTAS

Leonardo Bentes Arnt

Page 22: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

22

Perguntas

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

O que é SSL? Um conjunto de protocolos que utilizam algoritmos de

hash, encriptação e de criação de chaves para garantir uma série de seguranças.

SSL usa criptografia simétrica ou assimétrica? Os dois. A criptografia assimétrica é usada para negociar

a chave secreta da criptografia simétrica. Essa chave secreta é a que será usada no decorrer da conexão.

Qual protocolo é responsável pela encriptação: SSL, TLS, SSL Record Protocol, SSL Algorithm Spec Change Protocol ou TCP? SSL Record Protocol.

Page 23: SECURE SOCKETS LAYER (SSL) E TRANSPORT LAYER SECURITY (TLS) Leonardo Bentes Arnt Secure Sockets Layer e Transport Layer Security 1.

23

Perguntas

Secure Sockets Layer e Transport Layer Security - Leonardo Bentes Arnt

O que SSL provê? Autenticidade, Privacidade e Integridade.

Cite um motivo pelo qual o protocolo de alertas geraria um alerta fatal. Recebimento de uma mensagem inesperada

(Unexpected_message); Hash não confere (Bad_record_mac); O tamanho da mensagem após a descompressão excede

o limite (Decompression_failure); Problema de segurança durante o handshake

(Handshake_failure); Algum parâmetro do handshake não confere

(Illegal_parameter).