Skip to content
forked from manicmaniac/arc4

A small and insanely fast ARCFOUR (RC4) cipher implementation of Python

License

Notifications You must be signed in to change notification settings

paveu/arc4

Repository files navigation

arc4

https://travis-ci.org/manicmaniac/arc4.svg?branch=master

A small and insanely fast ARCFOUR (RC4) cipher implementation of Python.

  • Strongly focused on performance; entire source code is written in C.
  • Easily installable; single file with no dependency.

Benchmark

Below is benchmark metrics against 3 major RC4 implementations.

arc4 is 67 % faster than the de facto PyCrypto library. Also, 1889 % faster than pure-Python rc4 library.

arc40.332659006119
PyCrypto0.544879198074
rc46.60579204559

The whole benchmark code is in ./benchmark.py.

Install

Install from PyPI:

pip install arc4 

Or clone the repo and do install:

git clone https://github.com/manicmaniac/arc4.git cd arc4 python setup.py install 

Usage

fromarc4importARC4arc4=ARC4('key') cipher=arc4.encrypt('some plain text to encrypt')

Because RC4 is a stream cipher, you must initialize RC4 object in the beginning of each operations.

arc4=ARC4('key') arc4.decrypt(cipher)

Testing

python-munittestdiscover

License

This software is under the MIT License.

About

A small and insanely fast ARCFOUR (RC4) cipher implementation of Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C64.7%
  • Python35.3%