Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
project_bias — High-performance, bias-free cryptographic engine in Ada/SPARK leveraging native OS entropy pools. | Kitploit
Tools/GitHubGitHub/eliavila10/project_bias
Encryption/Decryption ToolsCryptographyUtilities & Frameworks
GitHubeliavila10/project_bias

project_bias

High-performance, bias-free cryptographic engine in Ada/SPARK leveraging native OS entropy pools.

View Repository
241 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

project_bias

A high-performance, bias-free cryptographic stream engine written in Ada and formally verified with SPARK. The engine guarantees zero statistical bias when mapping raw entropy into custom alphabets by discarding modulo-biased values, drawing security bytes directly from native OS kernel pools.

Verification Level

  • SPARK Level 4 (Formal Verification): Fully proven to ensure absence of run-time errors (AoRTE) and compliance with functional contracts.
  • Toolchain Compatibility: Validated using both GNAT/SPARK Pro 2021 and the latest community SPARK toolchains available via Alire.

Core Architecture & Entropy Pools

The engine interfaces directly with low-level OS APIs via Interfaces.C to eliminate abstraction layers and latency:

  • ProcessPrng (Primary): Utilizes the modern User-Mode OS Entropy Provider (ProcessPrng) as the main source of raw security bytes.
  • BCryptGenRandom (Fallback): Implements a robust secondary fallback layer using the Windows CNG API (bcrypt.dll).

Mathematical Bound For Truncation

root@kitploit:~
-- Formula applied to enforce uniform distribution without modulo bias:
-- Formul = Charset'Length * (256 / Charset'Length) - 1
-- Any extracted byte > Formula'result = it is ruled out

Empirical Validation (Full 1 TB Audit Log)

To verify the mathematical uniformity of the bias-free mapping algorithm, the engine was subjected to a stress test generating 1,010,762,506,054 characters (over 1 Terabyte) from a 69-character alphabet.

Below is the complete, raw verification log generated by the analyzer suite on 2026-08-06:

root@kitploit:~
=========================================================================================================================================================================================
=== = = = = = = = = = = = = = = = = = = = = = = = = = = = = Date : 2026-08-06| Day : Thursday | Hour : 05:27 AM = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ===
=========================================================================================================================================================================================

Charset                    => 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#%_*- 
Charset'Length             => 69

--- Character Frequency [ Total Chars 1010762506054 ] ---

Character => '0' Appear   => 14649023982 times
Character => '1' Appear   => 14648736386 times
Character => '2' Appear   => 14648696512 times
Character => '3' Appear   => 14648653062 times
Character => '4' Appear   => 14648843467 times
Character => '5' Appear   => 14648860346 times
Character => '6' Appear   => 14648673812 times
Character => '7' Appear   => 14648829622 times
Character => '8' Appear   => 14648564528 times
Character => '9' Appear   => 14648559744 times
Character => 'A' Appear   => 14648686958 times
Character => 'B' Appear   => 14648868103 times
Character => 'C' Appear   => 14648717763 times
Character => 'D' Appear   => 14648704036 times
Character => 'E' Appear   => 14648711001 times
Character => 'F' Appear   => 14648733166 times
Character => 'G' Appear   => 14648527493 times
Character => 'H' Appear   => 14648868334 times
Character => 'I' Appear   => 14648851708 times
Character => 'J' Appear   => 14648737136 times
Character => 'K' Appear   => 14648711054 times
Character => 'L' Appear   => 14648833717 times
Character => 'M' Appear   => 14648761212 times
Character => 'N' Appear   => 14648842295 times
Character => 'O' Appear   => 14648607563 times
Character => 'P' Appear   => 14648743969 times
Character => 'Q' Appear   => 14648701143 times
Character => 'R' Appear   => 14648617680 times
Character => 'S' Appear   => 14648675946 times
Character => 'T' Appear   => 14648679521 times
Character => 'U' Appear   => 14648377186 times
Character => 'V' Appear   => 14648803564 times
Character => 'W' Appear   => 14648826843 times
Character => 'X' Appear   => 14648814157 times
Character => 'Y' Appear   => 14648745507 times
Character => 'Z' Appear   => 14648797929 times
Character => 'a' Appear   => 14648855410 times
Character => 'b' Appear   => 14648660410 times
Character => 'c' Appear   => 14648704634 times
Character => 'd' Appear   => 14648752856 times
Character => 'e' Appear   => 14648570222 times
Character => 'f' Appear   => 14649012159 times
Character => 'g' Appear   => 14648541356 times
Character => 'h' Appear   => 14648683165 times
Character => 'i' Appear   => 14648788877 times
Character => 'j' Appear   => 14648773938 times
Character => 'k' Appear   => 14648796827 times
Character => 'l' Appear   => 14648580917 times
Character => 'm' Appear   => 14648806120 times
Character => 'n' Appear   => 14648548612 times
Character => 'o' Appear   => 14648765478 times
Character => 'p' Appear   => 14648801238 times
Character => 'q' Appear   => 14648873563 times
Character => 'r' Appear   => 14648752656 times
Character => 's' Appear   => 14648578407 times
Character => 't' Appear   => 14648875270 times
Character => 'u' Appear   => 14648683708 times
Character => 'v' Appear   => 14648869846 times
Character => 'w' Appear   => 14648816676 times
Character => 'x' Appear   => 14648601253 times
Character => 'y' Appear   => 14648776500 times
Character => 'z' Appear   => 14648684743 times
Character => '!' Appear   => 14648535737 times
Character => '@' Appear   => 14648510145 times
Character => '#' Appear   => 14648629803 times
Character => '%' Appear   => 14649098064 times
Character => '_' Appear   => 14648723722 times
Character => '*' Appear   => 14648785828 times
Character => '-' Appear   => 14648781469 times

-------------------------------------------------------------------------------------------

Max Repeats               => Character '0' => 14649023982 times
Min Repeats               => Character 'U' => 14648377186 times

Divergence Variance Delta => 646796 units.
Theoretical Ideal Average => 14648731971.80

Real Standard Deviation   => 122205.17
Percet Deviation          => 0.00 %

Real Time Duration        => 7780.991359500
Process MB/s              => 123.88MB/s

Free Unbiased Range       => 0 .. 206
Unused Bytes              => 49
Reject Percent            => 19.14 %
Free Unbiased Formula     => Charset'Length * (256 / Charset'Length) - 1

Entropy Source            => ProcessPrng (Principal) - BcryptGenRandom (Secondary)
Entropy Default           => ProcessPrng
Entropy Fallback          => BcryptGenRandom

-------------------------------------------------------------------------------------------

Distribution Stability    => 100.00 % (Optimal Objective > 99.50%)
Audit Verdict             => [ PERFECT ] -> Uniformity matches military-grade physical noise.

-------------------------------------------------------------------------------------------

Structure

  • src/ProcessPrng_Wrapper.ad[s|b]: Binding for the primary modern Windows Kernel PRNG.
  • src/BcryptGenRandom_Wrapper.ad[s|b]: Secondary cryptographic fallback binding.
  • src/Chain_Generator.ad[s|b]: Main state machine orchestrating bias-free extraction.
  • src/Math_Functions.ad[s|b]: Formal pre/postconditions for mapping operations.

Build and Run

root@kitploit:~
alr run
Download Tool