Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
MRS-AUTH-PQC
A Post-Quantum Cryptographic Framework
Post-quantum authentication with a framework-native Clock KDF.
๐ Mathematical Invariance: The session key is derived directly from the mathematical structure of the (19, 9) Diophantine representation system. It is framework-native and not hashed from an external seed primitive.
Status: cargo test, 108 passed, 0 failed (52.22s) ยท EasyCrypt, 14 proof files compile ยท 231 lemmas, 21 axioms, 0 admits (ยง12)
What is MRS-AUTH-PQC?
MRS-AUTH-PQC addresses two orthogonal problems in the same framework.
1. Confidentiality against a quantum adversary. Handled by ML-KEM-1024 (FIPS 203), the NIST-standardized key-encapsulation mechanism formerly known as Kyber.
2. Coercion resistance against a physical adversary. Handled by the combinatorial multiplicity of the (19, 9) Diophantine representation system, which provides a witness space in which a coerced user can produce a mathematically valid, structurally indistinguishable alternative credential.
A single protocol, a single key derivation, a single structural foundation.
Behind both problems is a fact about numbers. Take any integer N. For a well-chosen pair (p, q), you can write N as
N = p ยท A + q ยท B
in many different ways. When p and q are chosen so that p โก 1 (mod q), those ways are not scattered. They line up. They form two cycles that interlock at a fixed ratio:
m = (p โ 1) / q
Version 1 was published as MRS-Hybride-PQC. Version 2.0.0 is no longer hybrid. The same congruence p โก 1 (mod q) that organises the numbers (19 โก 1 mod 9) also organises the clock that the key is derived from (25 โก 1 mod 12).
This README is written for a general audience. Sections 4 to 7 show you the mathematical structure with nothing but tables of numbers. Sections 8 to 12 show you the protocol and the formal verification. Either half can be read on its own.
Key Contributions
- The double cycle. Not a tuning knob: a structural fact that governs which numbers can be written, and in how many ways. ยง4.
- The Positive Anchor Convention.
Aโ = dr(N)instead ofN mod 9. GuaranteesA โฅ 1, moves the Frobenius boundary from 143 to 162, and gives every representation a non-trivial core. ยง5. - The fractal ladder โง. The rungs of a representation that share one digital signature, with the signature proved for every rung. ยง6.1.
- A key derived from structure, not from a seed. The session key is produced by walking the same cycle the framework is built on. ยง8.
- Deniability proved by a machine. The property that a coerced user can hand over a valid alternative is verified by EasyCrypt, line by line, with the final assumption eliminated. ยง11.
- Formal verification with a constructive distribution layer. Every probability distribution used by the framework is built explicitly, not assumed. ยง12.
4. The Double Cycle
This is the heart of the framework. Read this section even if you skip the rest.
4.1 A first look, N = 958
Take the pair (p, q) = (19, 9). Every integer can be written as 19A + 9B. For most integers there are several ways. For N = 958, there are exactly six:
| k | A = 4 + 9k | B = 98 โ 19k | 19ยทA + 9ยทB | dr(A) | dr(B) |
|---|---|---|---|---|---|
| 0 | 4 | 98 | 958 | 4 | 8 |
| 1 | 13 | 79 | 958 | 4 | 7 |
| 2 | 22 | 60 | 958 | 4 | 6 |
| 3 | 31 | 41 | 958 | 4 | 5 |
| 4 | 40 | 22 | 958 | 4 | 4 |
| 5 | 49 | 3 | 958 | 4 | 3 |
Look at the columns.
- The first column moves by 9 each step. Its digital root never changes.
- The second column moves by โ19 each step. Its digital root drops by exactly 1 each step, because
19 โก 1 (mod 9). This isp โก 1 (mod q)at work. - After
q = 9steps the digital root ofBhas run through a full cycle. Over those 9 stepsArises byqยฒ = 81andBfalls bypยทq = 171, and171 = mยทqยฒ + q = 2ยท81 + 9.
Every representation sits on the same two cycles. If you know one, you know them all.
4.2 Where m = 2 comes from
The number m is the ratio between the two steps:
m = (p โ 1) / q = (19 โ 1) / 9 = 18 / 9 = 2.
It is not chosen. It is forced by the pair. Once you pick (19, 9), you get m = 2.
Why does m matter? Because it decides how the pattern repeats. When you lay out all integers from 0 upward and mark which ones can be written as 19A + 9B, you see levels. Each level is a block of rows. m tells you how many rows long each block is. For m = 2, every level lasts two rows. For m = 1, every level lasts one row.
The double cycle m = 2 is the smallest value where the pattern has real texture. At m = 1, the structure flattens into a plain staircase.
4.3 The same number, a different cycle
Change only p. Let (p, q) = (10, 9). Now m = 1. The same N = 958 has eleven representations instead of six:
| k | A = 4 + 9k | B = 102 โ 10k |
|---|---|---|
| 0 | 4 | 102 |
| 1 | 13 | 92 |
| 2 | 22 | 82 |
| 3 | 31 | 72 |
| 4 | 40 | 62 |
| 5 | 49 | 52 |
| 6 | 58 | 42 |
| 7 | 67 | 32 |
| 8 | 76 | 22 |
| 9 | 85 | 12 |
| 10 | 94 | 2 |
More representations. But the pattern is flat: one row per level, no repetition, no texture. The richness of the double cycle is gone.
This is the point. m = 2 is not just a larger number than m = 1. It is a richer shape.
4.4 Why (19, 9)
The pair (19, 9) is the smallest pair satisfying p โก 1 (mod q) for which the row/level structure becomes visible. With m = 2, every representability row occurs exactly twice in succession, producing the repeated-row structure the witness-space construction depends on.
At m = 1 (for example 10 โก 1 mod 9), level and row coincide, and the structure collapses.
What makes (19, 9) special is that it fits the way humans count. Humans count in base 10. Our digits run from 1 to 9, not from 0 to 9. The digital root lives in {1, โฆ, 9}. That is our anchor. The pair (2ยท9 + 1, 9) = (19, 9) is the smallest pair (2q + 1, q) that sits on the base-9 anchor. Any larger pair would work, but would add nothing.
4.5 The same structure, seen two ways
The Clock KDF is not a new invention bolted onto the framework. It is the same structural fact, seen from two angles. Both satisfy p โก 1 (mod q) and have the same ratio m = 2:
| System | Condition | Ratio | Shape |
|---|---|---|---|
| Numbers | 19 โก 1 (mod 9) |
2 | two 9-cycles |
| Clock | 25 โก 1 (mod 12) |
2 | two 12-cycles |
The Clock KDF walks the numbers. The clock decomposition walks the clock. They are not analogies of each other. They are the same pattern, with different moduli.
5. The Positive Anchor
Every representation starts at the same anchor. We take it from the digital root of N:
Aโ = dr(N)
where
dr(N) = 1 + ((N โ 1) mod 9) โ {1, 2, โฆ, 9}.
The digital root is the number you get by adding the digits of N repeatedly until only one is left. For example:
N = 2026:2 + 0 + 2 + 6 = 10, and1 + 0 = 1. SoAโ = 1.N = 123:1 + 2 + 3 = 6. SoAโ = 6.N = 999:9 + 9 + 9 = 27, and2 + 7 = 9. SoAโ = 9.
Notice the third example. In normal modular arithmetic, 999 mod 9 = 0. But here we use 9 instead of 0. In this framework, 0 and 9 are the same value seen from two sides: 0 means "no anchor", 9 means "the anchor is the whole cycle". Because they are the same value, the anchor is always at least 1. It never collapses to zero.
That matters, because a zero anchor would be a leak: any representation with A = 0 would reveal itself as different from the rest. Under the Positive Anchor Convention, every representation carries a real, positive A, and no representation stands out.
The usual alternative, Aโ = N mod 9 (range 0 to 8), admits A = 0 and gives Frobenius boundary 143. MRS-AUTH-PQC deliberately chooses the Positive Anchor variant, and the digital root dr(N) = 1 + ((N โ 1) mod 9) is the definition used throughout the codebase.
| Convention | Largest N without a representation |
|---|---|
A โฅ 0 (classical Sylvester: 19ยท9 โ 19 โ 9) |
143 |
A โฅ 1 (Positive Anchor) |
162 |
Why 162 = 143 + 19: writing A = Aโฒ + 1 turns N = 19A + 9B into N โ 19 = 19Aโฒ + 9B. So N is representable with A โฅ 1 exactly when N โ 19 is representable with Aโฒ โฅ 0. The whole pattern shifts by 19.
162 is the largest integer that cannot be written as 19A + 9B with A โฅ 1. From 163 onward, every integer can be written at least one way. This is proved in MRS_Core.ec (the Frobenius boundary lemma) and confirmed by exhaustive search. The first integer that is also triangle-valid (dr(B) = dr(2ยทdr(N))) is 171.
6. The Formulas
Everything in the framework comes from a small set of formulas. We write them out plainly.
Throughout, N is a positive integer and (p, q) is an admissible pair: gcd(p, q) = 1 and p โก 1 (mod q). The digital root is taken modulo q: dr(N) = 1 + ((N โ 1) mod q). For q = 9 it is the ordinary digital root.
The anchor.
dr(N) = 1 + ((N โ 1) mod q)
Aโ = dr(N) (Aโ โก N (mod q))
The base.
Bโ = (N โ pยทAโ) / q
The number of representations.
R(N) = โ (โN/pโ โ dr(N)) / q โ + 1 (floor-over-floor form)
R(N) = โ Bโ / p โ + 1 (base form)
Both forms are exact and equivalent. For (19, 9) and N = 958, both give R(958) = 6. This matches the count from ยง4.1. The formula agrees with a brute-force count for every N from 163 to 59,999 for (19, 9), and for several other admissible pairs.
The ladder. Every representation of N is on a single ladder, indexed by k:
k_max = R(N) โ 1
A_k = Aโ + qยทk
B_k = Bโ โ pยทk
For (19, 9) and N = 958, k_max = 5, and the six pairs in ยง4.1 are exactly the six values k = 0, 1, โฆ, 5.
The role of m. m does not appear in these formulas directly. It governs the deeper pattern: how many rows each level of the sub-Frobenius grid occupies. Level j spans the rows
d โ [(jโ1)ยทm, jยทm โ 1] for j = 1, 2, โฆ, q โ 1.
That is the structural role of m. It is not the count of representations. It is the shape of the pattern.
6.1 The Fractal Ladder โง
Once the anchor Aโ is determined, the framework generates the family of representations (A_k, B_k) with a fixed step: one rung up changes A by +9 and B by โ19. Along these rungs dr(A) never changes, and dr(B) drops by exactly 1 per rung (ยง4.1).
After 9 rungs, the digital root of B has run through a full cycle and is back where it started. So exactly one rung in every nine has the digital root that the triangle condition asks for. That class of rungs is the fractal ladder โง.
The reason is arithmetic. The triangle condition requires dr(B) = dr(2ยทdr(N)). The digital root of B falls by 1 per rung, cycling through the 9 residues. So exactly one residue class of k modulo 9 satisfies the condition. That class is the ladder.
As a sequence:
F(N) = ( kโ, kโ + 9, kโ + 18, โฆ, k_max )
where kโ is the first valid index and k_max is the last. Every element of the sequence is congruent to kโ modulo 9, and every element lies within the bounds of the framework.
As a set:
F(N) = { k : kโ โค k โค k_max and k โก kโ (mod 9) }
Why "ladder". The values rise in fixed steps, like rungs on a ladder. You can only stop at the rungs, never between them. And the rungs are exactly the values where a valid representation of the right signature exists.
Why "fractal". The ladder repeats its pattern at every step of 9. Each step is one unit of 9, and each unit produces the same alignment between A, B, and the digital root. This self-similar structure is what makes the ladder fractal.
What the ladder produces. For each k in F(N), the pair (A_k, B_k) is a valid representation of N:
A_k = Aโ + 9k
B_k = (N โ 19ยทA_k) / 9
A fixed point. Stepping from one rung of F(N) to the next moves k by 9, so A changes by 81 and B by โ171, because 9 ยท 19 = 171. The digital root is invariant under this step: subtracting 171 from a number does not change its digital root (dr_shift_171 in MRS_AUTH.ec). That is why the entire ladder carries one digital signature. Every rung, from kโ to k_max, satisfies
19ยทA + 9ยทB = N, dr(A) = dr(N), dr(B) = dr(2ยทdr(N)).
This is proved as ladder_signature in MRS_AUTH.ec, together with ladder_A_step and ladder_B_step (the signature repeats one rung higher) and ladder_next (the ladder is closed under the step of 9).
Two coordinate systems. MRS_Core.ec indexes the representations from k = 0 with anchor Aโ. The temporal barrier in MRS_AUTH.ec uses the anchor A = N and Bโฒ = โ2N, so its index k is negative. It is the same ladder in shifted coordinates.
Where the ladder is non-empty. The temporal-barrier ladder is empty for every N โค 3077, where the sampler returns None. For 3078 โค N โค 4580 it depends on N. From N โฅ 4581 it is non-empty (exhaustive check up to 200,000). ladder_nonempty proves it formally for all N โฅ 4760. The full family of representations is non-empty for every N โฅ 163.
7. The Palindrome Block Theorem
Below the Frobenius bound, not every integer can be written as 19A + 9B. Which ones can, and which ones cannot, is not arbitrary. It follows an exact pattern. The pattern is stated here for the standard convention A โฅ 0, where the bound is (p โ 1)(q โ 1) = 144. Under the Positive Anchor Convention (A โฅ 1) the whole pattern moves up by p = 19, which is where 162 comes from (ยง5).
Write N = dยทq + r, where 0 โค r < q. The theorem is short:
Nis representable if and only ifd โฅ m ยท r.
That is it. No search, no enumeration. A single inequality decides.
The pattern this creates is called the Palindrome Block Theorem because the blocks look like this. There are q โ 1 = 8 levels below 144. Each level lasts m = 2 rows. On every row of level j, the first j numbers are representable and the remaining q โ j are gaps. So level 1 has one representable and eight gaps. Level 2 has two representables and seven gaps. And so on, up to level 8, which has eight representables and one gap.
The name "palindrome" is descriptive: as you move up through the levels, the pattern grows and then the lower rows vanish in a symmetric way. But the important thing is not the name. It is that the pattern is exact, and it is decided by one inequality.
7.1 Comparison of admissible pairs
(p, q) |
m |
Levels qโ1 |
Frobenius bound F = (pโ1)(qโ1) |
Representable below F |
|---|---|---|---|---|
(7, 2) |
3 | 1 | 6 | 3 |
(10, 9) |
1 | 8 | 72 | 36 |
(11, 5) |
2 | 4 | 40 | 20 |
(13, 4) |
3 | 3 | 36 | 18 |
(19, 9) |
2 | 8 | 144 | 72 |
The table makes the two knobs visible: q sets the number of levels, and m sets how often each level repeats.
7.2 A new proof of a classical result
The level structure also gives a purely combinatorial proof of the Sylvester genus formula:
g = (p โ 1)(q โ 1) / 2.
Level j contains m rows, each with j representables. Summing over all levels gives exactly half the Frobenius bound. Since the sub-Frobenius range has length (p โ 1)(q โ 1), the number of gaps is also half.
This is a level-by-level proof, independent of the usual symmetry argument N โ F โ 1 โ N. The theorem holds for every admissible pair (p, q).
8. The Clock KDF
Most cryptographic systems derive their keys the same way: take some entropy, run it through a standard KDF, and out comes a key. HKDF-SHA256 (RFC 5869) is the common choice. It knows nothing about the application. Any bytes would do.
MRS-AUTH-PQC changes this. The session key is derived from the (19, 9) Diophantine structure the framework is built on. Every step of the derivation is defined by the framework, is visible in the public API, and can be audited independently:
Kyber shared secret (256 bits of entropy)
โ
combine_seed(SS โ 0x00 โ session_id)
โ
N = first 128 bits of SHA-256(seed) structured integer
โ
clock decomposition: N โ (D, H, M, S, Ms) bijective, branchless
โ
R(N) = โ(โN/19โ โ dr(N)) / 9โ + 1 closed form, no search
โ
k = SHA-256(seed โ "k") mod R(N) representation selector
โ
(A_k, B_k) = (Aโ + 9k, Bโ โ 19k) direct, no loop
โ
key = SHA-256(structured transcript) single hash pass
Comparison with generic HKDF
| Property | Generic HKDF | MRS-AUTH-PQC Clock KDF |
|---|---|---|
| Domain | Application-agnostic | Framework-native |
| Branches in hot path | 0 | 0 |
| Hash passes | 2 (extract + expand) | 1 |
| Structure visible in API | No | Yes (ClockKey) |
| Seed-to-position map | Non-injective | Bijective |
| Audit surface | 32-byte output | N, dr, R(N), k, (A_k, B_k), clock tuple |
| External KDF dependency | RFC 5869 | None |
| Entropy source | Unchanged | Unchanged (Kyber SS) |
| Maximum entropy | 256 bits | 256 bits |
The Clock KDF does not add entropy. It shapes the entropy that already exists. Its contribution is structure: the key becomes a deterministic, auditable product of the framework rather than the output of an opaque standard primitive.
8.1 The clock is not a metaphor
The clock decomposition N โ (D, H, M, S, Ms) is not decoration. It is a bijection. Every integer N maps to exactly one clock tuple, and every tuple maps back to exactly one integer. The formula is:
N = 86,400,000ยทD + 3,600,000ยทH + 60,000ยทM + 1000ยทS + Ms
That is just the number of milliseconds in a day, broken into days, hours, minutes, seconds, and milliseconds. It is a natural encoding, and it is reversible.
The Clock KDF uses it to give the key derivation a unique input. Every different seed produces a different clock tuple, and every clock tuple produces a different representation family.
Hashing a seed produces a key that is uniformly random but opaque. You cannot look at the key and see where it came from. The Clock KDF produces a key that is structured: N, the clock tuple, R(N), k, and the pair (A_k, B_k) are all concrete facts about the derivation.
This structure is an audit property, not a runtime property. During an offline audit, with a test seed of the auditor's own choosing, every intermediate value can be re-derived and checked, the same way one might re-run HKDF extract/expand from a known input. In production, none of these values are logged, printed, or exposed through the API. The only secret remains the Kyber shared secret. Every step from there to the key is a one-way function (SHA-256), so inspecting the path does not weaken the key.
8.2 The legacy KDF
The version-1 framework used an HKDF-based hybrid KDF. It is preserved for reference in legacy/ and no longer compiled into the crate. See legacy/README.md for the design rationale and a side-by-side comparison.
9. The General Theorem
The framework is not specific to (19, 9). It works for any admissible pair. This is written down explicitly in proofs/MRS_Framework.ec, where the digital root, the positive anchor, the representation predicate, and the representation count are all defined for arbitrary p and q.
The (19, 9) case is the primary instance, not the definition.
So the framework could be built on (37, 18), or on (199, 99), or on any other admissible pair. It chooses (19, 9) because it is the one that speaks the same language humans already use: base-9 anchor, m = 2, smallest possible.
9.1 Scalability for large N
The number of representations grows like R(N) โ N / (pยทq). Exact counts (A โฅ 1, B โฅ 0), for three pairs that all have m = 2:
N |
(19, 9) |
(37, 18) |
(199, 99) |
|---|---|---|---|
| 10โด | 59 | 15 | 1 |
| 10โต | 585 | 150 | 5 |
| 10โถ | 5,848 | 1,501 | 51 |
A larger pair means fewer rungs per N, hence less work per number, and a smaller witness space (ยง11). (19, 9) keeps the witness space large for moderate N, while the closed formulas keep the cost at O(1) for any N.
10. Extensions into 3 and 4 Dimensions
The 2-dimensional case is 19A + 9B = N. But there is nothing special about two variables. The same structure extends naturally.
The chain is:
(19, 9) โ 19A + 9B = N (2 dimensions)
(19, 9, 3) โ 19A + 9B + 3C = N (3 dimensions)
(19, 9, 3, 3) โ 19A + 9B + 3C + 3D = N (4 dimensions)
The numbers come from the pattern of divisors: 1 | 3 | 3 | 9. Each new dimension divides the previous one by an integer factor. The base is always 19 โก 1 (mod 9).
The 3-dimensional count R3(p, q, r; N) has the same shape as the 2-dimensional count. It has its own anchor, its own ladder, its own floor formula. And it is proved in EasyCrypt, not just stated.
For the primary 3-dimensional case (19, 9, 3), the numbers work out as (counts with A โฅ 1):
N |
R3(19, 9, 3; N) |
|---|---|
| 19 | 1 |
| 143 | 18 |
| 958 | 924 |
| 6666 | 43017 |
Every one of those is a separately proved lemma in the EasyCrypt development. Not a calculated value, not a claimed value: a machine-verified fact.
The 4-dimensional case follows the same pattern, with the same structure, one dimension up. The current MRS_Extensions.ec provides R4 with a provably non-negative placeholder definition (it always returns 0). The interface is in place; the full J-block implementation is planned and will replace the placeholder in a future release. The placeholder is honest about its own limits in the file header, and R4_nonneg proves the stated property.
Why does this matter? Because the witness space grows with the dimension. In 2D, each integer has R(N) representations. In 3D, each integer has many more. Every extra dimension multiplies the alternatives a coerced user can offer, and every one of those alternatives is still structurally indistinguishable from the real one.
The framework does not need the extra dimensions to work. It works in 2D. But the 3D and 4D extensions show that the structure is not a one-off. It is a family. And the family has room to grow.
11. Deniability
This is the part of the framework that matters most. Read it carefully.
11.1 The problem
Imagine a person who carries a cryptographic secret. An adversary captures them and demands the key. The person has two options: refuse, and face the consequences, or hand over the key. If the key is a single object, there is no third option.
MRS-AUTH-PQC provides a third option.
The framework does not produce a single witness. It produces a family of witnesses. One of them is the real one, derived from the master secret. The rest are alternatives, indistinguishable from the real one. When coerced, the user can hand over an alternative. Structurally, it is identical to the real thing. Mathematically, it cannot be shown to be fake.
This is called deniability. The user can deny that the witness they handed over was the real one, and no one can prove otherwise.
The size of the witness space is R(N) โ N / 171 (ยง9.1), so for realistic N it is large. The Positive Anchor Convention guarantees A โฅ 1 for every witness, so none of them degenerates into a recognisable special case.
11.2 The formal statement
Formalise it as a game. An adversary receives a witness and must decide which of two candidates it is. If they cannot do better than a coin flip, they learn nothing.
The theorem, proved in EasyCrypt, says exactly that. Against any adversary, no matter how clever, the probability of distinguishing the witness from an alternative is:
Pr[ the adversary guesses correctly ] = 1/2
Not "approximately 1/2". Not "1/2 plus a negligible term". Exactly 1/2. No computational assumption. No hardness lemma. Just symmetry.
11.3 The proof, in plain terms
The proof has four steps. Each is a small, natural observation.
Step one. The adversary always receives the same thing in both cases. This is by construction: when the challenge bit flips, the chains are swapped. The adversary's view is unchanged.
Step two. The challenge bit can be sampled at the end instead of the beginning. Because the chain-building has no global state, the order of sampling does not change anything the adversary can observe.
Step three. If you flip the challenge bit, the outcome flips. Correct guesses become incorrect, and incorrect become correct. So the probability of success equals the probability of failure.
Step four. If the probability of success equals the probability of failure, and the probabilities sum to 1, then both equal 1/2.
That is the whole proof. Four steps. No tricks.
11.4 Why this is stronger than it sounds
The property is not assumed. It is not stated as an axiom and left there. It was an axiom in an earlier version of the development, and it was eliminated. There is now a proof in MRS_DenyProof.ec that derives the result from first principles.
The proof is checked by a machine. Not by a reviewer, not by an audit, not by an opinion. By EasyCrypt. A program that either accepts a proof or rejects it. There is no middle ground.
12. Formal Verification
All core security properties of MRS-AUTH-PQC are formalised in EasyCrypt. The proof scripts live in proofs/. They are checked by EasyCrypt (r2024.09), and the check runs on every push through the easycrypt.yml workflow. SMT goals are discharged through Why3 by Z3, CVC5 and Alt-Ergo.
EasyCrypt is not a tool that helps a human reviewer. It is a checker. A proof either compiles or it does not. There is no judgement, no interpretation, no possibility of overlooking a step. Anyone with the same compiler and the same files gets the same answer.
12.1 Counts per file
proofs/ holds 14 proof files, and all 14 compile. Every lemma carries a complete proof. There are no admit statements anywhere.
| # | File | Lemmas | Proofs | Axioms | Admits |
|---|---|---|---|---|---|
| 1 | MRS_FloorSum.ec |
0 | 0 | 3 | 0 |
| 2 | MRS_DigitSum.ec |
25 | 25 | 4 | 0 |
| 3 | MRS_Distr.ec |
12 | 12 | 0 | 0 |
| 4 | MRS_Framework.ec |
29 | 29 | 0 | 0 |
| 5 | MRS_Core.ec |
38 | 38 | 1 | 0 |
| 6 | MRS_Equiv.ec |
2 | 2 | 0 | 0 |
| 7 | MRS_Chain.ec |
1 | 1 | 0 | 0 |
| 8 | MRS_Encoding.ec |
0 | 0 | 2 | 0 |
| 9 | MRS_Sampler.ec |
33 | 33 | 9 | 0 |
| 10 | MRS_Deny.ec |
4 | 4 | 1 | 0 |
| 11 | MRS_DenyProof.ec |
13 | 13 | 0 | 0 |
| 12 | MRS_AUTH.ec |
52 | 52 | 0 | 0 |
| 13 | MRS_Honey.ec |
7 | 7 | 1 | 0 |
| 14 | MRS_Extensions.ec |
15 | 15 | 0 | 0 |
| Total | 231 | 231 | 21 | 0 |
The 21 axioms fall into four categories:
- Interface with external code (Rust / AEAD):
prefix_weight_*(3) contract withfloor_sum_ct;aead_secure(1) is the standard AEAD assumption; the sampler interface axioms (9) inMRS_Sampler.eccontract withcdf_sampler.rs. - Encoding interface:
chain_to_bytes_inj,chain_to_bytes_len(2), abstract untilchain_to_bytesis instantiated concretely. - Constructive trace interface:
trace_build_*(4) inMRS_DigitSum.ecdescribetrace_buildas a list of lengthm+1with nth/head/last valuesN โ 9i. - Proofs relocated to companion files:
sample_basic_correct(1) inMRS_Core.ecanddeny_success_probability(1) inMRS_Deny.ec. The second is fully proved inMRS_DenyProof.ec. The first is a composition of already-proven lemmas whose<$-sampling cannot be discharged by EasyCrypt r2024.09.
12.2 What each file does
The .ec files are verified in dependency order. Each file only imports files that precede it.
MRS_FloorSum.ec The prefix-weight specification. Describes mathematically what the Rust function floor_sum_ct computes. Three properties are stated and used by the sampler: the weight is zero before a filter threshold, it is monotone in the upper index, and it is positive once the threshold is reached. These three properties are what the binary search in the sampler relies on. The Rust implementation of the same function is exercised by unit tests, so the specification and the code meet at the interface.
MRS_DigitSum.ec The digit-sum trace. Describes what happens when you repeatedly add the digits of a number: the sequence N, Nโ9, Nโ18, โฆ, dr(N). The file proves that every step preserves the value modulo 9, that the sequence always decreases by exactly 9, and that it ends at the digital root. It also gives the exact number of steps: (N โ dr(N)) / 9. This is what makes the digital root a computational object, not just a definition.
MRS_Distr.ec The distribution theory. Every probability distribution used by the framework is defined constructively, as an explicit mass function. Three distributions are provided: a point mass, a convex combination, and a uniform distribution over a range. Each has its basic properties proved directly: the point mass is concentrated on one value, the convex combination is non-negative when the weights are, and the uniform distribution assigns equal mass to every point in range and zero outside. The file also provides a bridge to EasyCrypt's built-in distribution type, through duniform (range 0 (N+1)), so the framework can use the standard sampling operator. Nothing here is assumed. Everything is built.
MRS_Framework.ec The general foundation. Defines the digital root for any modulus, the positive anchor, the representation predicate, and the representation count, all for arbitrary admissible (p, q), not just (19, 9). This is where the general p/q theorem lives. The file establishes, among other things, that the digital root is congruent to N modulo q for every positive q, that it lies in the range {1, โฆ, q}, and that it satisfies the expected behaviour when a multiple of q is added. Everything that follows is an instance of what is proved here.
MRS_Core.ec The instantiation to (19, 9). Fixes the specific values Aโ, Bโ, k_max. Establishes the Frobenius boundary at 162: the file proves directly that 162 has no representation and that 163 does, and it proves that every integer above 162 has one. It also introduces the representation-sampling module and gives the correctness statement for the basic sampler as a composition of already-proven lemmas: that the pair (Aโ + 9k, Bโ โ 19k) is a valid representation with matching digital roots, for every k in the valid range.
MRS_Equiv.ec Equivalence lemmas for the two samplers (sample_basic, sample_triangle). Reflexivity via proc; auto. The file lets other files substitute one sampler for the other when reasoning about runs with the same arguments.
MRS_Chain.ec The chain builder. The module MRSChain constructs a chain [N, aโ, bโ, aโ, bโ, aโ, bโ] by calling the sampler once per layer. Whether a layer uses the triangle-valid sampler or the basic sampler depends on whether the layer index is in a filter list. The file proves that two runs with the same arguments produce the same output, a syntactic equivalence that lets other files reason about the builder without unfolding it.
MRS_Encoding.ec The chain-to-bytes encoder. Provides a single definition of the encoder and its length convention, so that all downstream files use the same encoding. Two properties are stated as interface contracts: that the encoder is injective (distinct chains give distinct byte strings), and that the encoded length matches a declared convention. These are what the honey layer needs to know to reason about position-j arguments.
MRS_Sampler.ec The weighted CDF sampler. This file is where the sampler's behaviour is characterised. It defines the layer parameters, the reconstruction of (A, B) from the sampled index t, the prefix-weight wrapper, the binary search select_t, the single-attempt layer, the three-layer attempt, and the retry loop. Each of these has an interface contract that describes what it does. The retry loop is proved to use a fixed number of draws, independent of the outcome. That is the constant-time property the Rust implementation realises. The file also characterises the behaviour of the winning attempt as the first successful one in the list, and proves that the sampler produces a correct chain for the root input.
MRS_Deny.ec The deniability experiment. Defines the adversary interface MRSAdversary, the game DenyGame, and the key theorem deny_success_probability. At this stage in the development, the theorem is stated as an axiom for modularity: the file sets up the game, and the proof is done elsewhere. The file also proves that the challenge bit is uniform (mu 0 = mu 1 = 1/2) and that two runs of the chain builder with the same arguments have the same distribution.
MRS_DenyProof.ec The proof of the deniability theorem. This file eliminates the axiom stated in MRS_Deny.ec. It proceeds in four steps, each an equiv or a byequiv between two games: first, that the adversary always sees ch0 regardless of the challenge bit; second, that the challenge bit can be sampled last; third, that flipping the bit flips the outcome; and fourth, that the success probability is exactly 1/2. The file also proves the losslessness of the sampler modules it depends on. The main lemma deny_success_probability_proved has the same statement as the axiom in MRS_Deny.ec. It is the same theorem, now with a proof.
MRS_AUTH.ec The temporal barrier, the fractal ladder and zeroize, in five parts.
- Digital-root lemmas.
dr(x + y) = dr(dr(x) + dr(y))(the digital root behaves like a homomorphism for addition), and invariance under subtracting171 = 9 ยท 19and multiples of 9. - Time model and fractal list. A concrete time model (each of four stages costs one step) and the fractal list
{k : first_k โค k โค k_max, k โก first_k (mod 9)}with its samplerduniform_fractal: membership, bounds, congruence, non-emptiness, losslessness. - The temporal barrier. The
TemporalBarriermodule either returns a valid representation ofNorNoneonce the deadline has passed. Proved: nothing butNoneis returned past the deadline; every returned pair satisfies19ยทxa + 9ยทxb = N, comes from the fractal list, and whenxb > 0has the triangle-valid digital rootdr(xb) = dr(2ยทdr N); two runs with a too-strict deadline are indistinguishable (both returnNone). - The fractal ladder โง. Every rung carries the same digital signature (
ladder_signature), the signature repeats one rung higher (ladder_A_step,ladder_B_step), the ladder is closed under the step of 9 (ladder_next), and it is non-empty fromN โฅ 4760(ladder_nonempty). - Zeroize and the Rust model. A memory-state type with
Valid,ClearedandUninitialized. Zeroize is idempotent and leaves nothing observable.RustTemporalBarriermodels the Rust function, andrefinement_pureandrefinement_step1prepare the refinementrefinement_backward_security: an attacker either observes nothing (the state is cleared) or observes a valid representation with the correct digital-root property. This is the formal content of thezeroizemechanism on the Rust side.
MRS_Honey.ec The honey layer. Proves that the M = 5 ciphertext blobs, one of which encrypts the true chain, are indistinguishable from uniform random strings of the same lengths, with advantage at most Mยทฮต, where ฮต is the AEAD's advantage against a single challenge query. The proof is a hybrid argument. Hyb(j) encrypts the positions below j with uniform noise and the rest for real, so Hyb(0) is the real scheme and Hyb(M) is the random one. Each step Hyb(j) โ Hyb(j+1) is a reduction that makes exactly one challenge query, at position j, and two procedure equivalences (red_real_equiv, red_rand_equiv) show that the reduction reproduces the two hybrids exactly. The one assumption is the AEAD security aead_secure, declared inside the proof section. It is a hypothesis of the main theorem honey_pseudorandom. The result is ciphertext pseudorandomness: every blob looks like noise, and the ciphertext lengths are what remains visible.
MRS_Extensions.ec The 3D and 4D extensions. Extends the framework from the 2-variable case 19A + 9B = N to the 3-variable case 19A + 9B + 3C = N and the 4-variable case 19A + 9B + 3C + 3D = N. The 3-variable count R3(p, q, r; N) has the same shape as the 2-variable count: an anchor, a ladder, a floor formula. It is proved here, not assumed. The file also includes several machine-verified numerical examples, so that the formula can be checked against concrete values. The 4-variable count R4 is provided with a provably non-negative placeholder definition. The interface is in place; the full implementation is planned.
12.3 Scope
The proofs verify the abstract mathematical model. The Rust implementation is verified separately by the test suite (ยง19). Together they cover the model and the code. Each is stated for exactly what it checks.
What the model proves.
- The number system: digital-root lemmas, the Positive Anchor Convention, the Frobenius boundary 162, the full family of representations.
- The temporal barrier in partial correctness.
- The fractal ladder: signature of every rung, step invariance, closure, non-emptiness.
- The zeroize model: cleared state is unobservable.
- Deniability: exact success probability
1/2(ยง11). - The honey layer: pseudorandomness of the
Mblobs under the AEAD assumption.
What lies outside the model, and where it is covered instead.
- Timing of the real code is a measurement topic, covered by the sampler's fixed draw count (ยง12.2) and by benchmarks (ยง20).
- The Clock KDF is a design with a Rust implementation and tests (ยง19).
- Termination and probability statements about the sampler's distribution over the ladder are not part of the barrier lemmas.
- The honey statement concerns ciphertexts: it contains no decryption, wrong-key behaviour or key derivation. Ciphertext lengths remain visible. The chain generator is abstract.
EasyCrypt does not support every proof technique. Two limitations appear in this development, and both are handled openly:
- Sampling distribution limitations. EasyCrypt r2024.09 does not expose enough of the internal structure of some sampling distributions to let the tactic engine discharge certain obligations automatically. Where this happens, the property is stated as an interface contract, with a note explaining what would be needed to prove it. The interface is verified against the Rust implementation by the test suite.
- Recursive definitions. EasyCrypt's
opcommand does not support recursion. Where a recursively defined object would be natural, like the digit-sum trace, the object is characterised by a small set of mathematical properties instead.
These are tool limitations, not gaps in the mathematics. They are documented at the point of use, in the files themselves. The directories Archive/ and legacy/ hold earlier files that are not part of the verified set.
12.4 How to check it yourself
for; do
||
done
The easycrypt.yml workflow does exactly this on every push. If the badge is green, the proofs compile. If it is not, they do not. There is nothing in between.
13. Threat Model
Coercion-resistant cryptography protects against a specific, well-defined threat. MRS-AUTH-PQC is precise about its scope.
The threat. The adversary has physical access to the user. They can demand the key. They cannot be stopped by any cryptographic primitive. What they can be denied is proof that they received the real key.
The defence. The user hands over a witness. The witness is mathematically valid. It fits the same structure as the real one. Nothing in the witness reveals that it is an alternative. An adversary who refuses to accept any witness short of a proof that no alternative exists cannot be satisfied, because that proof does not exist by design. This is the same limit shared by every deniable scheme.
Lineage. MRS-AUTH-PQC is a mathematical descendant of Rubberhose (Assange et al.). Rubberhose achieved plausible deniability by filling a disk with indistinguishable encrypted chaff. MRS-AUTH-PQC moves that haystack from disk space into abstract mathematics. A single small chain travels with the message, and the alternative witnesses are generated on the fly by the Crown Equations sampler.
Verification power is concentrated by design. MasterSecret::verify_authenticity requires the master secret to distinguish Authentic from BindingMismatch. The public WitnessSpace::verify_membership path only ever sees ValidButUnbound. Whoever holds the master secret can tell the difference. This is inherent to centralised verification.
The intended deployment holds the master secret server-side, ideally in a sealed enclave. Under coercion, the client computes an alternative path using only the public value N.
14. Security Properties
| Property | Mechanism | Guarantee |
|---|---|---|
| Confidentiality | ML-KEM-1024 (FIPS 203) | IND-CCA2, NIST Level 5 |
| Key derivation | Framework-native Clock KDF | Branchless, bijective, auditable |
| Coercion resistance | (19, 9) witness ambiguity | Machine-checked 1/2 success probability against any adversary |
| Forward secrecy | Per-session ephemeral keys | Past sessions safe under long-term key compromise |
| Integrity | AES-256-GCM AEAD | 128-bit authentication tag |
| Timing resistance | subtle + constant-time arithmetic |
Branch-free comparison and selection |
| Memory safety | zeroize + RAII drops |
Secrets cleared from RAM on scope exit |
| Deniability | Double-cycle witness space | Machine-checked by EasyCrypt |
15. Architecture
| Layer | Module | Role |
|---|---|---|
| Foundation | core::diophantine |
DiophantinePair, digital root, triangle condition |
| Foundation | forest |
ForestNode, ForestBranch, rn, a0, b0, Frobenius bound |
| Sampler | sampler::cdf_sampler |
Constant-time 3-layer chain builder |
| Sampler | sampler::supergrid |
90/366/2520 temporal transform |
| Crypto | crypto::clock |
Framework-native Clock KDF + AES-256-GCM |
| Crypto | crypto::shamir |
Shamir Secret Sharing over GF(2โธ) |
| Security | security::witness |
Authentic + alternative witness generation |
| Security | security::witness_supergrid |
Temporal witness authentication |
| Security | security::timecode |
HMAC-SHA256 temporal barrier |
| Security | security::merkle |
Merkle commitment and inclusion proofs |
| Orchestration | framework |
MrsAuthFramework top-level API |
The Clock KDF imports rn, a0, b0 from forest, so the (19, 9) arithmetic has a single source of truth in the Rust code. The forest module is pure mathematics with no cryptographic dependencies.
16. Repository Structure
MRS-AUTH-PQC/
โโโ .github/workflows/
โโโ Cargo.toml
โโโ LICENSE
โโโ README.md
โโโ COMPARISON.md
โโโ COMMERCIAL.md
โโโ DENIABILITY.md
โโโ WITNESS-INDISTINGUISHABILITY.md
โโโ Archive/
โ โโโ MRS_Kyber.ec
โโโ benches/
โ โโโ sampler_bench.rs
โโโ demo/
โ โโโ mrs-auth-security-game.html
โโโ docs/
โ โโโ research-notes/
โ โโโ user-manual.md
โโโ legacy/
โ โโโ README.md
โ โโโ MRS_AUTH_KEM_Hybrid.ec
โโโ proofs/
โ โโโ MRS_FloorSum.ec
โ โโโ MRS_DigitSum.ec
โ โโโ MRS_Distr.ec
โ โโโ MRS_Framework.ec
โ โโโ MRS_Core.ec
โ โโโ MRS_Equiv.ec
โ โโโ MRS_Chain.ec
โ โโโ MRS_Encoding.ec
โ โโโ MRS_Sampler.ec
โ โโโ MRS_Deny.ec
โ โโโ MRS_DenyProof.ec
โ โโโ MRS_AUTH.ec
โ โโโ MRS_Honey.ec
โ โโโ MRS_Extensions.ec
โโโ scripts/
โ โโโ count_proofs.sh
โโโ src/
โโโ lib.rs
โโโ framework.rs
โโโ core/
โ โโโ diophantine.rs
โโโ forest/
โ โโโ mod.rs
โ โโโ primitives.rs
โ โโโ node.rs
โ โโโ branch.rs
โโโ sampler/
โ โโโ mod.rs
โ โโโ cdf_sampler.rs
โ โโโ supergrid.rs
โโโ crypto/
โ โโโ mod.rs
โ โโโ clock.rs
โ โโโ shamir.rs
โโโ security/
โโโ mod.rs
โโโ witness.rs
โโโ witness_supergrid.rs
โโโ timecode.rs
โโโ merkle.rs
The proofs/ directory is the source of truth for the security claims. The src/ directory provides the Rust reference implementation. The docs/, demo/, benches/, legacy/, scripts/ and Archive/ directories are supporting material.
17. Installation
Requirements: Rust 1.70 or newer.
From Git:
[]
= { = "https://github.com/A19dammer91/MRS-AUTH-PQC", = "v2.0.0" }
With BigInt support (optional):
[]
= { = "https://github.com/A19dammer91/MRS-AUTH-PQC", = ["bigint"] }
Local development:
18. Quick Start
use MrsAuthFramework;
18.1 Inspecting the Clock Key
The full structured derivation is exposed for audit:
use derive_key_from_clock;
let seed = b"any seed bytes, or a Kyber shared secret";
let ck = derive_key_from_clock;
println!;
println!; // (D, H, M, S, Ms)
println!;
println!;
println!;
println!;
Note on the demonstration code. The println! calls above are for illustration only. In production code, never log ck.key, ck.n, or any intermediate value of the derivation. The audit value of the Clock KDF lies in being able to re-derive the path from a test seed, not in printing the runtime key. The API exposes the intermediate values so that an auditor can check them in a controlled setting. It does not mean those values are meant to be shown during normal operation.
For the full API, see the module documentation via cargo doc --open. It covers MasterSecret, WitnessSpace, ForestNode, Shamir, and supergrid.
19. Test Suite & Continuous Integration
Every push runs the full matrix.
- Clock KDF: determinism, avalanche, bijectivity of the decomposition, representation validity.
- Forest:
rnmatches the brute-force count, Frobenius boundary, edge cases atn = 9, 18, 144, 153, 162. - Sampler: structural validity of generated chains across all layers;
a0 = dr(N); fixed draw count across retries; first triangle-validNis 171. - Witness: authenticity binding, session isolation, coercion-resistance statistical tests.
- Shamir: split and recover round-trips, commitment mismatch, subset recovery.
- At-rest protection: seal and unseal round-trip, wrong-key rejection.
- Framework: end-to-end encryption and decryption.
Two checkers, two objects, both running continuously. The Rust suite covers the implementation (108 tests). The EasyCrypt workflow covers the model. Neither substitutes for the other, and neither is a substitute for an independent audit.
20. Benchmarks
The Clock KDF cost is dominated by a single SHA-256 pass plus one mod R(N). It runs in well under a microsecond on typical hardware, and its cost is independent of the size of the input seed.
The sampler runs at near-constant time across six orders of magnitude in N, from roughly 10โถ to 10ยนโธ. That is the expected result of an O(1) closed-form sampling procedure.
21. Interactive Demo
An interactive browser visualisation of the security proof is available in demo/mrs-auth-security-game.html. It covers the Forest Game, adaptive attacker strategies, per-field histograms, a rolling-accuracy timeline, and a Shamir Secret Sharing walkthrough.
No build step. No server. No external dependency. Open the file directly in any modern browser.
See docs/user-manual.md for a full walkthrough.
22. Glossary
| Term | Meaning |
|---|---|
| Admissible pair | A pair (p, q) with gcd(p, q) = 1 and p โก 1 (mod q). |
m |
The double-cycle ratio, m = (p โ 1)/q. |
Digital root dr(N) |
The single digit you get by adding the digits of N repeatedly. In this framework, it lives in {1, โฆ, 9}. |
Positive anchor Aโ |
Aโ = dr(N), written with a subscript. Always at least 1. |
| Positive Anchor Convention | Aโ = dr(N) (range 1..9) instead of N mod 9 (range 0..8). Guarantees A โฅ 1 and puts the Frobenius boundary at 162. |
Base Bโ |
Bโ = (N โ pยทAโ)/q. |
| Representation | A pair (A, B) such that pยทA + qยทB = N. |
| Representation ladder | The sequence (Aโ + qยทk, Bโ โ pยทk) for k = 0, 1, โฆ, k_max. |
| Rung | One element of a ladder; one representation. |
| Fractal ladder โง | The sequence kโ, kโ + 9, kโ + 18, โฆ, k_max of valid indices for a representation. Every element is congruent to kโ modulo 9, and every rung carries the same digital signature. It is the set of triangle-valid rungs, one in every nine. |
| Digital signature (of a rung) | 19A + 9B = N, dr(A) = dr(N), dr(B) = dr(2ยทdr N). Identical on every rung of the fractal ladder. |
Representation count R(N) |
The number of representations. Closed form in ยง6. |
| Double cycle | The interlocking of the A-progression (step q) and the B-progression (step โp). |
| Level | A block of m consecutive rows in the sub-Frobenius grid. |
| Palindrome Block Theorem | The closed criterion d โฅ mยทr for representability below the Frobenius bound. |
| Frobenius number | The largest non-representable N: 143 for A โฅ 0, 162 under the Positive Anchor (A โฅ 1). The classical bound (p โ 1)(q โ 1) equals 144 for (19, 9). |
| Witness | A triple (k, A_k, B_k) for a fixed N. |
| Witness space | The set of all witnesses for a given N. Equals the double cycle. |
| Chain | A structured object built from a witness, used in authentication. |
| Clock decomposition | The bijection N โ (D, H, M, S, Ms), where N counts milliseconds in a day. |
| Clock KDF | The framework-native key derivation function, based on the chain position. |
| Temporal barrier | The sampler that returns a rung only before its deadline, and None after it. |
| Zeroize | Clearing the secret state; afterwards the attacker observes nothing. |
| Honey / decoy | A chain designed to be indistinguishable from the real one. |
| Honey blobs | The M ciphertexts of the honey layer, one of which contains the true chain. |
| Deniability | The property that no adversary can distinguish a witness from an alternative better than chance. |
ValidButUnbound |
A witness that is structurally valid but not bound to the master secret. |
| Triangle condition | dr(B) = dr(2ยทdr(N)). A stricter condition than mere representability. |
23. Papers
- RDSI, Representation, Domain Modelling and Software Implementation. DOI: 10.5281/zenodo.23077746
- The 19-9 System: N = 19A + 9B. DOI: 10.5281/zenodo.19474707
Background material for the 90/366/2520 transformation lives in docs/research-notes/.
24. Citation
Academic use does not require citation. If you'd like to cite this work anyway:
25. Disclaimer
Research Prototype.
MRS-AUTH-PQC is an active research-phase cryptographic framework, built on machine-checked EasyCrypt proofs of its abstract model and a comprehensive test suite for its Rust implementation. It has not undergone independent third-party security audit, formal code review, or red-team penetration testing, and it carries no certification of any kind. Treat production deployment accordingly until that review has happened.
Version 2.0.0 marks the transition from an HKDF-based hybrid KDF to a framework-native Clock KDF. It does not indicate a security audit or production readiness.
26. License
MRS-AUTH-PQC uses a dual-licensing model.
Open source use. The Rust implementation, the EasyCrypt proofs and the supporting scripts are released under the GNU Affero General Public License v3.0 (AGPL-3.0). You are free to use, study, modify and distribute the software under the terms of that license. The full text is in LICENSE.
Commercial use. Using MRS-AUTH-PQC in a proprietary product, or in a network service that does not disclose its full source code under the AGPL-3.0, requires a separate commercial license. See COMMERCIAL.md for the terms, or contact the author through the repository.
Documentation and papers. The README, the papers listed in ยง23, and the supporting documentation are released under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). Commercial use of the documentation requires prior written permission.
Why this model. The AGPL-3.0 guarantees that anyone who builds on this work, including in a hosted service, contributes their changes back to the community. A commercial license is available for organisations that cannot meet that requirement. This keeps the research open while making commercial adoption sustainable.
27. Support and Collaboration
This is independent research without institutional funding. The Rust implementation, the EasyCrypt proofs and the tests are open under the AGPL-3.0.
If you are a researcher, auditor or funder who would like to review this construction, support an independent audit, or help extend the formal verification, we would be glad to hear from you. Independent review is welcome, and it is the next natural step for a project at this stage.
Please reach out through the repository.
Commercial licensing. If your organisation wants to use MRS-AUTH-PQC in a proprietary product or a closed network service, a commercial license is available. See COMMERCIAL.md for the terms. Commercial licensing directly funds continued formal verification and independent audit work.
*The double cycle is not a trick. It is a fact about the integers.
The framework rests on a general p/q theorem that admits one cycle, two cycles, or many.
Of these, (19, 9) is the optimal choice:
the smallest pair that gives two cycles on the base-9 anchor the decimal system already uses.*