Skip to main content

Hardware random number generator using RTL-SDR radio frequency noise

Project description

RFDom

Hardware random number generator using radio frequency noise from RTL-SDR devices.

Overview

RFDom provides a drop-in replacement for Python's random module that generates cryptographically strong random numbers from atmospheric radio noise. It uses an RTL-SDR device to capture IQ samples, converts them to seeds via phase angle analysis and SHA-256 hashing, and feeds these into an LCG for deterministic random number generation.

Requirements

  • RTL-SDR device
  • RTL-TCP server running (e.g., rtl_tcp -a 0.0.0.0)
  • Python 3.x

Installation

pip install rfdom

Or from source:

git clone https://github.com/douxxtech/rfdom.git
cd rfdom
pip install -e .

Usage

from rfdom import RFDom

# Connect to RTL-TCP server
rng = RFDom(host="192.168.1.185", gain=49.6)

# Use like Python's random module
print(rng.random())                 # 0.0 to 1.0 [0.0, 1.0)
print(rng.randint(1, 100))          # Random integer [1, 100]
print(rng.choice(['a', 'b', 'c']))  # Random choice
print(rng.gauss(0, 1))              # Gaussian distribution

Supported Methods

  • random(), uniform(), randint(), randrange()
  • choice(), choices(), sample(), shuffle()
  • gauss(), expovariate()

License

This project is licensed under the GNU General Public License v3.0. See LICENSE for details.

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

rfdom-0.0.1.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rfdom-0.0.1-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file rfdom-0.0.1.tar.gz.

File metadata

  • Download URL: rfdom-0.0.1.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rfdom-0.0.1.tar.gz
Algorithm Hash digest
SHA256 660b27ba6d87481b7655bddabefed9100f106003cbefd16ec4629dc486cf9a27
MD5 4d267884f5a92145364366e8e58703eb
BLAKE2b-256 48eaa22e4ff3d36b1d0ae893abd47427f686eab01d19eefa213212a195f59b58

See more details on using hashes here.

Provenance

The following attestation bundles were made for rfdom-0.0.1.tar.gz:

Publisher: python-publish.yml on douxxtech/rfdom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rfdom-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rfdom-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rfdom-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 651526e4e12a5df9c30ff7609c510690e6f7b69304c991cefb29182609dd9105
MD5 899fb445278aed59844b6c8a4e3fe437
BLAKE2b-256 449838758e0b463c18cd5179be5ec3ac58a9e93d6ff1b572934cdbd0f06f7ca5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rfdom-0.0.1-py3-none-any.whl:

Publisher: python-publish.yml on douxxtech/rfdom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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