Skip to content

Commit

Permalink
Doc cleanup, to work better with the cheese shop
Browse files Browse the repository at this point in the history
  • Loading branch information
stillson committed Dec 15, 2013
1 parent 61d6630 commit 394df34
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 81 deletions.
44 changes: 0 additions & 44 deletions PKG-INFO

This file was deleted.

10 changes: 4 additions & 6 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
RDRAND
======

A module to use Intel's hardware RNG with python's random class

USAGE
-----

#easy_install rdrand
#python
#easy_install rdrand
#python

>>>from rdrand import RdRandom
>>>r = RdRandom()
>>>from rdrand import RdRandom
>>>r = RdRandom()


At this point, ``r`` will behave just like ``random``
Expand Down
32 changes: 1 addition & 31 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,7 @@
setup(name='rdrand',
version='0.9.9',
description="Python interface to Intel hardware rng",
long_description= \
"""RDRAND
======
A module to use Intel's hardware RNG with python's random class
USAGE
-----
#easy_install rdrand
#python
>>>from rdrand import RdRandom
>>>r = RdRandom()
At this point, ``r`` will behave just like ``random``
``RdRandom`` is a subclass of ``random.Random``, and behaves like ``random.Random``,
but it uses inline assembly to access the hardware RNG. This should be
a cryptographically secure drop in replacement for ``random``, if the Intel random number
generator is valid. No mitigation is done to modify the output of the hardware to prevent problems with Intel's implementation. Caveat Emptor.
Also, it includes the function ``r.getrandombytes(i)`` where ``i`` is a positive int. This returns a string
of length ``i`` filled with random bytes, which is ideal for generating a key or using directly in a protocol.
Please note, as with any security solution, it is possible to subvert this. Please understand the full context before deploying. I am not liable for misuse or clever hackers.
Works with 32 and 64 bit builds of python.
Works with python2 and python3.
""",
long_description= "".join(open('setup.rst').readlines()),
author="Chris Stillson",
author_email="[email protected]",
url='https://github.com/stillson/rdrand',
Expand Down
29 changes: 29 additions & 0 deletions setup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
RDRAND
------

A module to use Intel's hardware RNG with python's random class

USAGE
=====


| # easy_install rdrand
| # python
>>> from rdrand import RdRandom
>>> r = RdRandom()

At this point, ``r`` will behave just like ``random``

``RdRandom`` is a subclass of ``random.Random``, and behaves like ``random.Random``, but it uses inline assembly to access the hardware RNG. This should be a cryptographically secure drop in replacement for ``random``, if the Intel random number generator is valid. No mitigation is done to modify the output of the hardware to prevent problems with Intel's implementation. Caveat Emptor.

Also, it includes the function ``r.getrandombytes(i)`` where ``i`` is a positive int. This returns a string of length ``i`` filled with random bytes, which is ideal for generating a key or using directly in a protocol.

Please note, as with any security solution, it is possible to subvert this. Please understand the full context before deploying. I am not liable for misuse or clever hackers.

Works with 32 and 64 bit builds of python.

Works with python2 and python3.

Planned for version 2: various mitigations to whiten the random numbers in case you don't trust Intel.

0 comments on commit 394df34

Please sign in to comment.