From 476bc0e0b5e6c65afbb358b049a413105f5db14e Mon Sep 17 00:00:00 2001 From: Flux Date: Fri, 27 Dec 2024 23:30:48 +0200 Subject: [PATCH] Update README.md --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index df64bc2..8440bdb 100644 --- a/README.md +++ b/README.md @@ -1 +1,41 @@ -# ocelli \ No newline at end of file +# ocelli: Camera-Based TRNG + +**Ocelli** is a Rust application that uses a camera to generate high-quality random entropy by analyzing pixel intensity differences between consecutive frames. + +## Features + +- **Camera-Based Entropy**: Leverages grayscale pixel intensity differences to produce entropy bits. +- **Shannon Entropy Validation**: Filters entropy data to ensure high randomness quality. +- **Van Neumann Whitening**: Optional bias removal for unbiased entropy output. +- **Dynamic Frame Handling**: Automatically captures frames based on resolution and entropy requirements. + +## Requirements + +- OpenCV (with Rust bindings) + +## Usage + +Run the program with the desired parameters: + +```bash +cargo run -- [-w] +``` +### Parameters: +- ``: Number of bytes of entropy to generate. +- ``: Camera resolution width. +- ``: Camera resolution height. +- `-w`: (Optional) Enable Van Neumann whitening for unbiased entropy. + +### Example: +Generate 1000 bytes of entropy at 1920x1080 resolution with whitening enabled: +```bash +cargo run -- 1000 1920 1080 -w +``` + +--- + +## Output + +- **Hexadecimal Entropy**: Generated entropy is output as a hexadecimal string. +- **Processing Time**: Reports how long the entropy generation took. +- **Shannon Entropy**: Displays the Shannon entropy of the final output.