Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/listx/floop
Simple, fast, multithreaded PRNG
https://github.com/listx/floop
Last synced: about 1 month ago
JSON representation
Simple, fast, multithreaded PRNG
- Host: GitHub
- URL: https://github.com/listx/floop
- Owner: listx
- License: other
- Created: 2014-06-24T07:03:23.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-09T07:14:29.000Z (almost 10 years ago)
- Last Synced: 2024-11-07T01:07:41.649Z (3 months ago)
- Language: C
- Homepage:
- Size: 156 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FLOOP
## What is it?
Floop is a pseudorandom number generator that outputs a stream of bytes to STDOUT.
Its main purpose is to be used as a program to do (hopefully) secure wipes of storage devices such as hard drives and flash media.## Usage
Floop outputs *only to STDOUT*; if you want to write to a file, either pipe it to `dd`, or redirect STDOUT with `>`.
### Examples
Use 8 threads, with each thread generating 0x200000 elements of 8-byte words, and control it with `dd`.
```
./floop --threads 8 --thread-buf 0x200000 --count 0 | dd of=/some/file/or/device count=10 bs=128M
```The `--thread-buf` flag controls how many 8-byte words a thread will generate per iteration.
So, if `--thread-buf` is set to 2, each thread defined by `--threads` will generate 2 8-byte words, or 16 bytes, per iteration.
The iteration is controlled with `--count`, which when set to 0 will make floop run forever; this is why we pipe it to `dd` above.Using `dd` is also useful because it gives you information on how fast it was able to write the bytes to the destination.
#### Actual Use Case
The following was on a Western Digital Passport Ultra 1TB Portable External USB 3.0 Hard Drive (WDBZFP0010BBL-NESN).
```
$ floop -t 8 -b 0x200000 -c 0 | pv -bartpes 1000170586112 | dd bs=128M of=/dev/sde
dd: error writing ‘/dev/sde’: No space left on device==========================================================> ] 99% ETA 0:00:00
931GiB 3:28:57 [76.1MiB/s] [76.1MiB/s] [======================================================================>] 100%
0+9287529 records in
0+9287528 records out
1000170586112 bytes (1.0 TB) copied, 12592.6 s, 79.4 MB/s
```The speed is not impressive, because of the slow speed of the drive itself.
In comparison, using openssl (using AES encryption to encrypt a stream of 0s and using that data as output) with `openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/random bs=128 count=1 2>/dev/null | base64)" -nosalt