Hex-Dump Entropy Per Block

Compute actual empirical byte entropy per explicit hex block including short final blocks, not ideal key entropy or secure randomness.

Description

Empirical byte entropy summarizes the observed distribution in a block.

Empirical byte entropy summarizes the observed distribution in a block.1

High entropy does not distinguish encryption, compression or secure random generation by itself. Use Hex-Dump Entropy Per Block to evaluate the supplied inputs under the specific model below.

When to use Hex-Dump Entropy Per Block

Use Hex-Dump Entropy Per Block 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 Hex-Dump Entropy Per Block 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 Hex dump, Block bytes using the field table and validation rules below, then run the tool.
  3. Read Block start byte offsets, Observed block byte counts, Block entropy bits per byte 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
hexDumpHex dumpstringRequired; constraints below
blockBytesBlock bytesnumberRequired; constraints below

Enter nonempty separator-free hexadecimal text representing whole bytes, with at most 4096 decoded bytes, and an integer block size from 1 to 4096 bytes. Divide into blocks including a final short block, count byte values and report byte start offsets, block lengths and empirical Shannon entropy in bits per byte. A high histogram entropy does not establish cryptographic randomness.

H(block) = −ΣbyteValues p×log2(p); offsets = 0,blockSize,2×blockSize,…

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

Output fieldMeaningValue type
blockStartByteOffsetsBlock start byte offsetsarray of number
observedBlockByteCountsObserved block byte countsarray of number
blockEntropyBitsPerByteBlock entropy bits per bytearray of number
json
{
  "input": {
    "hexDump": "0001ffff",
    "blockBytes": 2
  },
  "output": {
    "blockStartByteOffsets": [
      0,
      2
    ],
    "observedBlockByteCounts": [
      2,
      2
    ],
    "blockEntropyBitsPerByte": [
      1,
      0
    ]
  }
}

Limitations and assumptions

High entropy does not distinguish encryption, compression or secure random generation by itself. 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 Pad Byte Monobit Randomness Check for a related task: A monobit statistic compares the counts of zero and one bits.

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

References

  1. Hex-Dump Entropy Per Block — tool.io

Similar or alternative tools

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