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

instrument implementation / implementation-contract

Diffie-Hellman Key Exchange Toy implementation

A source-bound implementation contract for Diffie-Hellman Key Exchange Toy; 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
t4-112
Effect
Computation or source lookup only

Input and validation requirements

The specification does not state validation behavior for p=0, primitive-root versus subgroup-generator semantics, or negative private values. These inputs expose undefined arithmetic and convention-dependent behavior that can cause rejection inconsistencies, degenerate secrets, or incompatible 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": {
    "p": 23,
    "g": 5,
    "a": 6,
    "b": 15
  },
  "expected_outputs": {
    "A": 8,
    "B": 19,
    "shared_from_B_to_a": 2,
    "shared_from_A_to_b": 2
  },
  "working": "A = 5^6 mod 23. 5^2 = 25 mod 23 = 2; 5^4 = 2^2 = 4; 5^6 = 5^4 * 5^2 = 4 * 2 = 8 mod 23. B = 5^15 mod 23. 5^8 = 4^2 = 16; 5^15 = 5^8 * 5^4 * 5^2 * 5 = 16 * 4 * 2 * 5 = 640; 640 mod 23 = 19. B^a = 19^6 mod 23. 19^2 = 361 mod 23 = 16; 19^4 = 16^2 = 256 mod 23 = 3; 19^6 = 3 * 16 = 48 mod 23 = 2. A^b = 8^15 mod 23. 8^2 = 64 mod 23 = 18; 8^4 = 18^2 = 324 mod 23 = 2; 8^8 = 2^2 = 4; 8^15 = 8^8 * 8^4 * 8^2 * 8 = 4 * 2 * 18 * 8 = 1152; 1152 mod 23 = 2."
}

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-tranche4/tranche4-results.json