|
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)
|
Variables | |
| _sage_const_2 | |
| _sage_const_60 = Integer(2) | |
| all_degree_2 = all(f[0].degree() == 2 for f in factors) | |
| all_passed = all(results["verifications"].values()) | |
| tuple | correct_factorization = (num_factors == 128 and all_degree_2) |
| default | |
| tuple | divides = (group_order % n == 0) |
| tuple | divides_512 = (group_order % 512 == 0) |
| exist_ok | |
| f | |
| int | factors = poly.factor() |
| gamma = zeta_Zq^(2*i + 1) | |
| int | group_order = q - 1 |
| indent | |
| int | irreducible_count = 0 |
| tuple | is_256th_root = (zeta_256 == 1) |
| int | is_irred = quad_poly.is_irreducible() |
| tuple | is_primitive = (zeta_128 == Zq(-1)) |
| tuple | is_qnr = (legendre == -1) |
| legendre = kronecker(Integer(gamma), q) | |
| int | n = 256 |
| tuple | not_64th_root = (zeta_64 != 1 and zeta_64 != Zq(-1)) |
| num_factors = len(factors) | |
| output_file = os.path.join(results_dir, "ntt_verification.json") | |
| int | poly = X^256 + 1 |
| int | q = 3329 |
| int | qnr_count = 0 |
| list | qnr_failures = [] |
| int | quad_poly = X^2 - gamma |
| R = R._first_ngens(1) | |
| dict | results |
| results_dir = os.path.join(os.path.dirname(os.path.dirname(script_dir)), "results") | |
| script_dir = os.path.dirname(os.path.abspath(__file__)) | |
| str | status = "PASS" if value else "FAIL" |
| int | zeta = 17 |
| int | zeta_128 = zeta_Zq^128 |
| int | zeta_256 = zeta_Zq^256 |
| int | zeta_64 = zeta_Zq^64 |
| zeta_Zq = Zq(zeta) | |
| Zq = GF(q) | |
|
protected |
Definition at line 175 of file ntt_verification.sage.py.
|
protected |
Definition at line 6 of file ntt_verification.sage.py.
Definition at line 84 of file ntt_verification.sage.
| ntt_verification.all_passed = all(results["verifications"].values()) |
Definition at line 135 of file ntt_verification.sage.
| tuple ntt_verification.correct_factorization = (num_factors == 128 and all_degree_2) |
Definition at line 86 of file ntt_verification.sage.
| ntt_verification.default |
Definition at line 157 of file ntt_verification.sage.
| tuple ntt_verification.divides = (group_order % n == 0) |
Definition at line 35 of file ntt_verification.sage.
| tuple ntt_verification.divides_512 = (group_order % 512 == 0) |
Definition at line 68 of file ntt_verification.sage.
| ntt_verification.exist_ok |
Definition at line 153 of file ntt_verification.sage.
| ntt_verification.f |
Definition at line 157 of file ntt_verification.sage.
| ntt_verification.factors = poly.factor() |
Definition at line 78 of file ntt_verification.sage.
| ntt_verification.gamma = zeta_Zq^(2*i + 1) |
Definition at line 99 of file ntt_verification.sage.
| ntt_verification.group_order = q - 1 |
Definition at line 29 of file ntt_verification.sage.
| ntt_verification.indent |
Definition at line 157 of file ntt_verification.sage.
| ntt_verification.irreducible_count = 0 |
Definition at line 118 of file ntt_verification.sage.
| tuple ntt_verification.is_256th_root = (zeta_256 == 1) |
Definition at line 46 of file ntt_verification.sage.
| ntt_verification.is_irred = quad_poly.is_irreducible() |
Definition at line 122 of file ntt_verification.sage.
Definition at line 53 of file ntt_verification.sage.
| tuple ntt_verification.is_qnr = (legendre == -1) |
Definition at line 102 of file ntt_verification.sage.
Definition at line 101 of file ntt_verification.sage.
| ntt_verification.n = 256 |
Definition at line 17 of file ntt_verification.sage.
Definition at line 60 of file ntt_verification.sage.
| ntt_verification.num_factors = len(factors) |
Definition at line 85 of file ntt_verification.sage.
| ntt_verification.output_file = os.path.join(results_dir, "ntt_verification.json") |
Definition at line 154 of file ntt_verification.sage.
| ntt_verification.poly = X^256 + 1 |
Definition at line 77 of file ntt_verification.sage.
| ntt_verification.q = 3329 |
Definition at line 16 of file ntt_verification.sage.
| ntt_verification.qnr_count = 0 |
Definition at line 95 of file ntt_verification.sage.
| list ntt_verification.qnr_failures = [] |
Definition at line 96 of file ntt_verification.sage.
| ntt_verification.quad_poly = X^2 - gamma |
Definition at line 121 of file ntt_verification.sage.
| ntt_verification.R = R._first_ngens(1) |
Definition at line 88 of file ntt_verification.sage.py.
| dict ntt_verification.results |
Definition at line 20 of file ntt_verification.sage.
| ntt_verification.results_dir = os.path.join(os.path.dirname(os.path.dirname(script_dir)), "results") |
Definition at line 152 of file ntt_verification.sage.
| ntt_verification.script_dir = os.path.dirname(os.path.abspath(__file__)) |
Definition at line 151 of file ntt_verification.sage.
| str ntt_verification.status = "PASS" if value else "FAIL" |
Definition at line 139 of file ntt_verification.sage.
| ntt_verification.zeta = 17 |
Definition at line 18 of file ntt_verification.sage.
| ntt_verification.zeta_128 = zeta_Zq^128 |
Definition at line 52 of file ntt_verification.sage.
| ntt_verification.zeta_256 = zeta_Zq^256 |
Definition at line 45 of file ntt_verification.sage.
| ntt_verification.zeta_64 = zeta_Zq^64 |
Definition at line 59 of file ntt_verification.sage.
Definition at line 42 of file ntt_verification.sage.
| ntt_verification.Zq = GF(q) |
Definition at line 28 of file ntt_verification.sage.