Skip to main content

Python interface to Intel hardware rng

Project 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rdrand-0.5.0.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file rdrand-0.5.0.tar.gz.

File metadata

  • Download URL: rdrand-0.5.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rdrand-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ed7b13f0bb373623550727d63d23d80b2ab2bf885fbcbb410a88120af6af5ceb
MD5 ac9f1d987bcd91358c3a737f091d242a
BLAKE2b-256 45b133d2d0b114286a64957880f83607f6ab9db09011b6b966ac482929fab1a2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page