PQ-WB-KEM: White-Box ML-KEM-768 1.0
PQ-WB-KEM: Toward a White-Box Construction of ML-KEM-768 with Arithmetic Masking for M2M Communications - Mathematics (MDPI)
Loading...
Searching...
No Matches
entry_determinacy.py File Reference

Entry-determinacy dichotomy for the white-box ML-KEM-768 table families: measures the entry-determinacy degree d and the minimal table-access budget M* at which an access-pattern-oblivious, table-access-bounded adversary attains Z=1. More...

Go to the source code of this file.

Namespaces

namespace  entry_determinacy
 

Functions

 entry_determinacy.bijection_determinacy (perm)
 Entry-determinacy of a Z_q bijection by completion: with one entry omitted the missing image is the unique unused value; with two omitted the completions can be swapped.
 
 entry_determinacy.build_encoding_sublayer (rng)
 Output-encoding sublayer: per factor two secret Z_q bijections plus their inverses (only the two forward maps are independent).
 
 entry_determinacy.build_prf_table (key)
 SPACE-style control: q-entry table whose entries are AES-128(key, index) truncated into Z_q.
 
 entry_determinacy.linear_attack (table, M, inv)
 Read one entry at each candidate index, invert the linear model s = T[x0]*x0^-1, regenerate the whole table and score it.
 
 entry_determinacy.main ()
 Build both constructions plus the encoding sublayer and the AES-128 PRF control, measure entry-determinacy degrees, M* budgets and the key-determinism separator, and write JSON.
 
 entry_determinacy.modular_inverses ()
 Multiplicative inverses of 1..q-1 mod q (Fermat; q is prime).
 

Variables

int entry_determinacy.AES_BLOCK_BYTES = 16
 
int entry_determinacy.AES_KEY_BITS = 128
 
int entry_determinacy.EXPECTED_D_BAKED = 1
 
int entry_determinacy.EXPECTED_D_BIJECTION = Q - 1
 
int entry_determinacy.EXPECTED_D_SHARED = 0
 
int entry_determinacy.EXPECTED_M_STAR_BAKED_BYTES = 1536
 
int entry_determinacy.EXPECTED_M_STAR_SHARED_BYTES = 0
 
int entry_determinacy.EXPECTED_PRF_LINEAR_REGENERATIONS = 0
 
str entry_determinacy.PRIOR_FOOTPRINT_RANGE_TEXT = "7.59 MB to 17.02 GB"
 
tuple entry_determinacy.REJECTION_BOUND = (1 << 16) // Q * Q
 
int entry_determinacy.REJECTION_RETRY_LIMIT = 64
 

Detailed Description

Entry-determinacy dichotomy for the white-box ML-KEM-768 table families: measures the entry-determinacy degree d and the minimal table-access budget M* at which an access-pattern-oblivious, table-access-bounded adversary attains Z=1.

The entry-determinacy degree d of a table family is the minimum number of entries that determine the whole table. Two regimes are separated here by actual reconstruction attempts, not by assertion: NEGATIVE (algebraically determined): the budget at which the adversary attains Z=1 is M* = (independent secret scalars) x (bytes per entry), with no S_tbl term. Construction B bakes h(x) = shat*x mod q, which is Z_q-linear: one entry at a nonzero index yields shat by a modular inverse, so d=1 and the whole family regenerates from 2 entries per degree-2 factor (h2 is derived from shat1 and the public gamma_i). Construction A stores the public map M[x][y] = x*y mod q, which carries no secret: d=0 and M*=0. POSITIVE (entry-unpredictable): a random Z_q bijection admits no completion from a proper subset beyond its last entry (d = q-1), and an AES-128 PRF table admits none at all within the tested attack classes. The separator is NOT key-determinism: the SPACE-style PRF table is measured here to be exactly as key-determined as B (rebuilt byte-identically from the same key) yet resists the same attack. The separator is efficient local invertibility – B's key->table map is linear and inverts from one entry; AES-128's is a PRF.

Note
MEASURED: every d, M*, regeneration count and extrapolation rate below is computed from objects built in this run (repo builders build_shared_table and build_baked_tables) by running the reconstruction; no expected value is written into an output field. EXPECTED_* constants are prior-work targets used only to emit comparison booleans under comparison_to_expected.
The four counter-design footprints reported in prior work (7.59 MB to 17.02 GB) are NOT reproduced here; they are arithmetic extrapolations and are recorded under analytic_not_measured so nothing downstream cites them as measured.
Deterministic (seed 42); writes results/entry_determinacy.json byte-identically.

Output Files

Usage

Author
Ugur Coruh

Definition in file entry_determinacy.py.