1 / 27

Computer Science 101

Computer Science 101. Data Encryption And Computer Networks. Reading for This Week and Next Week. Chapter 7 - Networks, the Internet and the Web Chapter 8 - Information Security. The Problem. Back in the old days, information was kept secure by locking the door to the computer room

garima
Télécharger la présentation

Computer Science 101

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. Computer Science 101 Data Encryption And Computer Networks

  2. Reading for This Week and Next Week • Chapter 7 - Networks, the Internet and the Web • Chapter 8 - Information Security

  3. The Problem • Back in the old days, information was kept secure by locking the door to the computer room • When computers are connected via networks and information can be transmitted, we need another way to secure it • What happens when you send your credit card number to Amazon?

  4. Cryptography • The science of secret writing – thousands of years old • Encrypt plain text into a cipher text, using a cipher key • Decrypt cipher text back into plain text, using a cipher key

  5. A Simple Algorithm: The Caesar Cipher • Let S = an integer between 1 and 25 • Encode each letter in plain text by replacing it with the letter that is S positions to its right in the alphabet • Shift the last S letters in a cycle to the first S letters

  6. Example Encryption • Let S = 3 • Then A encodes as D, B as E, X as A, etc. • ARMY encodes as DUPB

  7. Problem With Caesar Cipher • Because there are only 25 possible keys, one can decode a cipher text by brute force, by trying all possible keys (a computer makes that easy) • Caesar cipher is a stream/substitution cipher, wherein each letter of plain text generates a letter of cipher text • The structure of the plain text is preserved in the structure of the cipher text

  8. Block Cipher • Encode a block of plaintext letters as a block of cipher text letters • More difficult for a cryptanalyst (i.e., a hacker) to detect the patterns

  9. The Key: An Encryption Matrix A two-dimensional grid of characters Each successive pair of characters in the plaintext maps to a pair of characters in the ciphertext

  10. Example Encryption Plaintext: Ken Lambert Ciphertext: I?

  11. Example Encryption Plaintext: Ken Lambert Ciphertext: I?%Y

  12. Example Encryption Plaintext: Ken Lambert Ciphertext: I?%Y!4

  13. Example Encryption Plaintext: Ken Lambert Ciphertext: I?%Y!4bm

  14. Example Encryption Plaintext: Ken Lambert Ciphertext: I?%Y!4bmPb

  15. Example Encryption Last step does not use the matrix, because the plaintext contains an odd number of characters Plaintext: Ken Lambert Ciphertext: I?%Y!4bmPbt

  16. Decryption The same matrix and algorithm are used to decrypt or generate the plaintext from the ciphertext Plaintext: Ken Lambert Ciphertext: I?%Y!4bmPbt

  17. The Algorithm Set the ciphertext string to the empty string For each pair of characters in the plaintext string Locate the positions of each character in the matrix If the positions are in the same row or column, then Append the two characters in reverse order to the ciphertext string else Locate the opposite corners of the imaginary rectangle formed by these positions Append the two characters at these corners to the ciphertext string If the number of characters in the plaintext string is odd Append its last character to the ciphertext string Return the ciphertext string

  18. Other Cryptography Issues • The key must be sent with the message • So, the key must be encrypted • Send a public key to encrypt • Keep a different, private key to decrypt

  19. Network Transmissions • Sender and receiver have different responsibilities • Sender must encode information provided by user • Receiver must notify sender to resend if some info is lost or corrupted • Receiver must decode info for user

  20. Encoding for Network Transmission • Translate text to binary form • Encrypt binary form if necessary • Place each code in a packet • Add a parity bit and a label to the packet

  21. The ASCII Character Set • American Standard Code for Information Interchange • A set of 128 numbers, ranging from 0 to 127 • Each character maps to a number

  22. The ASCII Character Set ASCII 32 to 126 are codes for the printing characters ASCII 0 to 31 and 127 are codes for control characters Row # + column # locates character and specifies code Thus, the ASCII code for ‘A’ is 65, etc.

  23. Step 1: Translate Character to Binary ‘A’ translates to ASCII 65 ASCII 65 translates to 01000001 binary We use 8 bits for each character

  24. Step 2: Encrypt Subtract an offset and shift bits a certain distance to the left or right We’ll subtract 1 and shift the bits to the right by 1 Subtract 1: 01000001 01000000 Shift right by 1: 01000000 00100000 The encoded ‘A’ is ASCII 32, or ‘ ’ (the space)

  25. Step 3: Place Code in a Packet • Each packet contains • two character codes • a parity bit • a label that identifies the position of the packet in the original message • If there is no character available, we use ASCII for the null character (0) to hold the place in the packet

  26. Step 3: Place Code in a Packet Null (00000000) encrypts as 11111111 00100000 + 11111111 = 0010000011111111 (odd # of 1s) Add parity bit: 0010000011111111 0 Add label (first of four packets): 00 0010000011111111 0

  27. Receiving and Decoding • Wait for all labeled packets to be placed in correct order • Check parity bit for corrupted data • Decrypt to binary • Decode to ASCII and then to text

More Related