Expand description
§Algorithmic information theory — certified description-length objects
The provers already measure algorithmic information (hypercube::symmetry_entropy_bits =
log₂|Aut(F)|; the clause-orbit quotient as “the computable shadow of Kolmogorov complexity”).
This module promotes those measurements into certified objects: a description length that
carries a re-checkable witness, so “this object compresses to N bytes” is something a checker
confirms rather than trusts.
Kolmogorov complexity K(x) is uncomputable, so we work with the two honest sides of it:
- Upper bounds
K̄(x)are computable — the shortest program in a fixed description language that reproducesx.DescriptionBoundcarries such a program together with the bytes that, when decoded, reproducex(the witness). The description language is layered:Descriptor::IntSeqis the closed-form generator menu of [logicaffeine_base::describe] (affine / geometric / polynomial / periodic / sparse / …), a computable upper bound with a lossless decode witness.
Lower bounds (the incompressibility side) and the two-sided structural bound live alongside this, gated by a budget so we never claim a bound past what the prover can itself re-check (the operational Chaitin ceiling).
Structs§
- Affine
Reduction - The affine reduction of a Boolean function:
f(x) = h(reduced) ⊕ ℓ(x), whereℓis a linear form andhcollapses onto the free coordinates. This peels the COMPLEMENT linear structures (D_a f = 1) thatreduce_by_invariancecannot — a residue XOR a linear form is invisible to every other axis but folds here. - Affine
Signature - The AGL(n,2)-invariant signature of a Boolean function: its Walsh amplitude distribution and the plateaued/bent classification that distribution induces.
- Algebraic
Attack - The certified result of an algebraic-recurrence attack: a low-degree nonlinear feedback register
that regenerates a byte string, recovered by [
describe::detect_algebraic_recurrence]. This is the OPEN rung — where maximal order complexity can only measure a nonlinear register (its2^ordertruth table), the algebraic attack recovers it as a sparse ANF and thereby compresses it, when the feedback has low degree. Theanfis a re-checkable witness (replay it with the seed). - Algebraic
Immunity Report - The algebraic-immunity profile of a filter/combining function: the minimum degree of an annihilator
(the algebraic attack’s leverage), the maximum possible
⌈n/2⌉, and whether it sits at that ceiling. - Boolean
Census - An exhaustive census of the whole Boolean-function space on
nvariables: which structural axis the deep finder wins on, for every one of the2^{2ⁿ}functions. - Budget
- The prover’s own description budget — the operational Chaitin ceiling. Kolmogorov complexity
lower bounds are only certifiable up to what the prover can itself re-check; beyond a resource
bound we decline rather than over-claim. Every lower-bound (incompressibility) path is gated by
a
Budgetand returns a documentedRefusalinstead of a certificate when a bound is exceeded. (Upper bounds —DescriptionBound— are always safe to compute: you can only be pleasantly surprised by a shorter description.) - Combiner
Leak - A certified combiner leak: one candidate LFSR that a keystream measurably correlates with,
recovered by [
describe::correlation_attack]. Theattack.init_stateis the re-checkable witness. - Compressibility
Report - A full compressibility report: the class, the degree (
K̄/n), and the raw vs described sizes. - Coverage
Census - A coverage census over a corpus of sequences: how many the lens arsenal covers, how many fall in the uncovered residue, and which lens covered how many. This is the covering problem made countable.
- Deep
Structure Report - The winning axis and description size of the unified deep structure finder.
- Description
Bound - A computable upper bound
K̄(x)on the Kolmogorov complexity of an objectx, over the fixed description language, carrying a re-checkable decode witness. - Invariance
Reduction - The genuine domain compression from the INVARIANCE subspace
V₀(f) = {a : f(x⊕a) = f(x) ∀x}: an(n − dim V₀)-variable truth table carrying all the information, over the survivingfree_positions. A rotated junta collapses here even though the coordinate junta lens saw every variable as relevant. - Kolmogorov
Bound - A certified Kolmogorov upper bound on a Boolean function: the recursive structure decomposition and
its total description size, with a re-checkable decode witness. This is a
K̄— an UPPER bound only. The kernel-certified Chaitin theorem in this module forbids certifyingK(f) > cfor any function past budget, so a bound that equals the raw2ⁿmeans “irreducible by this arsenal,” never “incompressible.” - Lens
Coverage - One lens’s verdict on a sequence: the number of bits it needs to DESCRIBE the sequence (
usize::MAXif the lens finds no exploitable structure). Lower ⇒ the lens compresses it more. - Lens
Report - The result of running the whole lens portfolio against a bit sequence.
- Linear
Distinguisher - The linear-cryptanalytic profile of a Boolean combining/filter function, from its Walsh spectrum: the best linear approximation (the distinguisher), its nonlinearity, and its correlation-immunity order.
- Linear
Rigidity Cert - A re-checkable certificate that
F’s parity structure admits no linear symmetry shortcut beyond its exposed kernel: the GF(2) coefficient system has rankrank, its solution space is exactly2^solution_count_log2(spanned bykernel_basis), and this is the complete linear structure. - Linear
Structure Cert - The par32-scale linear-structure certificate: the GF(2) rank and kernel dimension of
F’s parity system, valid for any number of variables (beyond theu64cap ofLinearRigidityCert). It carries no explicit kernel basis — at this scale the witness is recomputation: re-extract the parity system, re-reduce it, and confirm the same rank and kernel dimension. This is the object par32’s “157-dim linearly-rigid kernel” measurement becomes. - Linear
Structure Report - The linear space
V(f)of a Boolean function: the directions along which the derivative is constant. - Recursive
Reduction - The trace of recursively symmetry-breaking an object down to its incompressible core.
- Sampled
Census - A sampled census of the Boolean-function space on
nvariables, forntoo large to enumerate. - Sbox
Profile - The cryptographic structural profile of an S-box.
- Sbox
Spectra - The affine-invariant spectra of an S-box: the fingerprints for classification up to affine equivalence.
- Separable
Decomposition - A direct-sum decomposition
f = constant ⊕ ⊕ᵢ fᵢ(x_{Bᵢ})over independent variable blocks. - Structural
Bound - A certified statement that
Fis described by an orbit-representative set plus automorphism generators — with all three description lengths, the group-entropy, and a self-contained decode witness.StructuralBound::verifyre-derivesF,rep, and the generators from the three descriptors and confirms the generators are automorphisms and that expandingrepby the group they generate reproducesFexactly. - Structure
Cover - A cover of the cube by structural class: the ANF degree stratification of a Boolean function. Every
function is a XOR of monomials
∏_{i∈S} xᵢ, and each monomial is a structural class — its degree|S|is the order of variable interaction it encodes. Peeling low-degree slices (constant, linear, quadratic, …) covers most of the2ⁿcorners with a handful of terms; what remains is the residue: the high-degree core no lower-order slice explains. This is why the peel is more efficient than walking the cube corner by corner — each class-slice accounts for many corners at once, and you reason about the small residue directly instead of labeling all2ⁿof them. - Structure
Report - The verdict of the hypercube structure finder: the tightest structural class, its description size in
bits, and how that compares to the raw
2ⁿ-bit truth table. - Variable
Symmetry - The variable-permutation symmetry of a Boolean function: a certified subgroup
G ≤ Aut(f)and the input-orbit compression it induces.
Enums§
- Compressibility
Class - The compressibility class of an input, read off the winning description-menu generator.
- Crypto
Strength - The algorithmic-information verdict on key or ciphertext material (a byte string).
- Cube
Structure - The compressibility class of a Boolean function on the hypercube, tightest description first. Each
variant carries a re-checkable witness (
CubeStructure::reconstruct) except the residue. - Descriptor
- The description language. Each variant is a program in a fixed language whose length is the description bound and whose execution (decode) reproduces the object.
- Linear
Shortcut - The honest verdict on whether
Fadmits a linear (GF(2)) symmetry shortcut — the certified, re-checkable “no shortcut of this class” answer the dispatcher and diagnostics can report instead of silently spinning a symmetry search. Class-relative (linear/parity), with the Chaitin ceiling as the documented frame: we certify the linear structure exactly, never claim an absolute bound. - Refusal
- Why a lower-bound certificate was not issued — the documented refusal that makes the Chaitin ceiling operational. A refusal is never a claim that no bound exists; it is an honest “this is beyond what I can re-check within budget.”
- RsaAudit
Verdict - The verdict of throwing the ENTIRE arsenal at an RSA public key.
- RsaStrength
- The structural-security verdict on an RSA modulus.
- Sbox
Verdict - The structural-security verdict on an S-box — the vectorial analogue of
rsa_full_audit. It flags only PROVABLE weaknesses (an exact linear relation, a deterministic difference, a quadratic system); a clean profile is the honest ceiling, “no structural weakness of these classes,” never a proof of security (the Chaitin frame in the symmetric world). - Structure
Tree - A recursive structural decomposition of a Boolean function: the fixed point of the deep finder.
Constants§
- GROUP_
DECODER_ OVERHEAD - The fixed byte cost of the group-expansion decoder (“take
rep, apply the group generated bygens, output the union”). A documented constant so the inequalityK̄(F) ≤ K̄(rep) + K̄(gens) + O(1)is concrete.
Functions§
- affine_
reduce - Peel a linear form off a Boolean function so its complement linear structures become invariances, then
reduce. Catches
f = h ⊕ ℓwhereℓis linear andhcollapses — the residue-plus-a-linear-form class every other axis misses. Fail-closed: returnsSomeonly if the reconstruction re-checks exactly.Nonewhen there are no complement structures (pure invariance isreduce_by_invariance’s job). - affine_
signature - Compute the affine-equivalence signature of a Boolean function from its Walsh spectrum.
Noneiftruth.len()is not a power of two. - algebraic_
attack_ on_ bytes - Run the algebraic attack on
data(its LSB-first bit expansion) at maximal ANF degreemax_degree, searching register orders1..=max_order: return the shortest low-degree nonlinear feedback that regenerates the whole bit stream, with its sparse ANF.Nonewhen no degree-≤max_degreeregister up tomax_orderfits — the genuine high-degree / incompressible residue (a real cipher’s keystream, the Chaitin ceiling).max_orderbounds the cost: the solve isO(rows · M²/64)withM = O(Lᵈ). - algebraic_
filter_ attack - Recover the initial state of a filter generator (a length-
LLFSR with feedbacktapsfiltered byfilter_truth) via the algebraic attack — the certified break of a target the correlation and Walsh rungs only glimpse statistically. See [describe::algebraic_filter_attack]. Returns the secret initial state (verified by regeneration) orNone. - algebraic_
immunity_ of - The algebraic-immunity profile of a Boolean function given as its
2ⁿtruth table. Low immunity is a certified structural weakness: a degree-AIannihilator turns each keystream bit of a filter generator usingCinto a degree-AIequation in the secret state (algebraic_filter_attack). Maximal immunity (AI = ⌈n/2⌉) is the ceiling — no low-degree relation to exploit.Nonefor a malformed table. - assess_
key_ material - Assess key/ciphertext bytes:
Weak(with a re-checkable compression witness — the concrete attack) when the engine describes the data in fewer bytes than storing it raw, elseIncompressibleInClass. - attack_
shrinking_ generator - Break a shrinking (clock-controlled) generator: recover both register states from the output alone by
guessing the clock register and linear-solving the data register. Reaches a generator whose output is
a data-dependent decimation — not a fixed function of any register’s own past — that no feedback,
correlation, algebraic, or linear rung can touch. See [
describe::attack_shrinking_generator]. - boolean_
function_ census - Exhaustively classify every Boolean function on
nvariables by the deep finder’s winning axis.Noneforn = 0orn > 4(beyond2^{2⁴} = 65536functions the space is astronomically large). The residue count is the concrete, countable face of the Chaitin ceiling: it is a growing fraction of the space asnrises — structured functions are2^{poly}, the space is2^{2ⁿ}. - boomerang_
uniformity - The boomerang uniformity of an S-box permutation — the third cryptanalytic pillar after
differential and linear.
BCT[a][b] = #{x : S⁻¹(S(x)⊕b) ⊕ S⁻¹(S(x⊕a)⊕b) = a}; the uniformity is the maximum overa≠0, b≠0and measures resistance to the boomerang attack (lower is stronger;2is optimal, attained exactly by APN permutations).Noneifsboxis not a permutation. - census
- Census a corpus of bit sequences through the
lens_reportportfolio: tally what each lens covers and what lands in the uncovered residue. - certified_
incompressible_ function_ exists - A kernel-re-checkable counting certificate that an incompressible Boolean function on
nvariables MUST exist. A function is its2ⁿ-bit truth table, and there are only2^{2ⁿ} − 1programs shorter than2ⁿbits — too few to name all2^{2ⁿ}functions — so at least one has no shorter description. This is the certified REASON the census residue is nonempty:boolean_function_censusmeasures it, counting guarantees it. Any such function necessarily sits in the residue (no arsenal compresses the truly incompressible).Noneforn = 0orn > 6(a2⁷-bit truth table overflows the exact-u128counting range). Re-check withcrate::pigeonhole::check_counting_cert. - certify_
linear_ rigidity - Certify the linear (GF(2)) rigidity of
Funder the standard budget —Noneon any refusal (no parity structure, or over budget). Seecertify_linear_rigidity_withinfor the documented refusal. - certify_
linear_ rigidity_ within - Certify the linear (GF(2)) rigidity of
F, failing closed tobudget: a system that exceeds the budget’s Gaussian cap returnsRefusal::OverBudgetGaussian— the operational Chaitin ceiling — rather than a certificate we could not re-check. - certify_
linear_ structure - Certify the GF(2) linear structure of
Fat any scale via the incremental engine, orNoneif there is no parity structure to characterize. - check_
linear_ rigidity - Re-check a
LinearRigidityCertagainstF, trusting nothing the producer computed: re-extract the parity system, independently recompute its kernel, and confirm the certificate’s basis is a genuine, independent, complete null-space of the recovered rows. - check_
linear_ structure - Re-check a
LinearStructureCertby re-extractingF’s parity system, re-reducing it, and confirming the certificate’s rank, kernel dimension, and equation count are exactly reproduced. - classify_
bytes - Classify a byte string by its compressibility class and degree.
- classify_
int_ seq - Classify an integer sequence (numeric data, not bytes) by its compressibility class, measured
against the plain varint encoding — so a linear recurrence (Fibonacci-class) is recognized as a
closed-form
Generatedprogram even though it grows past byte range. - classify_
text - Classify a text string by the compressibility class of its UTF-8 bytes.
- exhaustive_
coverage - Exhaustively census EVERY length-
lenbit sequence (2^lenof them): what fraction of the WHOLE space does the lens arsenal cover? The answer is a small sliver — most sequences are incompressible, the residue — which is the concrete, countable face of the Chaitin ceiling. The structured families our lenses catch are real and important, but they are a vanishing fraction of the space; you cannot arrange lenses to cover it all (counting forbids it), and you cannot even certify which points are uncovered (Chaitin forbids that).len ≤ ~18to stay tractable. - fast_
correlation_ attack - Fast correlation attack (Meier–Staffelbach): recover a leaking LFSR’s initial state from a noisy
keystream by DECODING the register-as-linear-code, in time polynomial in
L— where the exhaustive correlation attack (scan_for_combiner_leaks, Rung E) needsO(2^L). This is what scales the correlation break to the register lengths real ciphers use. See [describe::fast_correlation_attack]. - find_
structure - Walk the hypercube of a Boolean function (its
2ⁿtruth table) and return the tightest structural class that describes it, with the achieved description size and a re-checkable witness. Every lens is a traversal of the cube along one axis of structure (coordinate edges, Walsh butterfly, weight shells, Möbius butterfly); the finder reports whichever yields the shortest description, or the residue (CubeStructure::ResistedArsenal) when none beats storing the table raw.Noneiftruth.len()is not a power of two. - find_
structure_ deep - Run every structural axis and return the globally tightest description of a Boolean function.
Noneiftruth.len()is not a power of two. - gf256_
word_ complexity - The GF(2⁸) word linear complexity of a byte string — the length of the shortest byte-oriented
(GF(256)) LFSR that generates it, via Berlekamp–Massey over the AES field. The word analogue of the
bit linear complexity: low relative to
n/2⇒ a word-LFSR keystream, a certified weakness. (Runs inO(n²)byte-ops — 64× fewer than the bit-level BM on the same data.) - incompressibility_
gate - The SAT-dispatcher gate:
Some(cert)iffF’s parity structure is fully exposed ANDFis provably rigid (|Aut| = 1), so the symmetry arsenal is provably useless and the solver may go straight to CDCL with an honest “no shortcut of this class” verdict. The exact rigidity check (symmetry_entropy_bits == 0) is size-gated — past [GATE_SYMMETRY_MAX_VARS] the gate declines rather than run the superpolynomial automorphism search (there is no cheap sound global-asymmetry test; it is graph-isomorphism-hard). Fail-closed throughout: any doubt returnsNoneand the arsenal runs as usual. - incompressibility_
ratio - The incompressibility ratio
K̄(x)/nfor ann-byte string — the shortest menu description measured against storing the bytes raw (the incompressible size for byte material). ≈ 1.0 ⇒ incompressible (no exploitable structure of this class); well below 1.0 ⇒ compressible (a short, predictable description exists). - incompressible_
string_ exists - The incompressibility lemma for length
n, as a re-checkable counting certificate:2ⁿstrings (pigeons) against2ⁿ − 1shorter programs (holes) ⇒ an incompressible string exists.Noneonly whennis out of the exact-u128range (1 ≤ n ≤ 127). Re-check withcrate::pigeonhole::check_counting_cert. - kolmogorov_
bound - Compute a certified Kolmogorov upper bound for a Boolean function via its recursive structure
decomposition.
Noneiftruth.len()is not a power of two. - lens_
report - The auto-lens-finder: run every sequence lens in the arsenal against
bitsand report which one compresses it (covers it) and by how much — or that none do, placing it in the incompressible residue. This makes the covering explicit: each structured family is caught by its own lens, and a cryptographically-random sequence falls through all of them (the ceiling). Lenses are ordered cheapest-first so a covered sequence is recognized quickly. - linear_
cryptanalysis - The linear-cryptanalysis profile of a combining/filter function given as its
2ⁿtruth table: the whole Walsh spectrum distilled into the best linear approximation, its nonlinearity, and its correlation-immunity order. Wherescan_for_combiner_leaks(Rung E) reads only weight-1 masks, this reads them ALL — surfacing the multi-register approximation (mask_weight ≥ 2) that E is blind to, even on a first-order correlation-immune function.Nonefor a malformed table. - linear_
shortcut_ verdict - Decide the linear-shortcut verdict for
F(fail-closed viacertify_linear_structure). - linear_
structures - Detect the linear space
V(f)of a Boolean function from its autocorrelation.Noneiftruth.len()is not a power of two. - maximal_
order_ complexity_ of_ bytes - The maximal order complexity of a byte string (its LSB-first bit expansion) — the length of the
shortest feedback register, LINEAR OR NONLINEAR, generating it. The TOP of the FSR hierarchy: it
catches nonlinear generators (NFSRs, algebraic combiners) that fool every linear-complexity measure.
Low relative to the bit count ⇒ a short-register generator. This is the last cheap rung — a general
nonlinear feedback function is a full truth table (as large as the data), so a low MOC is a certified
STRUCTURAL weakness (a short register exists) even though recovering its sparse form is the (hard)
algebraic attack. For a real cipher MOC
≈ n/2: the incompressible residue, the Chaitin ceiling. - recursive_
reduce - Recursively symmetry-break an object until nothing reduces it further. Each level applies the compression lens (the MDL description menu) and recurses on the DESCRIPTION — each compression is a symmetry break, and its output becomes the next object. The recursion terminates at the FIXED POINT: the point where no lens shrinks it, the incompressible core.
- reduce_
by_ invariance - Peel the invariance subspace off a Boolean function: quotient out every direction
awithf(x⊕a) = f(x)and return the smaller function on the surviving coordinates, together with the invariance basis that certifies it.Nonewhen the invariance subspace is trivial (nothing to reduce). - rsa_
full_ audit - Throw the entire arsenal at an RSA public key
(N, e): the structural factoring suite (small factor / close primes / smoothp−1/ Pollard rho), Wiener’s small-exponent attack, and the compressibility classifier on the modulus bytes. This is the pre-release safety gate — if any of our own mathematics broke RSA, this is where it would surface.ResistsFullArsenalis the honest ceiling, not a security proof: we certify weakness whenever structure exists and can never certify its absence. - rsa_
structural_ audit - Audit an RSA modulus with the full structural factoring arsenal (see
crate::factor): return a certified factorization if any structural weakness exists, else the soundness verdict — the number-theoretic incompressible residue. Uses the default triage budget. - sampled_
boolean_ census - Estimate the coverage map at
nvariables (where2^{2ⁿ}is unenumerable) from a uniform random sample ofsamplesfunctions, classified by the deep finder’s winning axis.Noneforn = 0orn > 12. The residue fraction climbs toward1asngrows — the asymptotic form of the exhaustive census, and the whole thesis: structured functions vanish and almost every function is incompressible. - sbox_
full_ audit - Audit an S-box with the full structural arsenal — differential, linear, algebraic, and boomerang — and
return the first provable weakness, else the honest ceiling with the measured profile.
Noneif the table length is not a power of two. Threshold-free: it never fabricates a “weak” verdict from an arbitrary cutoff, only from a structure that is exact. - sbox_
profile - Profile an S-box
S : {0,1}ⁿ → {0,1}ᵐgiven as its output table (sbox[x] = S(x),out_bits = m): differential uniformity, linearity, minimum component degree, and the affine/bijective/APN flags.Noneif the table length is not a power of two. - sbox_
spectra - The affine-equivalence fingerprint of an S-box: its differential and linear spectra. Two S-boxes that
are affine-equivalent (
S′(x) = B·S(A·x⊕a)⊕cfor invertibleA,B) share both spectra, so a difference in either certifies inequivalence — the necessary test at the heart of S-box classification.Noneif the table length is not a power of two. - scan_
for_ combiner_ leaks - Scan a byte keystream against a menu of candidate LFSR feedback tap-sets: return every register the
keystream correlates with beyond
significance ×the spurious floor. Each hit is a certified break of a nonlinear combiner generator — a HIDDEN constituent register recovered independently (Siegenthaler divide-and-conquer), collapsing a2^(Σ Lⱼ)search toΣ 2^Lⱼ. This reaches the combiners the algebraic-recurrence rung structurally cannot (their output is a function of the hidden register outputs, not of the keystream’s own past). Empty ⇒ no first-order correlation with any candidate: correlation-immune, or not this combiner — the ceiling, where higher-order and fast-correlation attacks take over. - separable_
decomposition - Decompose a Boolean function into its independent direct-sum blocks (the connected components of its ANF
interaction graph).
Noneiftruth.len()is not a power of two. - structural_
bound - Build the structural bound for
Funder a set of candidategenerators. ReturnsNoneif any generator is not an automorphism, or ifrep+ generators does not reconstructF(so we never issue a certificate we could not re-check). - structure_
cover - Peel the cube apart by structural class and examine the residue: return the ANF degree
stratification of a Boolean function (its
2ⁿtruth table). Each degree is a slice of structure; the top nonempty degree is the residue — the interaction order that survives every lower-order peel, and the honest answer to what remains and why.Noneiftruth.len()is not a power of two. - structure_
tree - Recursively decompose a Boolean function to the fixed point of the deep finder: peel the tightest axis,
then re-run on the smaller function(s) it exposes, until a coordinate leaf or the residue.
Noneiftruth.len()is not a power of two. - two_
adic_ complexity_ of_ bytes - The 2-adic complexity of a byte string (its LSB-first bit expansion) — the size of the shortest FCSR (feedback-with-carry / add-with-carry) generating it. Low relative to the bit count ⇒ a carry-based keystream that fools every linear-complexity test (Berlekamp–Massey over any field sees high complexity; the carry is nonlinear over GF(2)). The certified weakness the linear tools miss.
- variable_
symmetry - Find the variable-permutation symmetry group of a Boolean function: test every transposition and the
cyclic shift, certify the subgroup they generate with Schreier–Sims, and compress by input-orbits.
Noneiftruth.len()is not a power of two.