|
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)
|
Classes | |
| class | _CountingArray |
| Array proxy that charges every indexed entry to a read budget. More... | |
| class | ReadCountingTables |
| Baked-table view that counts every entry fetched by the extractor. More... | |
Functions | |
| _bit_exact (a, b) | |
| Bit-exact comparison of two baked table sets. | |
| _build_encoding_sublayer (seed) | |
| Output-encoding sublayer: per factor two random Z_q bijections plus their two derived inverses. | |
| _invertibility_sweep (tabs, sh) | |
| Check that every nonzero index recovers the baked scalar: s0 = h0[x]*x^-1. | |
| _measure_determinacy_degree_baked (seed_a, seed_b) | |
| Measure Construction B's entry-determinacy degree d instead of asserting it. | |
| _secret_polys (seed) | |
| ML-KEM-768 secret: K polys, coefficients uniform over {-2..2} (the CBD support; the extraction budget is distribution-independent), in the NTT domain. | |
| _stored_bytes (tabs) | |
| Serialized footprint of one polynomial's baked table set. | |
| extract_and_regenerate (view, gammas) | |
| Read the determining entries of each baked table and rebuild the full set. | |
| main () | |
| Run the entry-determinacy witness on both constructions and write JSON. | |
Variables | |
| int | ENC_INDEPENDENT_PER_FACTOR = 2 |
| int | ENC_TABLES_PER_FACTOR = 4 |
| m | |
| reads | |
| int | SEED = 42 |
| tuple | SEEDS = (42, 1337, 20250714, 7, 99) |
| int | Z_TRIALS = 1000 |
|
protected |
Bit-exact comparison of two baked table sets.
| a | First table set; |
| b | Second table set. |
Definition at line 236 of file table_extraction_witness.py.
Referenced by main().
Here is the caller graph for this function:
|
protected |
Output-encoding sublayer: per factor two random Z_q bijections plus their two derived inverses.
| seed | Deterministic seed. |
Definition at line 138 of file table_extraction_witness.py.
Referenced by main().
Here is the caller graph for this function:
|
protected |
Check that every nonzero index recovers the baked scalar: s0 = h0[x]*x^-1.
| tabs | Baked tables for one polynomial; |
| sh | The polynomial's secret. |
Definition at line 250 of file table_extraction_witness.py.
Referenced by main().
Here is the caller graph for this function:
|
protected |
Measure Construction B's entry-determinacy degree d instead of asserting it.
Sufficiency: one charged read per baked table regenerates it bit-exactly. Minimality: two distinct secrets yield different tables, so zero entries cannot determine the family and d > 0. The two results pin d exactly.
| seed_a | First secret seed; |
| seed_b | Independent secret seed. |
Definition at line 194 of file table_extraction_witness.py.
References _secret_polys().
Referenced by main().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
ML-KEM-768 secret: K polys, coefficients uniform over {-2..2} (the CBD support; the extraction budget is distribution-independent), in the NTT domain.
| seed | Deterministic seed. |
Definition at line 71 of file table_extraction_witness.py.
Referenced by _measure_determinacy_degree_baked(), and main().
Here is the caller graph for this function:
|
protected |
Serialized footprint of one polynomial's baked table set.
| tabs | List of (h0, h1, h2) uint16 triples. |
Definition at line 129 of file table_extraction_witness.py.
Referenced by main().
Here is the caller graph for this function:| table_extraction_witness.extract_and_regenerate | ( | view, | |
| gammas | |||
| ) |
Read the determining entries of each baked table and rebuild the full set.
h(x) = shat*x is Z_q-linear, so the entry at the unit index is the baked scalar; h2 needs no extra read because gamma_i is public.
| view | ReadCountingTables over the target table set. |
| gammas | Public component twiddles. |
Definition at line 169 of file table_extraction_witness.py.
Referenced by main().
Here is the caller graph for this function:| table_extraction_witness.main | ( | void | ) |
Run the entry-determinacy witness on both constructions and write JSON.
Definition at line 270 of file table_extraction_witness.py.
References _bit_exact(), _build_encoding_sublayer(), _invertibility_sweep(), _measure_determinacy_degree_baked(), _secret_polys(), _stored_bytes(), and extract_and_regenerate().
Here is the call graph for this function:| int table_extraction_witness.ENC_INDEPENDENT_PER_FACTOR = 2 |
Definition at line 68 of file table_extraction_witness.py.
| int table_extraction_witness.ENC_TABLES_PER_FACTOR = 4 |
Definition at line 67 of file table_extraction_witness.py.
| table_extraction_witness.m |
Definition at line 405 of file table_extraction_witness.py.
| table_extraction_witness.reads |
Definition at line 406 of file table_extraction_witness.py.
| int table_extraction_witness.SEED = 42 |
Definition at line 64 of file table_extraction_witness.py.
| tuple table_extraction_witness.SEEDS = (42, 1337, 20250714, 7, 99) |
Definition at line 65 of file table_extraction_witness.py.
| int table_extraction_witness.Z_TRIALS = 1000 |
Definition at line 66 of file table_extraction_witness.py.