Git Product home page Git Product logo

ciphersaber's Introduction

"Ciphersaber" RC4 implementation

Copyright (c) 1997 Bart Massey

[This program is licensed under the "MIT License". Please see the file COPYING in this distribution for license terms.]

These are implementations of the "Ciphersaber" RC4 stream cipher. See the file ciphersaber.html in this distribution for the late-90s webpage describing Ciphersaber, or see the currently-available version. Maybe it's a little silly, but it's a lot of fun.

There are three implementations here:

  • A C "reference" implementation I wrote about 1997 is supplied for correctness purposes and as a performance baseline. (I made some cosmetic changes to this code to get it to cleanly compile in 2012.) The code is kind of inelegant, but it works.

  • I wrote a more interesting implementation in 2012 in Haskell, using Data.ByteString for the IO and an IOUArray for the RC4 state. It's kind of crufty, and was 14x slower than the C version in 2012, but it works correctly even on large files. (I fixed a bug in 2016, but it should not affect performance.)

  • I did a third implementation in 2016 in Rust. It works, but various pieces still need to be pushed upstream before it is stable. I did some more work on it in late 2017. It currently is (temporarily) UNIX-only.

  • In 2016 I did a bunch of work/rework, adding "Ciphersaber 2" support (basically 20 repetitions of the key initialization to work around some known security issues) and support for reading the key from /dev/tty to all the implementations.

Enjoy.

Bart Massey
2017-11-27

ciphersaber's People

Contributors

bartmassey avatar nueh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ciphersaber's Issues

Performance tests

Add performance tests you used to measure the performance in the makefile so that I can try on some optimizations and compare.

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.