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.

Blog article here

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.2.tar.gz (24.0 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.2-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rfdom-0.0.2.tar.gz
  • Upload date:
  • Size: 24.0 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.2.tar.gz
Algorithm Hash digest
SHA256 9ea7b6ec6fc0844219b8789b9e8b11cab8ab18ebcc795710c2dd97e94d64c29d
MD5 88fb4f2e44e2cda66ae94c14cb8d49cc
BLAKE2b-256 bd8a85fb6bc4fa14225645b032cdc90add6d5a6b4f9a16f8350681b29c5233c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rfdom-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: rfdom-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 24.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 32109172b9ed2429abdd27db416ec9d936bde31a10ac2a4fcf79692b2857ad2d
MD5 3088279dfe8bd91e532b8b31958a59d6
BLAKE2b-256 2a0d4074306cec5bbad4e8f032d3e0e4e4a764ef5d276da5cb8931bbf7b49e42

See more details on using hashes here.

Provenance

The following attestation bundles were made for rfdom-0.0.2-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