A protocol is a set of rules and procedures computers over a network use to communicate with each other. # Communications Protocols ## Internet Protocol **IP**, uses either TCP or UDP as is necessary.  A device gets a unique identity (IPv4 or IPv6) to ensure reliable communication. ## TCP Protocol Transmission Control Protocol – The Server sends information, and never confirms if it was received.  Simplest and fastest, but also easy to intercept without anyone knowing. ## UDP Protocol User Datagram Protocol – The Server sends information, confirms it was received, and reacts if it didn’t.  Most reliable, and still can be intercepted, but at least someone will be able to tell if the wrong message got there. ## DNS Domain Name Service – provides a “nickname” for an IP address. # Data Transfer Protocols ## FTP – File Transfer Protocol – simplest way to send files. 1. A command provides instructions on sending a file 2. The FTP Client then sends the file via TCP to the destination. 3. A command asks for an updated filelist from the Recipient. 4. A command then gets an updated file list from the FTP Recipient via TCP communication. ## HTTP – Hypertext Transfer Protocol – “The Internet Protocol” 1. A Client (browser) sends a Domain Name Search request to a DNS. 2. The DNS Responds with an IP Address. 3. The client sends a GET request to the IP Address. 4. The Server responds with a SEND response 5. The client interprets the SEND response and displays it in the browser. ## More Data Transfer Protocols - SMTP – Simple Mail Transfer Protocol - POP3 – Post Office Protocol (version 3) - IMAP4 – Internet Message Access Protocol (version 4) - RTMP – Real Time Messaging Protocol - **HTTPS – Hypertext Transfer Protocol Secure** – The Newest Protocol, slower, but safer from interception - TSL, Transport Security Layer, once referred to as SSL (Secure Sockets Layer), requires the server provide a certificate of authenticity. # The TLS Handshake Process |Step|For Dummies|Slightly More Technical| |-|-|-| |1|The Client extends their hand.|The Client says “Hello”.  Literally.| |2|The Server extends their hand very openly with a unique grip.|The Server says “Hello” back.  But the server says “Hello” with a Certificate.| |3|The Client looks at their hand to make sure it’s actually attached to the correct person’s arm.|The Client looks at the Certificate and checks with the Certificate Authority to see if it’s legitimate.  If not, it runs away.| |4|The Client matches their hand to the unique grip of the Server.|The Client uses the Public Key from the Certificate to send an encrypted message called the Premaster Secret.| |5|The Server clasps the Clients hand, and hope the grips match.|The Server uses a Private Key connected to its Certificate to decrypt the Premaster Secret message.| |6|The Client and the Server both start to “bounce” their hand in unison.|While this encrypted messaging happens, both the Client and the Server generate Session Keys from the Premaster Secret and Certificate Messages.| |7|If the Client feels like the “bounce” made sense, it initiates it’s move in the secret handshake.|If the Client’s Keys matched the way they’re supposed to, they send a “Finished” message to the Server.| |8|If the Server feels like the “bounce” made sense, it initiates it’s move in the secret handshake.|The Server sends back a “Finished” message if everything checks out.| |9|So far everything is, good, so they continue the rest of the handshake, talking the entire time.|Now standard HTTP messages can be sent, all encrypted and layered with the Session Keys.|