GithubHelp home page GithubHelp logo

rc4's Introduction

RC4 Key and Weakness Testing

Introduction

This repository contains a C++ implementation of the RC4 encryption algorithm along with several tests to demonstrate its vulnerabilities and weaknesses.

Description

RC4 is a key stream symmetric encryption algorithm, known for its simplicity and efficiency. However, it has several weaknesses that make it vulnerable to certain attacks. This project tests these vulnerabilities, focusing on key scheduling and keystream generation flaws.

This project implements several tests to evaluate weaknesses in the RC4 encryption algorithm. The program provides three main tests:

  1. Probability of Second Byte Being Zero: Calculates the probability of the second byte being zero after RC4 key scheduling and keystream generation.
  2. Probability of Two Consecutive Zero Bytes: Evaluates the probability of generating two consecutive zero bytes in the keystream.
  3. Related Key Attack and Hamming Distance: Demonstrates a related key attack on RC4, measuring the Hamming distance between keystreams generated with two related keys.

Features

  • Custom and Random Key Generation: Allows users to manually enter a 128-bit key or generate a random one.
  • Detailed Testing Options: Users can select from three different tests to evaluate RC4 weaknesses.
  • Empirical and Theoretical Probability Calculations: Provides both empirical and theoretical probabilities for RC4 weaknesses.

Worth mentioning: I know this code is written badly as it's an old code of mine. I will rewrite it and fix bugs as soon as possible.

rc4's People

Contributors

v1rushb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.