Coder Social home page Coder Social logo

ca.rng's Introduction

CA.rng

Cellular automata (CA) are a class of discrete algorithms that, despite their simplicity, exhibit considerable complexity. Some CAs appear to represent physical phenomena, others display nothing interesting whatsoever. The general trend, however, is that the self-interaction and non-linearity of CAs results in emergent behavior. Other well known examples are Conway's "Game of Life" and the lattice-boltzmann formulation of hydrodynamics.

CA.rng is a set of utilities that implement a general computational framework for CAs by bitwise arithmetic. The binary logic is encoded such that the compiler will load and operate in register space, for high performance applications.

Three CA utilies are included: (1) a general CA code that outputs the bitstream for display, (2) a pseudo-random number generator and (3) a toy crypographic cipher based on a 256-bit CA to serve as the S-box in a Feistel network . All examples apply the "rule 30" CA for demonstration.

Installing

Compilation is simple and relies on only standard libraries. Please consult the source code for the specific utility for details.

Running the examples

Running the generic code "rule30.c" gives visual output of the self-organization pattern of triangles that is well known with the rule 30 CA:

$ ./r30

...

The example code "rule30.rng.c" outputs a stream of pseudo random numbers to stdout. For convenience of verifying randomness, a small code to calculate the autocorrelation function for a sequence S, <S(t)S(t')>, is included.

Finally, a toy symmetric block cipher, XR30256, is included in the code "rule30.crypt.c". This cipher implements a 16 round Feistel network using an F-function that consists of CA256 (4 iterations of the rule 30 CA with cyclic boundary conditions). The input to the F function is initially the right or left plaintext block of length 128 bits expanded to 256 and then XOR'd with the subkey before running through the CA. The key scheduler is a 4-part decomposition.

Authors

home page
google scholar
research gate
linkedin
web profile

License

This project is licensed under the GNU General Public License v3, please see GPL_license.txt for details.

ca.rng's People

Contributors

jbelof avatar

Watchers

James Cloos avatar  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.