Rivest Cipher 4 (RC4) | Infosec (2024)

  • Resource Center
  • Cryptography
  • Rivest Cipher 4 (RC4)

Cryptography

RC4 stands for Rivest Cipher 4. RC4 is a stream cipher and was invented by Ron Rivest in 1987. Since RC4 is a stream cipher, it encrypts the stream of data byte by byte.

Of all the stream ciphers, RC4 is the widely used stream cipher due to its speed of operations and simplicity.

Rivest Cipher 4 (RC4) | Infosec (1)

Learn Applied Cryptography

Build your applied cryptography and cryptanalysis skills with 13 courses covering hashing, PKI, SSL/TLS, full disk encryption and more.

Start Learning

RC4 variants

RC4 has 4 variants to it. They are:

  • SPRITZ: Spritz is used to build:
    • a) Cryptographic hash function
    • b) Deterministic random bit generator (DRBG)
    • c) Encryption algorithm which supports Authenticated Encryption with Associated Data (AEAD)
  • RC4A:This is a stronger variant than RC4.
  • VMPC: It stands for Variably Modified Permutation Composition.RC4A+:RC4A+ as the name suggests is a modified version of RC4 with a more complex three-phase key schedule and takes 1.7 times as long as basic RC4.

Working of RC4

RC4 makes use of KSA and PRGA Algorithms. Explanation and working of these algorithms is out of scope. Let’s understand how encryption and decryption takes place in RC4.

Encryption

  1. User inputs plain text and a secret key.
  2. The encryption engine generates the keystream by using KSA and PRGA Algorithms for the secret key entered.
  3. The generated keystream is XORed with plain text. Since RC4 is a stream cipher, XORing is done byte by byte and encrypted text is produced.
  4. This encrypted text is now sent to the intended receiver in encrypted form.

Example

Plain Text: 10011001

Keystream: 11000011

--------------------------------

Cipher Text: 01011010

Decryption

Steps

  1. For decryption, ciphertext and the same keystream is required which was used for encryption.
  2. The ciphertext and the keystream produce plain text using XOR Operation.
  3. The ciphertext is XOR’ed with keystream bit by bit to produce PlainText.

Example

Cipher Text: 01011010

Keystream: 11000011

----------------------

Plain Text: 10011001

Advantages of RC4

  1. RC4 is simple to use.
  2. Speed of operation is fast as compared to other cipher suites.
  3. RC4 cipher is easy to implement.
  4. RC4 does not consume more memory.
  5. For large streams of data, RC4 is the preferred choice.

Disadvantages of RC4

  1. If a strong MAC is not used, RC4 is vulnerable to a bit-flipping attack.
  2. RC4 does not support authentication.
  3. RC4 is not feasible to be implemented on small streams of data.

Attacks on RC4

RC4 is vulnerable to following attacks -

  1. Fluhrer, Mantin and Shamir attack
  2. Klein’s attack
  3. Combinatorial Problem
  4. Royal Holloway Attack
  5. Bar-mitzvah Attack
  6. NOMORE Attack

Rivest Cipher 4 (RC4) | Infosec (2)

Learn Applied Cryptography

Build your applied cryptography and cryptanalysis skills with 13 courses covering hashing, PKI, SSL/TLS, full disk encryption and more.

Start Learning

RC4 applications

RC4 application has been found in -

  • WPA
  • BitTorrent protocol encryption
  • WEP
  • Microsoft Office XP
  • Microsoft Point-to-Point Encryption
  • Transport Layer Security / Secure Sockets Layer
  • Secure Shell (optionally)
  • Remote Desktop Protocol
  • Kerberos
  • SASL Mechanism Digest-MD5
  • PDF
  • Skype

Sources

  1. https://www.geeksforgeeks.org/rc4-encryption-algorithm/
  2. https://paginas.fe.up.pt/~ei10109/ca/rc4.html
  3. https://tutorialspoint.dev/computer-science/computer-network-tutorials/computer-network-rc4-encryption-algorithm

Posted: January 11, 2021

Rivest Cipher 4 (RC4) | Infosec (3)

Nitesh Malviya

Nitesh Malviya is a Security Consultant. He has prior experience in Web Appsec, Mobile Appsec and VAPT. At present he works on IoT, Radio and Cloud Security and open to explore various domains of CyberSecurity. He can be reached on his personal blog - https://nitmalviya03.wordpress.com/ and Linkedin - https://www.linkedin.com/in/nitmalviya03/.

Learn applied cryptography and cryptanalysis

What you'll learn:

  • Cryptography fundamentals
  • Public key infrastructure
  • Blockchain technology
  • SSL and TLS
  • And more

Get Started

In this Series

  • Rivest Cipher 4 (RC4)
  • How does hashing work: Examples and video walkthrough
  • How does encryption work? Examples and video walkthrough
  • Planning for post-quantum cryptography: Impact, challenges and next steps
  • Beginner’s guide to the basics of data encryption
  • Structures of cryptography
  • Role of digital signatures in asymmetric cryptography
  • What is hom*omorphic encryption?
  • Encryption and etcd: The key to securing Kubernetes
  • Quantum cyberattacks: Preparing your organization for the unknown
  • An Introduction to asymmetric vs symmetric cryptography
  • Breaking misused stream ciphers
  • Entropy calculations
  • Blockchain and asymmetric cryptography
  • Security of the PKI ecosystem
  • Elliptic curve cryptography
  • Methods for attacking full disk encryption
  • Introduction to Public Key Infrastructure (PKI)
  • Introduction to the TLS/SSL cryptography protocol
  • Introduction to Diffie-Hellman Key Exchange
  • Introduction to the Rivest-Shamir-Adleman (RSA) encryption algorithm
  • Introduction to full disk encryption
  • 8 reasons you may not want to use VPNs
  • Understanding stream ciphers in cryptography
  • Cryptography Errors
  • Understanding block ciphers in cryptography
  • How to mitigate Credential Management Vulnerabilities
  • How To Exploit Credential Management Vulnerabilities
  • Poor Credential Management
  • How Is Cryptography Used In Applications?
  • Decrypting Downloaded Files
  • Introduction to hash functions
  • Introduction to Asymmetric Cryptography
  • The Advanced Encryption Standard (AES)
  • Fundamentals of symmetric and asymmetric cryptography
  • Case Studies in Poor Password Management
  • The ultimate guide to encryption key management
  • Principles of cryptography
  • Encryption vs Encoding
  • Introduction to Cryptanalysis
  • Secure Credential Management
  • Introduction to Blockchain
  • Blockchain Technology
  • Virtual Private Networks (VPNs)
  • Hash Functions
  • Asymmetric Cryptography
  • Fundamentals of Cryptography
  • Symmetric Cryptography
  • Introduction to cryptography
  • Best tools to perform steganography [updated 2020]

Related Bootcamps

  • ISC2 CISSP® Training Boot Camp
  • Certified Ethical Hacking Course: CEH Certification Boot Camp
  • OWASP Top 10 Training Boot Camp
  • CompTIA Security+ Training Boot Camp
  • Reverse Engineering Malware Training Boot Camp

Get certified and advance your career
  • Exam Pass Guarantee
  • Live instruction
  • CompTIA, ISACA, ISC2, Cisco, Microsoft and more!

View Certifications

Cryptography

How does hashing work: Examples and video walkthrough

Cryptography

How does encryption work? Examples and video walkthrough

Cryptography

Planning for post-quantum cryptography: Impact, challenges and next steps

Cryptography

Beginner’s guide to the basics of data encryption

Rivest Cipher 4 (RC4) | Infosec (2024)
Top Articles
Top pharmaceutical drugs by projected 2024 global sales | Statista
Deleted file recovery and file version history - Dropbox
Lowe's Garden Fence Roll
Woodward Avenue (M-1) - Automotive Heritage Trail - National Scenic Byway Foundation
Gamevault Agent
Retro Ride Teardrop
Poplar | Genus, Description, Major Species, & Facts
Www Movieswood Com
What Was D-Day Weegy
Little Rock Arkansas Craigslist
Cincinnati Bearcats roll to 66-13 win over Eastern Kentucky in season-opener
Winterset Rants And Raves
Keniakoop
Dumb Money
Colts seventh rotation of thin secondary raises concerns on roster evaluation
Fairy Liquid Near Me
7543460065
Roster Resource Orioles
R Cwbt
U Break It Near Me
/Www.usps.com/International/Passports.htm
How many days until 12 December - Calendarr
Evil Dead Rise Showtimes Near Pelican Cinemas
THE FINALS Best Settings and Options Guide
Craigslist Dubuque Iowa Pets
Blackboard Login Pjc
Unable to receive sms verification codes
Cable Cove Whale Watching
Giantbodybuilder.com
Section 408 Allegiant Stadium
Sandals Travel Agent Login
Best Town Hall 11
Tu Housing Portal
Blush Bootcamp Olathe
Mark Ronchetti Daughters
RUB MASSAGE AUSTIN
Aliciabibs
The Best Restaurants in Dublin - The MICHELIN Guide
Sukihana Backshots
Armageddon Time Showtimes Near Cmx Daytona 12
Sand Castle Parents Guide
Anderson Tribute Center Hood River
Florida Lottery Claim Appointment
Shell Gas Stations Prices
Breaking down the Stafford trade
Interminable Rooms
Euro area international trade in goods surplus €21.2 bn
300+ Unique Hair Salon Names 2024
Blog Pch
Wrentham Outlets Hours Sunday
Renfield Showtimes Near Regal The Loop & Rpx
Latest Posts
Article information

Author: Msgr. Benton Quitzon

Last Updated:

Views: 6113

Rating: 4.2 / 5 (43 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Msgr. Benton Quitzon

Birthday: 2001-08-13

Address: 96487 Kris Cliff, Teresiafurt, WI 95201

Phone: +9418513585781

Job: Senior Designer

Hobby: Calligraphy, Rowing, Vacation, Geocaching, Web surfing, Electronics, Electronics

Introduction: My name is Msgr. Benton Quitzon, I am a comfortable, charming, thankful, happy, adventurous, handsome, precious person who loves writing and wants to share my knowledge and understanding with you.