1 / 16

HTTP/ ssl

Binhe Ye. HTTP/ ssl. HTTP ( Hypertext transfer protocol) 1. Hypertext is a structured text 2. HTTP functions as a request-response protocol in the client-server computing model. 3. HTTP is an application layer protocol.

donal
Download Presentation

HTTP/ ssl

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Binhe Ye HTTP/ssl

  2. HTTP ( Hypertext transfer protocol) 1. Hypertext is a structured text 2. HTTP functions as a request-response protocol in the client-server computing model. 3. HTTP is an application layer protocol. 4.HTTP can use both reliable and unreliable transport layer protocols

  3. HTTP defines methods (sometimes referred to as verbs) to indicate the desired action to be performed on the identified resource. 1. GET It requests a representation of the specified resource. The requests using GET only retrieve data and have no other effects 2. HEAD Asks for the response correspond to a GET request, but without the response body. HTTP Methods

  4. 3. POST Requests that the server accept the entity enclosed in the request as a new subordinate of the web resource identified by the URI In later version of HTTP, some new methods are added such as OPTIONS, PUT, DELETE, TRACE and CONNECT. HTTP Methods

  5. Request message The request message consists of the following: 1. A request line 2. Request Headers 3. An empty line 4. An optional message body Example: GET /index.html HTTP/1.1 Host: www.example.com Request-response

  6. Response message The response message consists of the following: 1. A Status-Line 2. Response Headers 3. An empty line 4. An optional message body Request-response

  7. Response example HTTP/1.1 200 OK Date: Mon, 31 Mar 2014 22:38:34 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 131 <html> <head> <title>An Example Page</title> </head> <body> Hello World, this is a very simple HTML document. </body> </html> Request-response

  8. SSL Secure Sockets Layer 1. SSL is a cryptographic protocol which is designed to provide communication security over the Internet. 2. SSL is initialized at the session layer, then works at the presentation layer. 3. SSL uses a handshaking procedure. SSL

  9. HTTP/SSL 1. HTTPS is the result of simply layering the HTTP on top of the SSL/TLS protocol, thus adding the security capabilities of SSL/TLS to standard HTTP communications. 2. The security of HTTPS is therefore that of the underlying SSL/TLS, which uses long term public and secret keys to exchange a short term session key to encrypt the data flow between client and server. https

  10. SSL handshake 1. The client sends the server the client's SSL version number, cipher settings, session-specific data that the server needs to communicate with the client using SSL. 2. The server sends the client the server's SSL version number, cipher settings, and other information that the client needs to communicate with the server over SSL. The server also sends its own certificate, if the client is requesting a server resource, the server requests the client's certificate 3. The client uses the information sent by the server to authenticate the server 4. The client creates the pre-master secret for the session, encrypts it with the server's public key, and then sends the encrypted pre-master secret to the server. ssl

  11. 5. The server authenticates the client. If the client cannot be authenticated, the session ends. If the client can be successfully authenticated, the server uses its private key to decrypt the pre-master secret, and then generate the master secret. 6. Both the client and the server use the master secret to generate the session keys, which are symmetric keys used to encrypt and decrypt information . 7. The client sends a message to the server informing it that future messages from the client will be encrypted with the session key. It then sends a separate (encrypted) message indicating that the client portion of the handshake is finished. 8. The server sends a message to the client informing it that future messages from the server will be encrypted with the session key. It then sends a separate (encrypted) message indicating that the server portion of the handshake is finished. SSL

  12. Encryption algorithm 1. RSA is an encryption algorithm, it’s based on the difficulty of factoring the product of two large prime numbers. 2. It’s easy to calculate the multiplication 521*379=197459 However 197459= ? * ? rsa

  13. RSA algorithm 1. Choose two distinct prime numbers p and q. (random and large) 2. n=p*q. 3. Compute φ(n) = φ(p)φ(q) = (p − 1)(q − 1). 4. Choose an integer e such that 1 < e < φ(n) and gcd(e, φ(n)) = 1. 5. Determine d as d ≡ (mod φ(n)) RSA

  14. RSA algorithm Encryption: c = ( mod n) Decryption: m= ( mod n ) m is the message, c is the cipher RSA

  15. Exercise p=2 , q=5. Calculate the private key d and public key e. RSA

  16. Thank you !

More Related