|
SSL/TLS S/MIME
プレゼンテーションモードでも利用可能
SSL/TLS
- Secure Socket Layer
- Transport Layer Security
- RFC2246
TLS
- TLS Record Protocol
- TLS Handshake Protocol
TLS Record Protocol
- Private
- Symmetric Cryptography
- DES, RC4 etc
- Enhanced Connection Reliability
- CRC, Checksum ... Ether / TCP
- HMAC ... Keyed-Hashing for Message Authentication Code
- MD5, SHA1
TLS Handshake Protocol
- Peer's Identity Authentication ... Public Key Cryptography
- Symmetric Algorithm/Key Exchange Negotiation ... Secure and Reliable
Handshake
- Handshake ... 0x16 (22)
- Version ... 3, 1
- Length ... 16bit
ClientHello
- ClientHello ... (1)
- Sends Random, SessionID, Cipher Suits, Compression Methods
- CipherSuit examples
- 01 = TLS_RSA_WITH_NULL_MD5
- 05 = TLS_RSA_WITH_RC4_128_SHA
ServerHello
Diffie-Hellman key exchange
- See
- C->S: A = ga mod p, g, p
- S->C: B = gb mod p
- KA = Ab = gab mod p
- KB = Ba = gba mod p
ChangeCipherSpec
- Later on, encrypted messages are sent
HTTPS
- HTTP over TLS/SSL
- use TLS/SSL from the very start
- Immediately after TCP connection was established
- C->S: ClientHello
- S->C: ServerHello (DHE) ChangeCipherSpec ...
- C->S: ChangeCipherSpec ...
TLS over POP
- S->C: +OK Qpopper (version 4.0.18) at is01 starting.
- C->S: CAPA
- S->C: +OK Capability list follows
- S->C: STLS ...
- C->S: STLS
- S->C: +OK STLS
- C->S: ClientHello ...
TLS over SMTP
Server Certificate
- Server's public key should be signed by a trusted authority
- CA ... Certificate Authority
SSL Server Setup (1)
- Compile Apache with SSL enabled
- You need OpenSSL library and include files
- --enable-ssl and --with-ssl=DIR options for apache httpd configure command
Server keys
- Key generation:
$ openssl genrsa -out server.key 1024
- Certficate Request:
$ openssl req -new -key server.key -out server.csr
Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Kochi
Locality Name (eg, city) []:Kochi
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Kochi University
Organizational Unit Name (eg, section) []:Information Science
Common Name (eg, YOUR name) []:www.is.kochi-u.ac.jp
Email Address []:example@is.kochi-u.ac.jp
Get CA signature
Apache SSL Configuration
- in httpd.conf (extra/httpd-ssl.conf)
- SSLEngine on
- SSLCertificateFile /path/to/server.crt
- SSLCertificateKeyFile /path/to/server.key
- etc. etc.
Role of CA
PGP vs PKI
- PGP ... Pretty Good Privacy
- PGP -> OpenPGP, GnuPG
- Peer Signed Public Key
- PKI ... Public Key Infrastructure
- PKI -> SSL/TLS, S/MIME
- Authorized Key Signing
Signing
Verifying Signature
Encrypting
Decrypting
Miscellaneous Applications
Quiz of the Day
- Spell out the following acronyms
- TLS
- CA
|
|