New: Byte Entropy

Copy the code, keep the proof.

Small, verified Rust parts for AI data processing and security. Copy the source into your project, or use them from Python.

Verification
Matches scipy.stats.entropy
Sample data
4,000/ 4,000 cases
Property-based testingPython · scipy.stats.entropy 1.14
Benchmarks
Up to 35× faster
Sample data
kura-rs (Rust)scipy.stats.entropy
How kura-rs works
  1. 1
    Copy the code

    Rust parts are plain source files. kura add <name> copies them into your project, and from then on they are yours to read and change.

  2. 2
    Or install for Python

    The same parts are built with PyO3 and published as one package, kura-rs.

  3. 3
    Keep the proof

    Each part lists the reference it was tested against, how many cases passed, and where it gets faster than the reference.

Install
Byte Entropy
cargo install kura-rs
kura add byte-entropy
use crate::parts::byte_entropy::windows;

for w in windows(&binary, 4096) {
    if w.entropy > 7.2 {
        println!("offset {:#x}: likely packed ({:.2} bits/byte)", w.offset, w.entropy);
    }
}