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
concrete_security_bounds Namespace Reference

Functions

Dict[str, Any] calculate_dca_security_bits (int num_traces, float measured_correlation, int num_shares)
 DCA security in bits from measured correlation.
 
Dict[str, Any] calculate_table_footprint (int table_size_bytes)
 Byte-read footprint of the protected core, as an engineering magnitude.
 
Dict[str, Any] load_experimental_results (str results_dir)
 Load DCA and overhead JSON results if present.
 
tuple load_measured_footprints (str results_dir)
 Derive the two construction footprints from the committed measurements.
 
 main ()
 Compute all bounds, print the summary, and write the JSON output.
 

Variables

dict ML_KEM_768_PARAMS
 
dict WB_PARAMS
 

Function Documentation

◆ calculate_dca_security_bits()

Dict[str, Any] concrete_security_bounds.calculate_dca_security_bits ( int  num_traces,
float  measured_correlation,
int   num_shares 
)

DCA security in bits from measured correlation.

Parameters
num_tracesTraces used in the DCA simulation.
measured_correlationCorrelation rho of the correct-key hypothesis.
num_sharesNumber of masking shares.
Returns
Dict of first-order, higher-order, and combined bit-security.
Note
First-order trace complexity is estimated by the standard 1/rho^2 rule (rho taken at face value); higher-order as q^(n-1). Because rho sits at or below the 1/sqrt(num_traces) sampling-noise floor, this is an engineering estimate, not a security proof.

Definition at line 58 of file concrete_security_bounds.py.

Referenced by main().

+ Here is the caller graph for this function:

◆ calculate_table_footprint()

Dict[str, Any] concrete_security_bounds.calculate_table_footprint ( int  table_size_bytes)

Byte-read footprint of the protected core, as an engineering magnitude.

Parameters
table_size_bytesTotal table storage in bytes, taken from the measured artifacts.
Returns
Dict of table size and the byte-reads needed to copy it.
Note
A SIZE, not a security bound and not an extraction cost. The core is a deterministic function of the secret with entry-determinacy degree <= 1, so an adversary regenerates it from |s_hat| without reading the footprint (entry_determinacy.py, table_extraction_witness.py).

Definition at line 114 of file concrete_security_bounds.py.

Referenced by main().

+ Here is the caller graph for this function:

◆ load_experimental_results()

Dict[str, Any] concrete_security_bounds.load_experimental_results ( str  results_dir)

Load DCA and overhead JSON results if present.

Parameters
results_dirDirectory holding the experiment JSON files.
Returns
Dict with optional "dca" and "overhead" entries.

Definition at line 139 of file concrete_security_bounds.py.

Referenced by main().

+ Here is the caller graph for this function:

◆ load_measured_footprints()

tuple concrete_security_bounds.load_measured_footprints ( str  results_dir)

Derive the two construction footprints from the committed measurements.

Parameters
results_dirDirectory holding the experiment JSON files.
Returns
(table_bytes_A, table_bytes_B) total footprints in BYTES.

A = measured base table (whitebox_reference.json, A_shared_full_table) plus the measured encoding sublayer (whitebox_encoded.json); B likewise with the baked per-component table. Absence is a hard error – no value is hardcoded or substituted.

Note
Bytes, not MB: the producers emit both, and routing through a 2-decimal MB figure both loses precision and invites a MB/MiB confusion at the conversion.

Definition at line 160 of file concrete_security_bounds.py.

Referenced by main().

+ Here is the caller graph for this function:

◆ main()

concrete_security_bounds.main ( void  )

Compute all bounds, print the summary, and write the JSON output.

Returns
Dict of parameters, inputs, and security bounds.

Definition at line 194 of file concrete_security_bounds.py.

References calculate_dca_security_bits(), calculate_table_footprint(), load_experimental_results(), load_measured_footprints(), and main().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ ML_KEM_768_PARAMS

dict concrete_security_bounds.ML_KEM_768_PARAMS
Initial value:
1= {
2 "n": 256,
3 "k": 3,
4 "q": 3329,
5 "eta1": 2,
6 "eta2": 2,
7}

Definition at line 40 of file concrete_security_bounds.py.

◆ WB_PARAMS

dict concrete_security_bounds.WB_PARAMS
Initial value:
1= {
2 "num_shares": 3,
3}

Definition at line 53 of file concrete_security_bounds.py.