Encryption/Decyprtion using RC4 Vivek Ramachandran.

Slides:



Advertisements
Similar presentations
Chapter 3 Public Key Cryptography and Message authentication.
Advertisements

Modern Symmetric-Key Ciphers
Stream Ciphers Part 1  Cryptography 3 Stream Ciphers.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
CS457 – Introduction to Information Systems Security Cryptography 1b Elias Athanasopoulos
Chalmers University of Technology Wireless security Breaking WEP and WPA.
Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
Wired Equivalent Privacy (WEP)
RC4 1 RC4 RC4 2 RC4  Invented by Ron Rivest o “RC” is “Ron’s Code” or “Rivest Cipher”  A stream cipher  Generate keystream byte at a step o Efficient.
Wireless Security Presentation by Paul Petty and Sooner Brooks-Heath.
Foundations of Network and Computer Security J J ohn Black Lecture #24 Nov 23 rd 2004 CSCI 6268/TLEN 5831, Fall 2004.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
1 CSCD 439/539 Wireless Networks and Security Lecture 9 WEP Fall 2007.
Chap. 6: Contemporary Symmetric Ciphers Jen-Chang Liu, 2004 Adapted from Lecture slides by Lawrie Brown.
Chapter 2 (D) – Contemporary Symmetric Ciphers "I am fairly familiar with all the forms of secret writings, and am myself the author of a trifling monograph.
Computer Security CS 426 Lecture 3
Encryption is a way to transform a message so that only the sender and recipient can read, see or understand it. The mechanism is based on the use of.
Encryption with Generated Keys. Encryption: Symmetric - The same that is used to encrypt the data is also used to decrypt the data. They are all "BLOCK.
Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Dr. Khalid A. Kaabneh Amman Arab University
CSC-682 Advanced Computer Security
Cryptography and Network Security Chapter 7 Fifth Edition by William Stallings.
Cryptography and Network Security Chapter 6. Multiple Encryption & DES  clear a replacement for DES was needed theoretical attacks that can break it.
Network Security. Security Threats 8Intercept 8Interrupt 8Modification 8Fabrication.
COEN 350 Mobile Security. Wireless Security Wireless offers additional challenges: Physical media can easily be sniffed. War Driving Legal? U.S. federal.
Chapter 20 Symmetric Encryption and Message Confidentiality.
CS555Spring 2012/Topic 51 Cryptography CS 555 Topic 5: Pseudorandomness and Stream Ciphers.
Wireless Security Presented by: Amit Kumar Singh Instructor : Dr. T. Andrew Yang.
Stream Ciphers Making the one-time pad practical.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
Stream Cipher July 2011.
Implementing the RC4 Algorithm
COEN 350 Mobile Security. Wireless Security Wireless offers additional challenges: Physical media can easily be sniffed. War Driving Legal? U.S. federal.
Wireless LAN Security. Security Basics Three basic tools – Hash function. SHA-1, SHA-2, MD5… – Block Cipher. AES, RC4,… – Public key / Private key. RSA.
Cryptography and Network Security Contemporary Symmetric Ciphers.
Wired Equivalent Privacy (WEP): The first ‘confidentiality’ algorithm for the wireless IEEE standard. PRESENTED BY: Samuel Grush and Barry Preston.
Symmetric Encryption IT 352 : Lecture 2- part2 Najwa AlGhamdi, MSc – 2012 /1433.
無線網路安全 WEP. Requirements of Network Security Information Security Confidentiality Integrity Availability Non-repudiation Attack defense Passive Attack.
Lecture 2: Introduction to Cryptography
Security Technologies built into std. Presented by T.R.Santhosh.
Presented by: Dr. Munam Ali Shah
 Advisor: Dr. Quincy Wu  Speaker: Hui - Hsiung Chung  Date:
1 Wireless Threats 1 – Cracking WEP Cracking WEP in Chapter 5 of Wireless Maximum Security by Peikari, C. and Fogie, S.
CRYPTOGRAPHY PRESENTED BY : NILAY JAYSWAL BRANCH : COMPUTER SCIENCE & ENGINEERING ENTRY NO. : 14BCS033 1.
Dr. Lo’ai Tawalbeh summer 2007 Chapter 6: Contemporary Symmetric Ciphers Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus INCS.
IEEE Security Specifically WEP, WPA, and WPA2 Brett Boge, Presenter CS 450/650 University of Nevada, Reno.
Wired Equivalent Privacy (WEP) Chris Overcash. Contents What is WEP? What is WEP? How is it implemented? How is it implemented? Why is it insecure? Why.
University of Malawi, Chancellor College
COEN 350 Mobile Security. Wireless Security Wireless offers additional challenges: Physical media can easily be sniffed. War Driving Legal? U.S. federal.
Slide 1 Vitaly Shmatikov CS 378 Stream Ciphers. slide 2 Stream Ciphers uRemember one-time pad? Ciphertext(Key,Message)=Message  Key Key must be a random.
Wireless LAN Security Daniel Reichle Seminar Security Protocols and Applications SS2003.
CRYPTOGRAPHY Cryptography is art or science of transforming intelligible message to unintelligible and again transforming that message back to the original.
Symmetric Encryption and Message Confidentiality
HEY DOUG HOW ARE YOU? NKE JUAM NUC GXK EUA. HEY DOUG HOW ARE YOU? NKE JUAM NUC GXK EUA.
Encryption
Cryptography.
Unit -1.
Stream Cipher.
Pseudo Random Number Generators
PART VII Security.
ADVANCED ENCRYPTION STANDARDADVANCED ENCRYPTION STANDARD
RC4 RC
Chapter -4 STREAM CIPHERS
DES (Data Encryption Standard)
Information and Computer Security CPIS 312 Lab 4 & 5
The RC4 Algorithm Network Security.
By: Anthony Gervasi & Adam Dickinson
Presentation transcript:

Encryption/Decyprtion using RC4 Vivek Ramachandran

Encryption Basics Encryption is yet another process by which information is protected from unauthorized access. It is normally accomplished by rendering the original information unreadable by using a reversible technique known only to the authorized entities.

Types of Encryption Private/Symmetric Key Cryptography : Same key is used for encryption and decryption. Public/Asymmetric Key Cryptography : Different keys are used for encryption and decryption.

RC4 Basics A symmetric key encryption algo. Invented by Ron Rivest. Normally uses 64 bit and 128 bit key sizes. Most popular implementation is in WEP for wireless networks and in SSL. Cryptographically very strong yet very easy to implement. Consists of 2 parts: Key Scheduling Algorithm (KSA) & Pseudo-Random Generation Algorithm

RC4 Block Diagram Plain Text Secret Key RC4 + Encrypted Text Keystream

RC4 …break up Initialize an array of 256 bytes. Run the KSA on them Run the PRGA on the KSA output to generate keystream. XOR the data with the keystream.

Array Initialization C Code: char S[256]; Int i; For(i=0; i< 256; i++) S[i] = i; After this the array would like this : S[] = { 0,1,2,3, ……, 254, 255}

The KSA The initialized array S[256] is now run through the KSA. The KSA uses the secret key to scramble the array. C Code for KSA: int i, j = 0; for(i=0; i<256; i++) { j = ( j + S[i] + key[ i % key_len] ) % 256; swap(S[i], S[j]); }

The PRGA The KSA scrambled S[256] array is used to generate the PRGA. This is the actual keystream. C Code: i = j = 0; while(output_bytes) { i = ( I + 1) % 256; j = ( j + S[i] ) % 256; swap( S[i], S[j] ); output = S[ ( S[i] + S[j] ) % 256 ] }

Encryption using RC4 Choose a secret key Run the KSA and PRGA using the key to generate a keystream. XOR keystream with the data to generated encrypted stream. Transmit Encrypted stream.

Decryption using RC4 Use the same secret key as during the encryption phase. Generate keystream by running the KSA and PRGA. XOR keystream with the encrypted text to generate the plain text. Logic is simple : (A xor B) xor B = A A = Plain Text or Data B = KeyStream

Making of a RC4 File Encryptor Using a secret key generate the RC4 keystream using the KSA and PRGA. Read the file and xor each byte of the file with the corresponding keystream byte. Write this encrypted output to a file. Transmit file over an insecure channel.

Making of a RC4 File Decryptor Using the same secret key used to encrypt generate the RC4 keystream. Read the encrypted file and Xor every byte of this encrypted stream with the corresponding byte of the keystream. This will yield the original plaintext

That's all folks !! Let the coding begin !