code wiki / _hdl_build / nx_kanon.nx

nx_kanon.nx

buildroot/runtime/_hdl_build/nx_kanon.nx

2138 B47 linesdepth 2pulls 2 transitivereach 16 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_kanon.nx -- LIB (PURE math, no I/O): the k-anonymity FLOOR primitive. Load-bearing privacy foundation under ADS-018 conversion measurement AND W-AN-CHARTER-002 / W-CLI-C6 anti-harm analytics (DRY rule 15 -- ONE k-anon home). Non-ads named on purpose so the analytics charter can ride it without importing ad code. THE INVARIANT: an aggregate count is RELEASED only when it cannot single out a person -- i.e. count == 0 (reveals nobody) or count >= K. A count in [1, K-1] is SUPPRESSED. After release, NO released cell carries a count in [1, K-1] (cells_below_k == 0). PURE: K arrives as a parameter; the SOURCE of K is config in the sovereign store (the ad engine reads it via nx_ad_store -> adcfg:kanon_k), never a TSV/conf flat file. Keeping this lib pure means any consumer (ads, analytics) supplies its own K source. license_tier: ORIGINAL

dependencies 1 imports · 6 importers

nx_syscalls.nx nx_kanon.nx nx_ad_conversion.nx nx_ad_conversion_gate.nx nx_ad_feedback.nx nx_ad_feedback_gate.nx nx_ad_meter.nx nx_kanon_gate.nx

imports: nx_syscalls.nx

imported by: nx_ad_conversion.nxnx_ad_conversion_gate.nxnx_ad_feedback.nxnx_ad_feedback_gate.nxnx_ad_meter.nxnx_kanon_gate.nx

structs

none

consts

none

functions

17func kn_release(n: i64, k: i64) -> i64
25func kn_apply(raw: *i64, m: i64, k: i64, out: *i64) -> i64
called by 1: main calls 1: kn_release
38func kn_count_below(vals: *i64, m: i64, k: i64) -> i64
called by 1: main