Skip to main content

🎲 The truth external PyPI random package, have true_rand, virt_rand, hash_rand, ...

Project description

MultiRandom 🎲

A comprehensive library for exploring and generating randomness across the spectrum—from true physical entropy to mathematical pseudo-randomness and everything in between.

🌟 Overview

MultiRandom is designed for developers, researchers, and hobbyists who want to understand high-quality randomness. It provides tools to fetch random data from quantum sources, physical human interaction, and modern mathematical algorithms.

[!WARNING] Security Note: This library contains both "True" and "Pseudo" random sources. While some sources (like QRNG) are highly secure, others (like LCGs) are provided for educational purposes and include reverse logic to demonstrate their insecurity. Always use the appropriate generator for your use case.


🏗 Project Structure

MultiRandom/
├── true_rand/          # Physical & Hardware Entropy
│   ├── rand_via_clicks.py       # Human-in-the-loop entropy (Left/Right/Middle/Mixed)
│   └── rand_using_online_api.py # Quantum & Hardware APIs (random.org, ANU QRNG, Roll-API)
├── virt_rand/          # Mathematical Randomness (PRNGs)
│   ├── xor_shift.py             # XorShift & Xoshiro Family (Original, Scrambled, modern)
│   └── rand_using_virt_lng.py   # Linear Congruential Generators (LCGs)
├── hash_rand/          # Hash-based Generators
│   └── sha_rand.py              # SHA-1, SHA-256, SHA-512 based PRNGs
└── requirements.txt    # Project dependencies

🛠 Features & Usage

1. Human-in-the-loop Entropy (true_rand)

Uses pyautogui and Windows API to capture sub-microsecond timing jitter and spatial coordinates from physical mouse clicks.

from true_rand.rand_via_clicks import MultiRandomUsingBetweenMixedClicks

# Requires a sequence of Left -> Right -> Middle clicks to seed
gen = MultiRandomUsingBetweenMixedClicks()
print(gen.random())

2. Quantum & Hardware APIs (true_rand)

Fetch "True" randomness from remote physical processes.

  • Australian National University (ANU): Quantum vacuum noise.
  • Random.org: Atmospheric noise.
  • Roll-API: Physical dice rolling hardware.

3. Bit-Shift Generators (virt_rand)

Implementations of the most popular mathematical generators used in modern systems.

  • Original XorShift: Includes reverse_roll() to demonstrate mathematical reversibility.
  • Scrambled Variants: Xorwow (CUDA), Xorshift+ (V8/Webkit).
  • Modern Xoshiro: Xoshiro256**, Xoroshiro128++ (Minecraft Java 1.18+).

4. Mathematical LCGs (virt_rand)

Classic Linear Congruential Generators with customizable shift parameters. Ideal for understanding how modular arithmetic creates pseudo-random patterns.


🚀 Getting Started

Installation

  1. Clone the repository.
  2. Install dependencies:
    pip install -r requirements.txt
    

Running Tests

Most modules include a built-in test suite in their if __name__ == "__main__": block.

python virt_rand/xor_shift.py

📺 Educational Resources

This project was built with a focus on understanding the limits of computer-generated randomness. For more context, check out:


📜 License

Provided for educational and research purposes.

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

multirandom-0.0.1.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

multirandom-0.0.1-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: multirandom-0.0.1.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for multirandom-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d3360597473c14221f3c46b13cf5213ca8d601fb6898c171d56cad5a9becb0df
MD5 7e2482cd6b6f5ee862a8ecbc33b604a7
BLAKE2b-256 355f35d75d208787700d5a6fa89365ee9b6e9ed16d6f25bfa55a0e113f8ebfd4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: multirandom-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for multirandom-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b569b9ca2d96ac77257b7bfe6a0094e746e2e7ce0a76cf2c234cddbea3927704
MD5 846643ef1ef5c739c8cbbec7498fe200
BLAKE2b-256 328eb9d11c49591c6cdb11b1c2d0f4f1214d811a74446e10079ea6e828184f66

See more details on using hashes here.

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