Skip to content

DmcsBudget ​

The finite-size pieces that ship: the dimension price, the energy test and the length

16/16 passed in 2ms

TestWhat it doesResult
test_accept_halvesTheorem 4's acceptance half-width is Hoeffding's, the semidefinite form exactly half the general one, and it narrows as one over the square root of the rounds.✅ pass
test_energy_domaindm_energy refuses lT/kT≥w/r, where Theorem 3 does not hold, lT≥kT, and a radius leaving the incomplete gamma outside f64.✅ pass
test_energy_formulaThe returned logarithm is Eq. (5), log2⁡(lT+1) minus kT times the Bernoulli Kullback-Leibler divergence in bits between the observed and claimed failure fractions.✅ pass
test_energy_ratioTheorem 3's r is one over the regularised upper incomplete gamma to 1e-11 against the Poisson tail identity, and never below one.✅ pass
test_energy_tradeMore test rounds and a larger claimed weight each lower the energy-test failure probability, while Eq. (4) charges the larger weight back (Kanitschar Sec. VI B).✅ pass
test_length_approachesAt fixed keying fraction and leakage share the rate per signal rises with the block and converges from below on the entropy less leakage and dimension charge, to 1e-4 at 1014.✅ pass
test_length_assemblesdm_length returns Theorem 6 Eq. (9) in bits over the block, rebuilt here from the equipartition and dimension terms the same call returns, and floors only the reported length.✅ pass
test_length_guardsdm_length refuses an entropy above log2⁡|Z| and keyed rounds above n_total, and dm_price a one-symbol key map.✅ pass
test_length_sourcedm_length refuses an entropy from the asymptotic feasible set, whose minimum overstates the key since that set is contained in the relaxed one, and an unknown source.✅ pass
test_price_dominatesAt a weight of 1e-4 and 1012 signals the dimension-reduction charge, 0.101 bit per pulse, exceeds the equipartition correction by over three orders.✅ pass
test_price_formdm_price equals Kanitschar Eq. (4) evaluated here across five weights and four key-map sizes, and is exactly zero at zero weight.✅ pass
test_price_quoteddm_price gives the 0.101 and 1.34e-2 bit the certified refusal quotes and rises with both the weight and the key-map size.✅ pass
test_secpar_branchesEach of the two maximised branches, privacy amplification and testing, can bind the composed parameter.✅ pass
test_secpar_shapeKanitschar's five demonstration epsilons compose to their stated 1e-10 through a correctness term outside a maximum over two branches, which a plain sum overstates and a plain maximum understates.✅ pass
test_weight_fallsMore test rounds buy a smaller weight and a smaller dimension-reduction charge at a fixed failure probability, and a positive target logarithm is refused.✅ pass
test_weight_invertsdm_wchoice's wϵ (Sec. VI B) inverts Eq. (5): fed back to the energy test it returns the target logarithm to 1e-6.✅ pass