Guth
NewsDocs
Page actions
View as Markdown ↗
Explore MCP tools ↗

instrument implementation / implementation-contract

Base Frequency Analyzer (Cryptanalysis Teaching Tool) implementation

A source-bound implementation contract for Base Frequency Analyzer (Cryptanalysis Teaching Tool); deployment and executable qualification remain separate.

Status: VERIFIED_CLEANLifecycle: implementation-contract

Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

Record owner
Guth Instruments
Lifecycle
verified-clean
Evidence ID
t7-048
Effect
Computation or source lookup only

Input and validation requirements

The specification exposes undefined-result hazards for an empty ciphertext and for zero-probability reference entries. It also leaves nonletter handling and reference-table units unspecified; different plausible conventions produce rejection or materially different chi-squared results.

Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

{
  "inputs": {
    "ciphertext_counts": {
      "E": 100
    },
    "total": 100,
    "preprocessing": "A-Z only; all non-E letters have count 0"
  },
  "expected_outputs": {
    "frequency_percent": {
      "E": 100,
      "all_other_letters": 0
    },
    "chi_squared": 688.74015748,
    "top_candidate_mappings": "not uniquely determined by the specified formulas"
  },
  "reference_data": {
    "english_frequency_percent_rounded": {
      "E": 12.7,
      "T": 9.1,
      "A": 8.2,
      "O": 7.5,
      "I": 7,
      "N": 6.7,
      "S": 6.3,
      "H": 6.1,
      "R": 6,
      "D": 4.3,
      "L": 4,
      "C": 2.8,
      "U": 2.8,
      "M": 2.4,
      "W": 2.4,
      "F": 2.2,
      "G": 2,
      "Y": 2,
      "P": 1.9,
      "B": 1.5,
      "V": 1,
      "K": 0.8,
      "J": 0.15,
      "X": 0.15,
      "Q": 0.1,
      "Z": 0.07
    },
    "normalized_integer_weights": {
      "E": 1270,
      "T": 910,
      "A": 820,
      "O": 750,
      "I": 700,
      "N": 670,
      "S": 630,
      "H": 610,
      "R": 600,
      "D": 430,
      "L": 400,
      "C": 280,
      "U": 280,
      "M": 240,
      "W": 240,
      "F": 220,
      "G": 200,
      "Y": 200,
      "P": 190,
      "B": 150,
      "V": 100,
      "K": 80,
      "J": 15,
      "X": 15,
      "Q": 10,
      "Z": 7
    },
    "normalization_sum": 10017,
    "source_convention": "widely tabulated standard English letter-frequency values; rounded table normalized for computation"
  },
  "working": "Q=10017. p_E=1270/10017. For 100 observed E characters, expected E=100*(1270/10017)=12.6785105 and expected all other letters are 100*p_i. Using the equivalent shortcut chi-squared=sum(O_i^2/E_i)-N, only E has O_i nonzero: chi-squared=100^2/(100*1270/10017)-100=100*(10017/1270)-100=688.74015748. Frequency percent for E=100*100/100=100.0%; every other letter=100*0/100=0.0%."
}

Other records

Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

  • VERIFIED_LEDGER.json
  • evidence-tranche7/tranche7-results.json