Skip to main content

FastRandom

A shell tool to generate random bytes extremely fast. Uses multiple CPU cores and both AES-NI and ChaCha20 to facilitate even higher utilisation of processing capacity. The output may be used for scrubbing disks, even the fastest NVME SSDs, or for any other purpose where large amounts of irreproducible random bytes are needed.

Prefer redirection > instead of pipes and dd for maximal speed. This works with both files and block devices.

pip install fastrandom
fastrandom -p > /tmp/file.dat    # -p for progress indication
[fastrandom]     15,451 MiB generated at 3.48 GB/s
[Errno 28] No space left on device

This tool is about 30 % faster than the best contender that I am aware of, openssl enc -aes-256-ctr -in /dev/zero, many times faster than any popular random number generator (like PCG64) and about 50 times faster than /dev/urandom. Generating to /dev/null I can reach 11 GB/s on a six-core CPU but any actual devices that I have access to, including NVME 4.0 SSDs and even ramdisks, are slower. Please drop a Github issue if you find something faster.

Metadata

Release files for fastrandom 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastrandom 0.1.0
File Size Uploaded
fastrandom-0.1.0.tar.gz 3.6 kB Details

Release files / fastrandom-0.1.0.tar.gz

Download URL fastrandom-0.1.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
619f9a2982e4b85d11971c84fc3c24ccd4f37f7d685b7e06d824b896db374490
BLAKE2b-256 checksum
How to use checksums
69ab1844dd018e32f2660b8e105ccb4e0cd0c2efe8b55d19a48bc77588c85f45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page