GithubHelp home page GithubHelp logo

thoughtpolice / dev-randomdotorg Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 152 KB

Linux kernel driver interface to random.org, providing an atmosphere-powered random block device

License: Other

C 95.08% Shell 1.02% Perl 3.90%

dev-randomdotorg's Introduction

Linux kernel module for random.org

Is /dev/urandom just not good enough for you, while that lazy /dev/random guy just sits in your base, stealing all your entropy? Yeah, I feel that way too (except not really, but maybe you've been there!)

To that end, I've written a Linux kernel module that provides an interface to random.org, which is a service that provides psuedo-random data based on samples of atmospheric noise. Now all your software randomness can be provided by the skies themselves!

This module has been developed and tested primarily on Ubuntu 12.04 which is sporting a Linux 3.2 kernel, but patches for other distributions and kernel versions are certainly welcome!

Installation

Clone the code, then just run:

./configure # will need perl
make

And afterwords you should have a shiny randomdotorg.ko kernel module! Load it using the ./load script:

$ sudo ./load

This will call insmod on the driver, and create the /dev/randomdotorg device.

And make sure it's there:

$ lsmod | grep randomdotorg
randomdotorg           12432  0
$ dmesg | grep randomdotorg
[ 2488.475038] randomdotorg: loaded; nbufsz = 16384
$ 

Now you should have a special device called /dev/randomdotorg that's similar to /dev/urandom or /dev/random but powered by the chaos of the atmosphere!

If you want to unload it, just call the ./unload script which will rmmod the driver and rm the device:

$ sudo ./unload

Rational, Security and other caveats

This is obviously just a silly joke driver, mostly intended as a simple example of a linux driver.

You should not use this module for generating secure random numbers. Continue to use /dev/random or /dev/urandom for that (why would you push secure random numbers off to a service?)

This driver does not use SSL. That would be ridiculous but as a result you can be MITM'd, only reinforcing the point this shouldn't be used for any secret kind of randomness.

That said, maybe you will find it educational or silly.

Join in

File bugs in the GitHub issue tracker.

Master git repository:

  • git clone https://github.com/thoughtpolice/dev-randomdotorg.git

There's also a BitBucket mirror:

  • git clone https://bitbucket.org/thoughtpolice/dev-randomdotorg.git

Authors

See AUTHORS.txt.

License

Technically I release this software under the MIT license, although randomdotorg.c's MODULE_LICENSE field says "Dual MIT/GPL." This is mostly because the kernels' module loading facilities don't recognize "MIT" alone as a valid module license, and I want the module to be warning free when building and loading. Maybe this is a stupid concern, but nonetheless you could easily incorporate this code into your own project under the GPL without any issue.

See LICENSE.txt for terms of copyright and redistribution.

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.