RC4       a proprietary cipher owned by RSA company another Ron Rivest design, simple but effective variable key size, byte-oriented stream cipher widely used (web SSL/TLS, wireless WEP) key forms random permutation of all 8-bit values uses that permutation to scramble input info processed a byte at a time
View full slide show




Ron’s Code or Rivest Codes Scorecard Description RC2 RC4 RC5 RC6 Timeline 1987 1987 1994 1998 Type of Algorithm Block cipher Stream cipher Block cipher Block cipher Key size (in bits) 40 and 64 1 - 256 0 to 2040 bits (128 suggested) 128, 192, or 256 Variable key-size block cipher that was designed as a "drop-in" replacement for DES. Use Most widely used stream cipher based on a variable key-size Vernam stream cipher. It is often used in file encryption products and secure communications, such as within SSL. The cipher can be expected to run very quickly in software and is considered secure. © 2012 Cisco and/or its affiliates. All rights reserved. A fast block cipher that has a variable block size and key size. It can be used as a dropin replacement for DES if the block size is set to 64-bit. An AES finalist (Rijndael won). A 128-bit to 256- bit block cipher that was designed by Rivest, Sidney, and Yin and is based on RC5. Its main design goal was to meet the requirement of AES. 104
View full slide show




Crossbar 7 1-bit 16-bit 16-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 16 1-bit 16-bit iterations 16-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 16-bit 1-bit 16-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 16-bit 1-bit 16-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit 2-bit Input Neurons
View full slide show




SSL Cipher Suite • cipher suite – public-key algorithm – symmetric encryption algorithm – MAC algorithm Common SSL symmetric ciphers  DES – Data Encryption Standard: block  3DES – Triple strength: block  RC2 – Rivest Cipher 2: block  RC4 – Rivest Cipher 4: stream • SSL supports several cipher suites • negotiation: client, server SSL Public key encryption  RSA agree on cipher suite – client offers choice – server picks one Network © 2016 Kurose Security & Ross
View full slide show




Muddiest Points what protocol does smtp use to establish an encrypted socket? What exactly is STARTTLS encryption? How does the server know when you choose to encrypt the socket? Why does it look like the server is talking so much more then the client in the secure channel Could we talk a bit more about what encryption is/does? So, to create an encypted socket, you first create a normal socket, then plug that socket in to the ssl.wrap_socket() method? None Question C - What messages are missing in your wireshark trace? and why? SSL/TLS SSL/TLS STARTTLS SSL/TLS SSL/TLS Python SSL/TLS Wireshark SSL/TLS Key: bold – discussed this class; italics – discussed at start; underline – discussed in lecture 2
View full slide show




Summary RSA’s RC4 is used in many security protocols including WEP and SSL WEP is inherently weak but the weakness is not due to RC4 encryption TKIP and other similar key rotation schemes correct the problem with WEP while retaining RC4 stream cipher RC5 is the most well-known block cipher RC5 is a parameterized algorithm with a variable block size, variable key size and a variable number of rounds This work is supported by the National Science Foundation under Grant Number DUE0302909. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect those of the National Science Foundation.
View full slide show




WEP (continued) • RC4 issues – RC4 uses a pseudo random number generator (PRNG) to create the keystream • PRNG does not create a true random number – First 256 bytes of the RC4 cipher can be determined • By bytes in the key itself – RC4 source code (or a derivation) has been revealed • Attackers can see how the keystream itself is generated • WEP attack tools – AirSnort, Aircrack, ChopChop WEP Cracker, and WEP Crack CWSP Guide to Wireless Security 36
View full slide show




RAPTOR Syntax and Semantics - Arrays Array variable - Array variables are used to store many values (of the same type) without having to have many variable names. Instead of many variables names a count-controlled loop is used to gain access (index) the individual elements (values) of an array variable. RAPTOR has one and two dimensional arrays of numbers. A one dimensional array can be thought of as a sequence (or a list). A two dimensional array can be thought of as a table (grid or matrix). To create an array variable in RAPTOR, use it like an array variable. i.e. have an index, ex. Score[1], Values[x], Matrix[3,4], etc. All array variables are indexed starting with 1 and go up to the largest index used so far. RAPTOR array variables grow in size as needed. The assignment statement GPAs[24] ← 4.0 assigns the value 4.0 to the 24th element of the array GPAs. If the array variable GPAs had not been used before then the other 23 elements of the GPAs array are initialized to 0 at the same time. i.e. The array variable GPAs would have the following values: 1 2 3 4… Array variables in action- Arrays and count-controlled loop statements were made for each other. Notice in each example below the connection between the Loop Control Variable and the array index! Notice how the Length_Of function can be used in the count-controlled loop test! Notice that each example below is a count-controlled loop and has an Initialize, Test, Execute, and Modify part (I.T.E.M)! Assigning values to an array variable Reading values into an array variable Writing out an array variable’s values Computing the total and average of an array variable’s values Index ← 1 Index ← 1 Index ← 1 Total ← 0 Loop Loop Loop Index ← 1 PUT “The value of the array at position “ + Index + “ is “ + GPAs[Index] Loop GPAs[Index] ← 4.0 “Enter the GPA of student “” + Index + “: “ GET GPAs[Index] Index >= 24 Index >= 24 Index >= Length_Of (GPAs) Index ← Index + 1 Index ← Index + 1 Index ← Index + 1 Total ← Total + GPAs[Index] Index >= Length_Of(GPAs) Index ← Index + 1 … 23 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4.0 The initialization of previous elements to 0 happens only when the array variable is created. Successive assignment statements to the GPAs variable affect only the individual element listed. For example, the following successive assignment statements GPAs[20] GPAs[11] ← ← 1.7 3.2 would place the value 1.7 into the 20th position of the array, and would place the value 3.2 into the 11th position of the array. i.e. GPAs[20] ← 1.7 GPAs[11] ← 3.2 1 2 3 4… … 23 24 Initialize the elements of a two dimensional array (A two dimensional array requires two loops) Row ← 1 Loop Average ← Total / Length_Of(GPAs) Find the largest value of all the values in an array variable Find the INDEX of the largest value of all the values in an array variable Highest_GPA ← GPAs[1] Highest_GPA_Index ←1 Index ← 1 Index ← 1 Loop Loop GPAs[Index] > Highest_GPA GPAs[Index] >= GPAs[Highest_GPA_Index] Column ← 1 Loop 0 0 0 0 0 0 0 0 0 0 3.2 0 0 0 0 0 0 0 0 1.7 0 0 0 4.0 An array variable name, like GPAs, refers to ALL elements of the array. Adding an index (position) to the array variable enables you to refer to any specific element of the array variable. Two dimensional arrays work similarly. i.e. Table[7,2] refers to the element in the 7 th row and 2nd column. Individual elements of an array can be used exactly like any other variable. E.g. the array element GPAs[5] can be used anywhere the number variable X can be used. The Length_Of function can be used to determine (and return) the number of elements that are associated with a particular array variable. For example, after all the above, Length_Of(GPAs) is 24. Matrix[Row, Column] ← 1 Column >= 20 Column ← Column + 1 Highest_GPA ← GPAs[Index] Highest_GPA_Index ← Index Index >= Length_Of(GPAs) Index >= Length_Of(GPAs) Index ← Index + 1 Index ← Index + 1 PUT “The highest GPA is “ + Highest_GPA¶ PUT “The highest GPA is “ + GPAs[Highest_GPA_Index] + “ it is at position “ + Highest_GPA_Index¶ Row >= 20 Row ← Row + 1
View full slide show




SECURE SOCKETS LAYER (SSL) SSL (like its successor, TLS Transport Layer Security) combines encryption and authentication to provide secure communication for IP data transfers (e.g., Web browsing, e-mail, instant messaging, IP fax) Applications SSL Handshake Protocol SSL Change Cipher Spec Protocol SSL Alert H T Protocol T E Establishes secure connection by exchanging authentication & encryption keys Signals the end of the key exchange and the start of the actual use of the authentication and encryption Indicates errors in SSL handshake process T L ... P N E T SSL Record Protocol Once the SSL connection is established, the application data is reformatted into SSL records (packets) • Each packet has a header indicating its data type (application, alert, etc.) • Application data is fragmented and compressed as needed • Using key known only to sender & receiver, authentication tag is added • Entire packet is encrypted and an SSL Record header is added TCP (or other reliable Transport Layer) IP CS Chapter 8 Page 6
View full slide show




Communication In a parallel implementation of simple search, tasks can execute independently and need communicate only to report solutions. Chip Chip Size: Size: 25 25 Chip Chip Size: Size: 54 54 Chip Chip Size: Size: 55 55 Chip Chip Size: Size: 64 64 Chip Chip Size: Size: 144 144 Chip Chip Size: Size: 174 174 CS 340 Chip Chip Size: Size: 84 84 Chip Chip Size: Size: 130 130 Chip Chip Size: Size: 140 140 Chip Chip Size: Size: 143 143 Chip Chip Size: Size: 85 85 Chip Chip Size: Size: 65 65 Chip Chip Size: Size: 114 114 Chip Chip Size: Size: 200 200 The parallel algorithm for this problem will also need to keep track of the bounding value (i.e., the smallest chip area found so far), which must be accessed by every task. One possibility would be to encapsulate the bounding value maintenance in a single centralized task with which the other tasks will communicate. This approach is inherently unscalable, since the processor handling the centralized task can only service requests from the other tasks at a particular rate, thus bounding the number of tasks that can execute concurrently. Chip Chip Size: Size: 112 112 Chip Chip Size: Size: 220 220 Chip Chip Size: Size: 150 150 Chip Chip Size: Size: 234 234 Chip Chip Size: Size: 102 102 Page 6
View full slide show




Partitioning There is no obvious data structure that could be used to perform a decomposition of this problem’s domain into components that could be mapped to separate processors. Chip Chip Size: Size: 25 25 Chip Chip Size: Size: 54 54 Chip Chip Size: Size: 55 55 Chip Chip Size: Size: 64 64 Chip Chip Size: Size: 85 85 Chip Chip Size: Size: 65 65 Chip Chip Size: Size: 84 84 Chip Chip Size: Size: 114 114 Chip Chip Size: Size: 144 144 Chip Chip Size: Size: 200 200 Chip Chip Size: Size: 174 174 Chip Chip Size: Size: 130 130 Chip Chip Size: Size: 140 140 Chip Chip Size: Size: 143 143 Chip Chip Size: Size: 112 112 Chip Chip Size: Size: 220 220 Chip Chip Size: Size: 150 150 Chip Chip Size: Size: 234 234 Chip Chip Size: Size: 102 102 A fine-grained functional decomposition is therefore needed, where the exploration of each search tree node is handled by a separate task. CS 340 This means that new tasks will be created in a wavefront as the search progresses down the search tree, which will be explored in a breadthfirst fashion. Notice that only tasks on the wavefront will be able to execute concurrently. Page 5
View full slide show




RC4 Developed by Ron Rivest of RSA Security Variable length stream cipher Used in WEP, TKIP, MPPE, SSL, TLS and many other security protocols Fast and efficient The RC4 algorithm is capable of key lengths of up to 256 bits, and is typically implemented in 64 bits, 128 bits, and 256 Considered moderately secure This work is supported by the National Science Foundation under Grant Number DUE0302909. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect those of the National Science Foundation.
View full slide show




Wired Equivalent Privacy – WEP  RC4 stream cipher  Designed by Ron Rivest for RSA Security  Very simple   Initialization Vector (IV) Shared Key  The issue is in the way RC4 is used  IV (24 bits) reuse and fixed key  Early versions used 40-bit key  128-bit mode effectively uses 104 bits Cryptography and Network Security 579
View full slide show




Sending/Receiving Encrypted Data in Python Some errors if you accidentally receive/send raw/encrypted text when you should send the other: ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:590) ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590) ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:590) Some errors if you use the wrong protocol: ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:590) ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:590) SE-2811 Dr.Yoder 11
View full slide show




WEP • Vulnerabilities are based on how WEP and the RC4 cipher are implemented • WEP can use only a 64-bit or 128-bit encryption key – 24-bit initialization vector (IV) and a 40-bit or 104-bit default key – Relatively short length of the default key limits its strength • Implementation of WEP creates a detectable pattern for attackers – IVs are 24-bit numbers – IVs would start repeating in fewer than seven hours CWSP Guide to Wireless Security 32
View full slide show