Pad Byte Monobit Randomness Check

Audit actual bit balance with caller Z threshold, no secure randomness/OTP pad certification and not a full randomness battery.

Description

A monobit statistic compares the counts of zero and one bits.

A monobit statistic compares the counts of zero and one bits.1

A balanced sample does not prove unpredictability, independence or suitability for a one-time pad. Use Pad Byte Monobit Randomness Check to evaluate the supplied inputs under the specific model below.

When to use Pad Byte Monobit Randomness Check

Use Pad Byte Monobit Randomness Check to evaluate the supplied inputs under the specific model below. Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.

How to use Pad Byte Monobit Randomness Check and understand its results

  1. Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
  2. Enter Pad byte values, Caller maximum absolute monobit z using the field table and validation rules below, then run the tool.
  3. Read Observed one bits, Observed zero bits, Signed monobit z, Within caller monobit z and interpret units, signs, ordering and placeholders as explained below.
  4. If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
Input fieldMeaningValue typeRequirement
padByteValuesPad byte valuesarray of numberRequired; constraints below
callerMaximumAbsoluteMonobitZCaller maximum absolute monobit znumberRequired; constraints below

Enter a nonempty array of at most 4096 integer bytes and a nonnegative caller z-score threshold. Count one bits, set bit count to eight times byte count and compute (2×ones−bits)/sqrt(bits). Return whether its absolute value is at most the threshold. This frequency-only check cannot establish unpredictability, independence or suitability of a one-time pad.

z = (2×oneBits−totalBits)/sqrt(totalBits); within = abs(z)≤callerThreshold

Field order, units and branch conditions follow the implementation explanation above.

Output fieldMeaningValue type
observedOneBitsObserved one bitsnumber
observedZeroBitsObserved zero bitsnumber
signedMonobitZSigned monobit znumber
withinCallerMonobitZWithin caller monobit zboolean
json
{
  "input": {
    "padByteValues": [
      0,
      255
    ],
    "callerMaximumAbsoluteMonobitZ": 2
  },
  "output": {
    "observedOneBits": 8,
    "observedZeroBits": 8,
    "signedMonobitZ": 0,
    "withinCallerMonobitZ": true
  }
}

Limitations and assumptions

A balanced sample does not prove unpredictability, independence or suitability for a one-time pad. Apply the exact scope and assumptions described above.

All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.

Alternative or Complementary methods

Use CSP Nonce Base64 Length Bits Check for a related task: A CSP nonce's encoded byte length is distinct from its unpredictable generation and per-response use.

Use Running-Key Reuse Detector for a related task: Aligned key streams can contain contiguous equal segments.

References

  1. Pad Byte Monobit Randomness Check — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies