propagate

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package propagate is the toolkit's fast constraint propagator for the "is the next state a table lookup of some combined index?" family of hypotheses. Given a corpus of (inputs → output) byte transitions and a wiring (which inputs feed the index and how they combine), it tries to fill a single 256-entry table directly from the data and reports conflicts. Zero conflicts means the wiring's single-lookup form is consistent; a nonzero floor across every wiring is a theorem that the output is not a function of any such merged index — which is exactly the wall the alias high-byte recurrence runs into.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constraint

type Constraint struct {
	HPrev, HCur, Eo, HNext uint8
}

Constraint is one observed high-byte transition.

type Op

type Op int

Op combines two index bytes.

const (
	Xor Op = iota
	Add
	Sub
)

func (Op) String

func (o Op) String() string

type Result

type Result struct {
	Wiring    Wiring
	Keys      int // distinct index values observed
	Conflicts int // index values mapping to more than one HNext
}

Result reports how a wiring fared.

func Propagate

func Propagate(w Wiring, cons []Constraint) Result

Propagate fills a single 256-entry table T[index] = HNext directly from the constraints and counts conflicts (an index already bound to a different output). Zero conflicts means HNext is a function of this wiring's merged index.

type Source

type Source int

Source selects one input byte of a transition.

const (
	HPrev Source = iota // H[k-1]
	HCur                // H[k]
	Eo                  // odd ciphertext byte eo[k]
)

func (Source) String

func (s Source) String() string

type Wiring

type Wiring struct {
	Inputs []Source
	Ops    []Op
}

Wiring builds an index byte by folding the selected inputs left-to-right with the given ops: index = (((in0 op0 in1) op1 in2) ...). len(Ops) must be len(Inputs)-1.

func EnumerateWirings

func EnumerateWirings() []Wiring

EnumerateWirings produces the single- and multi-input merged-index wirings over {Hprev, Hcur, eo} with combine ops {^,+,-}: the family the propagator can falsify in one pass.

func (Wiring) String

func (w Wiring) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL