8.1. Algebraic immunity
-
CryptBoolean.binaryWeight_ofBits[complete] -
CryptBoolean.binaryWeight_two_pow_sub_one[complete] -
CryptBoolean.ofBits_eq_sum[complete] -
CryptBoolean.rotateBinaryExponent[complete] -
CryptBoolean.testBit_rotateBinaryExponent[complete] -
CryptBoolean.binaryCyclicExponent[complete] -
CryptBoolean.binaryCyclicExponent_lt[complete] -
CryptBoolean.binaryCyclicExponent_succ_eq_rotate[complete] -
CryptBoolean.binaryWeight_binaryCyclicExponent[complete] -
CryptBoolean.binaryCyclicExponent_pos[complete] -
CryptBoolean.pow_binaryCyclicExponent[complete] -
CryptBoolean.functionAlgebraicDegree_traceMonomial_le_binaryWeight[complete] -
CryptBoolean.tracePowerFunction[complete] -
CryptBoolean.cyclicOneRunCount[complete] -
CryptBoolean.cyclicOneRunCount_binaryCyclicExponent[complete] -
CryptBoolean.cyclicOneRunCount_pos[complete] -
CryptBoolean.traceRunMultiplierPositions[complete] -
CryptBoolean.traceRunMultiplierExponent[complete] -
CryptBoolean.bitIndices_traceRunMultiplierExponent[complete] -
CryptBoolean.testBit_traceRunMultiplierExponent[complete] -
CryptBoolean.traceRunMultiplierExponent_lt_two_pow[complete] -
CryptBoolean.binaryWeight_traceRunMultiplierExponent[complete] -
CryptBoolean.positiveCyclicSum[complete] -
CryptBoolean.pow_positiveCyclicSum[complete] -
CryptBoolean.binaryWeight_positiveCyclicSum_traceRunMultiplier_le[complete] -
CryptBoolean.binaryWeight_traceRunMultiplier_add_binaryCyclicExponent_le[complete] -
CryptBoolean.algebraicImmunity_tracePowerFunction_le_runBound[complete]
Algebraic immunity of trace monomials (Carlet, p. 134). Let n>0, let
K=\operatorname{GF}(2^n), and let d be represented modulo 2^n-1
by an n-bit word. Let r(d) be the number of cyclic maximal nonempty
blocks of consecutive ones in this word. For a\in K, define
f(x)=\operatorname{Tr}_n(ax^d).
If r(d)<\sqrt n/2, then
\operatorname{AI}(f)\le
r(d)\lfloor\sqrt n\rfloor+
\left\lceil\frac{n}{\lfloor\sqrt n\rfloor}\right\rceil-1.
Lean code for Theorem8.1.1●27 declarations
Associated Lean declarations
-
CryptBoolean.binaryWeight_ofBits[complete]
-
CryptBoolean.binaryWeight_two_pow_sub_one[complete]
-
CryptBoolean.ofBits_eq_sum[complete]
-
CryptBoolean.rotateBinaryExponent[complete]
-
CryptBoolean.testBit_rotateBinaryExponent[complete]
-
CryptBoolean.binaryCyclicExponent[complete]
-
CryptBoolean.binaryCyclicExponent_lt[complete]
-
CryptBoolean.binaryCyclicExponent_succ_eq_rotate[complete]
-
CryptBoolean.binaryWeight_binaryCyclicExponent[complete]
-
CryptBoolean.binaryCyclicExponent_pos[complete]
-
CryptBoolean.pow_binaryCyclicExponent[complete]
-
CryptBoolean.functionAlgebraicDegree_traceMonomial_le_binaryWeight[complete]
-
CryptBoolean.tracePowerFunction[complete]
-
CryptBoolean.cyclicOneRunCount[complete]
-
CryptBoolean.cyclicOneRunCount_binaryCyclicExponent[complete]
-
CryptBoolean.cyclicOneRunCount_pos[complete]
-
CryptBoolean.traceRunMultiplierPositions[complete]
-
CryptBoolean.traceRunMultiplierExponent[complete]
-
CryptBoolean.bitIndices_traceRunMultiplierExponent[complete]
-
CryptBoolean.testBit_traceRunMultiplierExponent[complete]
-
CryptBoolean.traceRunMultiplierExponent_lt_two_pow[complete]
-
CryptBoolean.binaryWeight_traceRunMultiplierExponent[complete]
-
CryptBoolean.positiveCyclicSum[complete]
-
CryptBoolean.pow_positiveCyclicSum[complete]
-
CryptBoolean.binaryWeight_positiveCyclicSum_traceRunMultiplier_le[complete]
-
CryptBoolean.binaryWeight_traceRunMultiplier_add_binaryCyclicExponent_le[complete]
-
CryptBoolean.algebraicImmunity_tracePowerFunction_le_runBound[complete]
-
CryptBoolean.binaryWeight_ofBits[complete] -
CryptBoolean.binaryWeight_two_pow_sub_one[complete] -
CryptBoolean.ofBits_eq_sum[complete] -
CryptBoolean.rotateBinaryExponent[complete] -
CryptBoolean.testBit_rotateBinaryExponent[complete] -
CryptBoolean.binaryCyclicExponent[complete] -
CryptBoolean.binaryCyclicExponent_lt[complete] -
CryptBoolean.binaryCyclicExponent_succ_eq_rotate[complete] -
CryptBoolean.binaryWeight_binaryCyclicExponent[complete] -
CryptBoolean.binaryCyclicExponent_pos[complete] -
CryptBoolean.pow_binaryCyclicExponent[complete] -
CryptBoolean.functionAlgebraicDegree_traceMonomial_le_binaryWeight[complete] -
CryptBoolean.tracePowerFunction[complete] -
CryptBoolean.cyclicOneRunCount[complete] -
CryptBoolean.cyclicOneRunCount_binaryCyclicExponent[complete] -
CryptBoolean.cyclicOneRunCount_pos[complete] -
CryptBoolean.traceRunMultiplierPositions[complete] -
CryptBoolean.traceRunMultiplierExponent[complete] -
CryptBoolean.bitIndices_traceRunMultiplierExponent[complete] -
CryptBoolean.testBit_traceRunMultiplierExponent[complete] -
CryptBoolean.traceRunMultiplierExponent_lt_two_pow[complete] -
CryptBoolean.binaryWeight_traceRunMultiplierExponent[complete] -
CryptBoolean.positiveCyclicSum[complete] -
CryptBoolean.pow_positiveCyclicSum[complete] -
CryptBoolean.binaryWeight_positiveCyclicSum_traceRunMultiplier_le[complete] -
CryptBoolean.binaryWeight_traceRunMultiplier_add_binaryCyclicExponent_le[complete] -
CryptBoolean.algebraicImmunity_tracePowerFunction_le_runBound[complete]
-
theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
theorem CryptBoolean.binaryWeight_ofBits {n : ℕ} (f : Fin n → Bool) : CryptBoolean.binaryWeight (Nat.ofBits f) = ∑ i, (f i).toNat
theorem CryptBoolean.binaryWeight_ofBits {n : ℕ} (f : Fin n → Bool) : CryptBoolean.binaryWeight (Nat.ofBits f) = ∑ i, (f i).toNat
The binary weight of an `n`-bit word is the sum of its Boolean digits.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
theorem CryptBoolean.binaryWeight_two_pow_sub_one (n : ℕ) : CryptBoolean.binaryWeight (2 ^ n - 1) = n
theorem CryptBoolean.binaryWeight_two_pow_sub_one (n : ℕ) : CryptBoolean.binaryWeight (2 ^ n - 1) = n
The all-ones `n`-bit word has binary weight `n`.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
theorem CryptBoolean.ofBits_eq_sum {n : ℕ} (f : Fin n → Bool) : Nat.ofBits f = ∑ i, (f i).toNat * 2 ^ ↑i
theorem CryptBoolean.ofBits_eq_sum {n : ℕ} (f : Fin n → Bool) : Nat.ofBits f = ∑ i, (f i).toNat * 2 ^ ↑i
Reconstructing a bounded binary word is its place-value expansion.
-
defdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
def CryptBoolean.rotateBinaryExponent (n k : ℕ) : ℕ
def CryptBoolean.rotateBinaryExponent (n k : ℕ) : ℕ
One cyclic left rotation of the low `n` binary digits of an exponent.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
theorem CryptBoolean.testBit_rotateBinaryExponent (n k : ℕ) (i : Fin n) : (CryptBoolean.rotateBinaryExponent n k).testBit ↑i = k.testBit ↑((Equiv.symm (finRotate n)) i)
theorem CryptBoolean.testBit_rotateBinaryExponent (n k : ℕ) (i : Fin n) : (CryptBoolean.rotateBinaryExponent n k).testBit ↑i = k.testBit ↑((Equiv.symm (finRotate n)) i)
-
defdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
def CryptBoolean.binaryCyclicExponent (n k s : ℕ) : ℕ
def CryptBoolean.binaryCyclicExponent (n k s : ℕ) : ℕ
Multiplication of an exponent by a Frobenius power, reduced modulo `2^n-1`.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
theorem CryptBoolean.binaryCyclicExponent_lt (n k : ℕ) (hn : 0 < n) (s : ℕ) : CryptBoolean.binaryCyclicExponent n k s < 2 ^ n - 1
theorem CryptBoolean.binaryCyclicExponent_lt (n k : ℕ) (hn : 0 < n) (s : ℕ) : CryptBoolean.binaryCyclicExponent n k s < 2 ^ n - 1
A positive-dimensional cyclic exponent is the canonical residue modulo `2^n-1`.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
theorem CryptBoolean.binaryCyclicExponent_succ_eq_rotate (n k s : ℕ) (hn : 0 < n) : CryptBoolean.binaryCyclicExponent n k (s + 1) = CryptBoolean.rotateBinaryExponent n (CryptBoolean.binaryCyclicExponent n k s)
theorem CryptBoolean.binaryCyclicExponent_succ_eq_rotate (n k s : ℕ) (hn : 0 < n) : CryptBoolean.binaryCyclicExponent n k (s + 1) = CryptBoolean.rotateBinaryExponent n (CryptBoolean.binaryCyclicExponent n k s)
Successive Frobenius multiplication applies one cyclic binary rotation.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
theorem CryptBoolean.binaryWeight_binaryCyclicExponent (n k s : ℕ) (hn : 0 < n) (hk : k < 2 ^ n - 1) : CryptBoolean.binaryWeight (CryptBoolean.binaryCyclicExponent n k s) = CryptBoolean.binaryWeight k
theorem CryptBoolean.binaryWeight_binaryCyclicExponent (n k s : ℕ) (hn : 0 < n) (hk : k < 2 ^ n - 1) : CryptBoolean.binaryWeight (CryptBoolean.binaryCyclicExponent n k s) = CryptBoolean.binaryWeight k
Frobenius multiplication cyclically rotates the `n`-bit exponent and preserves its binary weight.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
theorem CryptBoolean.binaryCyclicExponent_pos {n k : ℕ} (hn : 0 < n) (hk0 : 0 < k) (hk : k < 2 ^ n - 1) (s : ℕ) : 0 < CryptBoolean.binaryCyclicExponent n k s
theorem CryptBoolean.binaryCyclicExponent_pos {n k : ℕ} (hn : 0 < n) (hk0 : 0 < k) (hk : k < 2 ^ n - 1) (s : ℕ) : 0 < CryptBoolean.binaryCyclicExponent n k s
A nonzero canonical exponent stays nonzero under Frobenius rotation.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
theorem CryptBoolean.pow_binaryCyclicExponent {n k : ℕ} (hn : 0 < n) (hk0 : 0 < k) (hk : k < 2 ^ n - 1) (x : CryptBoolean.BinaryGaloisField n) (s : ℕ) : x ^ CryptBoolean.binaryCyclicExponent n k s = x ^ (k * 2 ^ s)
theorem CryptBoolean.pow_binaryCyclicExponent {n k : ℕ} (hn : 0 < n) (hk0 : 0 < k) (hk : k < 2 ^ n - 1) (x : CryptBoolean.BinaryGaloisField n) (s : ℕ) : x ^ CryptBoolean.binaryCyclicExponent n k s = x ^ (k * 2 ^ s)
Reducing a positive exponent in its Frobenius orbit does not change the associated finite-field power function, including at zero.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.leancomplete
theorem CryptBoolean.functionAlgebraicDegree_traceMonomial_le_binaryWeight {n k : ℕ} (hn : 0 < n) (hk : k ≤ 2 ^ n - 1) (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n) (a : CryptBoolean.BinaryGaloisField n) : (FABL.functionAlgebraicDegree fun x => (CryptBoolean.absoluteTrace n) (a * θ x ^ k)) ≤ CryptBoolean.binaryWeight k
theorem CryptBoolean.functionAlgebraicDegree_traceMonomial_le_binaryWeight {n k : ℕ} (hn : 0 < n) (hk : k ≤ 2 ^ n - 1) (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n) (a : CryptBoolean.BinaryGaloisField n) : (FABL.functionAlgebraicDegree fun x => (CryptBoolean.absoluteTrace n) (a * θ x ^ k)) ≤ CryptBoolean.binaryWeight k
A trace monomial whose exponent is represented by at most `n` binary digits has algebraic degree at most the exponent's binary weight.
-
defdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
def CryptBoolean.tracePowerFunction {n : ℕ} (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n) (a : CryptBoolean.BinaryGaloisField n) (d : ℕ) : CryptBoolean.BooleanFunction n
def CryptBoolean.tracePowerFunction {n : ℕ} (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n) (a : CryptBoolean.BinaryGaloisField n) (d : ℕ) : CryptBoolean.BooleanFunction n
A Boolean trace-power function in fixed finite-field coordinates.
-
defdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
def CryptBoolean.cyclicOneRunCount (n d : ℕ) : ℕ
def CryptBoolean.cyclicOneRunCount (n d : ℕ) : ℕ
The number of cyclic one-runs in the canonical `n`-bit representative of an exponent modulo `2^n-1`.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
theorem CryptBoolean.cyclicOneRunCount_binaryCyclicExponent {n d s : ℕ} (hn : 0 < n) (hd : d < 2 ^ n - 1) : CryptBoolean.cyclicOneRunCount n (CryptBoolean.binaryCyclicExponent n d s) = CryptBoolean.cyclicOneRunCount n d
theorem CryptBoolean.cyclicOneRunCount_binaryCyclicExponent {n d s : ℕ} (hn : 0 < n) (hd : d < 2 ^ n - 1) : CryptBoolean.cyclicOneRunCount n (CryptBoolean.binaryCyclicExponent n d s) = CryptBoolean.cyclicOneRunCount n d
Cyclic Frobenius rotation preserves the number of cyclic one-runs.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
theorem CryptBoolean.cyclicOneRunCount_pos {n d : ℕ} (hn : 0 < n) (hd0 : 0 < d) (hd : d < 2 ^ n - 1) : 0 < CryptBoolean.cyclicOneRunCount n d
theorem CryptBoolean.cyclicOneRunCount_pos {n d : ℕ} (hn : 0 < n) (hd0 : 0 < d) (hd : d < 2 ^ n - 1) : 0 < CryptBoolean.cyclicOneRunCount n d
Every nonzero canonical exponent has a nonempty cyclic one-run.
-
defdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
def CryptBoolean.traceRunMultiplierPositions (n : ℕ) : List ℕ
def CryptBoolean.traceRunMultiplierPositions (n : ℕ) : List ℕ
The nonzero bit positions of the Nawaz--Gong--Gupta multiplier. If `k = n mod ⌊√n⌋` vanishes these are `0,⌊√n⌋,…`; otherwise they are `0,k,k+⌊√n⌋,…`, exactly as in the cited construction.
-
defdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
def CryptBoolean.traceRunMultiplierExponent (n : ℕ) : ℕ
def CryptBoolean.traceRunMultiplierExponent (n : ℕ) : ℕ
The Nawaz--Gong--Gupta multiplier exponent.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
theorem CryptBoolean.bitIndices_traceRunMultiplierExponent {n : ℕ} (hn : 0 < n) : (CryptBoolean.traceRunMultiplierExponent n).bitIndices = CryptBoolean.traceRunMultiplierPositions n
theorem CryptBoolean.bitIndices_traceRunMultiplierExponent {n : ℕ} (hn : 0 < n) : (CryptBoolean.traceRunMultiplierExponent n).bitIndices = CryptBoolean.traceRunMultiplierPositions n
-
theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
theorem CryptBoolean.testBit_traceRunMultiplierExponent {n i : ℕ} (hn : 0 < n) : (CryptBoolean.traceRunMultiplierExponent n).testBit i = true ↔ i ∈ CryptBoolean.traceRunMultiplierPositions n
theorem CryptBoolean.testBit_traceRunMultiplierExponent {n i : ℕ} (hn : 0 < n) : (CryptBoolean.traceRunMultiplierExponent n).testBit i = true ↔ i ∈ CryptBoolean.traceRunMultiplierPositions n
-
theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
theorem CryptBoolean.traceRunMultiplierExponent_lt_two_pow {n : ℕ} (hn : 0 < n) : CryptBoolean.traceRunMultiplierExponent n < 2 ^ n
theorem CryptBoolean.traceRunMultiplierExponent_lt_two_pow {n : ℕ} (hn : 0 < n) : CryptBoolean.traceRunMultiplierExponent n < 2 ^ n
-
theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
theorem CryptBoolean.binaryWeight_traceRunMultiplierExponent {n : ℕ} (hn : 0 < n) : CryptBoolean.binaryWeight (CryptBoolean.traceRunMultiplierExponent n) = n ⌈/⌉ n.sqrt
theorem CryptBoolean.binaryWeight_traceRunMultiplierExponent {n : ℕ} (hn : 0 < n) : CryptBoolean.binaryWeight (CryptBoolean.traceRunMultiplierExponent n) = n ⌈/⌉ n.sqrt
The multiplier has precisely `⌈n/⌊√n⌋⌉` nonzero binary digits.
-
defdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
def CryptBoolean.positiveCyclicSum (n x y : ℕ) : ℕ
def CryptBoolean.positiveCyclicSum (n x y : ℕ) : ℕ
The positive representative of `x+y` modulo `2^n-1`, for bounded positive summands.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
theorem CryptBoolean.pow_positiveCyclicSum {n x y : ℕ} (hn : 0 < n) (hxy : 0 < x + y) (z : CryptBoolean.BinaryGaloisField n) : z ^ CryptBoolean.positiveCyclicSum n x y = z ^ (x + y)
theorem CryptBoolean.pow_positiveCyclicSum {n x y : ℕ} (hn : 0 < n) (hxy : 0 < x + y) (z : CryptBoolean.BinaryGaloisField n) : z ^ CryptBoolean.positiveCyclicSum n x y = z ^ (x + y)
Positive cyclic reduction of an exponent preserves finite-field powers, including at zero.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
theorem CryptBoolean.binaryWeight_positiveCyclicSum_traceRunMultiplier_le {n x : ℕ} (hn : 0 < n) (hx : x < 2 ^ n - 1) : CryptBoolean.binaryWeight (CryptBoolean.positiveCyclicSum n x (CryptBoolean.traceRunMultiplierExponent n)) ≤ CryptBoolean.cyclicOneRunCount n x * (n.sqrt - 1) + n ⌈/⌉ n.sqrt
theorem CryptBoolean.binaryWeight_positiveCyclicSum_traceRunMultiplier_le {n x : ℕ} (hn : 0 < n) (hx : x < 2 ^ n - 1) : CryptBoolean.binaryWeight (CryptBoolean.positiveCyclicSum n x (CryptBoolean.traceRunMultiplierExponent n)) ≤ CryptBoolean.cyclicOneRunCount n x * (n.sqrt - 1) + n ⌈/⌉ n.sqrt
Adding the Nawaz--Gong--Gupta multiplier to a canonical nonzero exponent costs at most one block-minus-one per cyclic one-run, in addition to the multiplier's own binary weight.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
theorem CryptBoolean.binaryWeight_traceRunMultiplier_add_binaryCyclicExponent_le {n d s : ℕ} (hn : 0 < n) (hd0 : 0 < d) (hd : d < 2 ^ n - 1) : CryptBoolean.binaryWeight (CryptBoolean.positiveCyclicSum n (CryptBoolean.binaryCyclicExponent n d s) (CryptBoolean.traceRunMultiplierExponent n)) ≤ CryptBoolean.cyclicOneRunCount n d * n.sqrt + n ⌈/⌉ n.sqrt - 1
theorem CryptBoolean.binaryWeight_traceRunMultiplier_add_binaryCyclicExponent_le {n d s : ℕ} (hn : 0 < n) (hd0 : 0 < d) (hd : d < 2 ^ n - 1) : CryptBoolean.binaryWeight (CryptBoolean.positiveCyclicSum n (CryptBoolean.binaryCyclicExponent n d s) (CryptBoolean.traceRunMultiplierExponent n)) ≤ CryptBoolean.cyclicOneRunCount n d * n.sqrt + n ⌈/⌉ n.sqrt - 1
Nawaz--Gong--Gupta's cyclic carry estimate for every Frobenius rotation of a nonzero canonical exponent.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.leancomplete
theorem CryptBoolean.algebraicImmunity_tracePowerFunction_le_runBound {n d : ℕ} (hn : 0 < n) (hd : d < 2 ^ n - 1) (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n) (a : CryptBoolean.BinaryGaloisField n) (_hrun : ↑(CryptBoolean.cyclicOneRunCount n d) < √↑n / 2) : CryptBoolean.algebraicImmunity (CryptBoolean.tracePowerFunction θ a d) ≤ CryptBoolean.cyclicOneRunCount n d * n.sqrt + n ⌈/⌉ n.sqrt - 1
theorem CryptBoolean.algebraicImmunity_tracePowerFunction_le_runBound {n d : ℕ} (hn : 0 < n) (hd : d < 2 ^ n - 1) (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n) (a : CryptBoolean.BinaryGaloisField n) (_hrun : ↑(CryptBoolean.cyclicOneRunCount n d) < √↑n / 2) : CryptBoolean.algebraicImmunity (CryptBoolean.tracePowerFunction θ a d) ≤ CryptBoolean.cyclicOneRunCount n d * n.sqrt + n ⌈/⌉ n.sqrt - 1
Carlet's trace-power run bound: if the cyclic run count is below `√n/2`, then the algebraic immunity is bounded by the Nawaz--Gong--Gupta multiplier estimate.
Proposition 38 (Carlet, pp. 134--135). Let n be odd and let
f:V_n\to\mathbb F_2 be balanced. If f has no nonzero annihilator of
algebraic degree at most (n-1)/2, then
\operatorname{AI}(f)=\frac{n+1}{2}.
Lean code for Theorem8.1.2●1 theorem
Associated Lean declarations
-
theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.leancomplete
theorem CryptBoolean.algebraicImmunity_eq_ceiling_half_of_odd_balanced_of_no_annihilator {n : ℕ} (f : CryptBoolean.BooleanFunction n) (hn : Odd n) (hbalanced : CryptBoolean.IsBalanced f) (hnoAnnihilator : ∀ (g : CryptBoolean.BooleanFunction n), g ≠ 0 → FABL.functionAlgebraicDegree g ≤ (n - 1) / 2 → f * g ≠ 0) : CryptBoolean.algebraicImmunity f = (n + 1) / 2
theorem CryptBoolean.algebraicImmunity_eq_ceiling_half_of_odd_balanced_of_no_annihilator {n : ℕ} (f : CryptBoolean.BooleanFunction n) (hn : Odd n) (hbalanced : CryptBoolean.IsBalanced f) (hnoAnnihilator : ∀ (g : CryptBoolean.BooleanFunction n), g ≠ 0 → FABL.functionAlgebraicDegree g ≤ (n - 1) / 2 → f * g ≠ 0) : CryptBoolean.algebraicImmunity f = (n + 1) / 2
Proposition 38: for odd `n`, a balanced function with no nonzero annihilator of degree at most `(n-1)/2` has optimal algebraic immunity.
Normality and algebraic immunity (Carlet, p. 135). If
f:V_n\to\mathbb F_2 is k-normal, then
\operatorname{AI}(f)\le n-k.
More precisely, if f is constantly \varepsilon on a k-dimensional
affine flat A, then the indicator of A is a nonzero annihilator of
f+\varepsilon and has algebraic degree n-k.
Lean code for Theorem8.1.3●1 theorem
Associated Lean declarations
-
theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.leancomplete
theorem CryptBoolean.algebraicImmunity_le_sub_of_isKNormal {n k : ℕ} (f : CryptBoolean.BooleanFunction n) (hf : CryptBoolean.IsKNormal f k) : CryptBoolean.algebraicImmunity f ≤ n - k
theorem CryptBoolean.algebraicImmunity_le_sub_of_isKNormal {n k : ℕ} (f : CryptBoolean.BooleanFunction n) (hf : CryptBoolean.IsKNormal f k) : CryptBoolean.algebraicImmunity f ≤ n - k
A `k`-normal `n`-variable Boolean function has algebraic immunity at most `n-k`.
Algebraic-immunity bounds do not force normality (Carlet, p. 135). Let
a>1. As n tends to infinity, the uniform probability that an
n-variable Boolean function is not \lfloor a\log_2 n\rfloor-normal
tends to one, while every such function satisfies
\operatorname{AI}(f)\le\lceil n/2\rceil. Consequently, for all
sufficiently large n there exists f such that
\operatorname{AI}(f)\le n-\lfloor a\log_2 n\rfloor
but f is not \lfloor a\log_2 n\rfloor-normal.
Lean code for Theorem8.1.4●3 theorems
Associated Lean declarations
-
theoremdefined in CryptBoolean/Carlet/Chapter09/NormalitySeparation.leancomplete
theorem CryptBoolean.tendsto_carletNonnormalityDimension_div {α : ℝ} (hα : 1 < α) : Filter.Tendsto (fun n => ↑(CryptBoolean.carletNonnormalityDimension α n) / ↑n) Filter.atTop (nhds 0)
theorem CryptBoolean.tendsto_carletNonnormalityDimension_div {α : ℝ} (hα : 1 < α) : Filter.Tendsto (fun n => ↑(CryptBoolean.carletNonnormalityDimension α n) / ↑n) Filter.atTop (nhds 0)
Carlet's logarithmic normality dimension is sublinear.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/NormalitySeparation.leancomplete
theorem CryptBoolean.eventually_ceilingHalf_le_sub_carletNonnormalityDimension {α : ℝ} (hα : 1 < α) : ∀ᶠ (n : ℕ) in Filter.atTop, (n + 1) / 2 ≤ n - CryptBoolean.carletNonnormalityDimension α n
theorem CryptBoolean.eventually_ceilingHalf_le_sub_carletNonnormalityDimension {α : ℝ} (hα : 1 < α) : ∀ᶠ (n : ℕ) in Filter.atTop, (n + 1) / 2 ≤ n - CryptBoolean.carletNonnormalityDimension α n
Eventually the universal ceiling-half algebraic-immunity bound is no larger than `n` minus Carlet's logarithmic normality dimension.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/NormalitySeparation.leancomplete
theorem CryptBoolean.eventually_exists_algebraicImmunity_le_sub_not_isKNormal {α : ℝ} (hα : 1 < α) : ∀ᶠ (n : ℕ) in Filter.atTop, ∃ f, CryptBoolean.algebraicImmunity f ≤ n - CryptBoolean.carletNonnormalityDimension α n ∧ ¬CryptBoolean.IsKNormal f (CryptBoolean.carletNonnormalityDimension α n)
theorem CryptBoolean.eventually_exists_algebraicImmunity_le_sub_not_isKNormal {α : ℝ} (hα : 1 < α) : ∀ᶠ (n : ℕ) in Filter.atTop, ∃ f, CryptBoolean.algebraicImmunity f ≤ n - CryptBoolean.carletNonnormalityDimension α n ∧ ¬CryptBoolean.IsKNormal f (CryptBoolean.carletNonnormalityDimension α n)
For every `α>1`, in all sufficiently large dimensions there exists a function whose universal algebraic-immunity upper bound does not imply `floor (α log₂ n)`-normality.
Weight bounds from algebraic immunity (Carlet, pp. 135--136). Let
k=\operatorname{AI}(f). Then
\sum_{i=0}^{k-1}\binom ni
\le w_H(f)\le
\sum_{i=0}^{n-k}\binom ni.
The lower sum is zero when k=0.
Lean code for Theorem8.1.5●3 theorems
Associated Lean declarations
-
theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.leancomplete
theorem CryptBoolean.algebraicImmunity_add_constant_one {n : ℕ} (f : CryptBoolean.BooleanFunction n) : CryptBoolean.algebraicImmunity (f + 1) = CryptBoolean.algebraicImmunity f
theorem CryptBoolean.algebraicImmunity_add_constant_one {n : ℕ} (f : CryptBoolean.BooleanFunction n) : CryptBoolean.algebraicImmunity (f + 1) = CryptBoolean.algebraicImmunity f
Algebraic immunity is invariant under complementation.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.leancomplete
theorem CryptBoolean.sum_choose_below_algebraicImmunity_le_hammingWeight {n : ℕ} (f : CryptBoolean.BooleanFunction n) : ∑ i ∈ Finset.range (CryptBoolean.algebraicImmunity f), n.choose i ≤ CryptBoolean.hammingWeight f
theorem CryptBoolean.sum_choose_below_algebraicImmunity_le_hammingWeight {n : ℕ} (f : CryptBoolean.BooleanFunction n) : ∑ i ∈ Finset.range (CryptBoolean.algebraicImmunity f), n.choose i ≤ CryptBoolean.hammingWeight f
The weight of a Boolean function is at least the number of monomials of degree strictly below its algebraic immunity.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.leancomplete
theorem CryptBoolean.hammingWeight_le_sum_choose_to_sub_algebraicImmunity {n : ℕ} (f : CryptBoolean.BooleanFunction n) : CryptBoolean.hammingWeight f ≤ ∑ i ∈ Finset.range (n - CryptBoolean.algebraicImmunity f + 1), n.choose i
theorem CryptBoolean.hammingWeight_le_sum_choose_to_sub_algebraicImmunity {n : ℕ} (f : CryptBoolean.BooleanFunction n) : CryptBoolean.hammingWeight f ≤ ∑ i ∈ Finset.range (n - CryptBoolean.algebraicImmunity f + 1), n.choose i
The weight of a Boolean function is at most the complementary binomial sum determined by its algebraic immunity.
Optimal algebraic immunity in odd dimension (Carlet, p. 136). Let n be
odd. If
\operatorname{AI}(f)=\frac{n+1}{2},
then f is balanced, equivalently w_H(f)=2^{n-1}.
Lean code for Theorem8.1.6●1 theorem
Associated Lean declarations
-
theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.leancomplete
theorem CryptBoolean.isBalanced_of_odd_of_algebraicImmunity_eq_ceiling_half {n : ℕ} (f : CryptBoolean.BooleanFunction n) (hn : Odd n) (hAI : CryptBoolean.algebraicImmunity f = (n + 1) / 2) : CryptBoolean.IsBalanced f
theorem CryptBoolean.isBalanced_of_odd_of_algebraicImmunity_eq_ceiling_half {n : ℕ} (f : CryptBoolean.BooleanFunction n) (hn : Odd n) (hAI : CryptBoolean.algebraicImmunity f = (n + 1) / 2) : CryptBoolean.IsBalanced f
In odd dimension, every function with optimal algebraic immunity is balanced.
Stability under low-degree perturbations (Carlet, p. 136). Let
f,h:V_n\to\mathbb F_2 and suppose \deg(h)\le r. Then
\operatorname{AI}(f)\le\operatorname{AI}(f+h)+r
\quad\text{and}\quad
\operatorname{AI}(f+h)\le\operatorname{AI}(f)+r.
Lean code for Theorem8.1.7●2 theorems
Associated Lean declarations
-
theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.leancomplete
theorem CryptBoolean.algebraicImmunity_add_le_add_functionAlgebraicDegree {n : ℕ} (f h : CryptBoolean.BooleanFunction n) : CryptBoolean.algebraicImmunity (f + h) ≤ CryptBoolean.algebraicImmunity f + FABL.functionAlgebraicDegree h
theorem CryptBoolean.algebraicImmunity_add_le_add_functionAlgebraicDegree {n : ℕ} (f h : CryptBoolean.BooleanFunction n) : CryptBoolean.algebraicImmunity (f + h) ≤ CryptBoolean.algebraicImmunity f + FABL.functionAlgebraicDegree h
Adding a Boolean function of degree `r` can increase algebraic immunity by at most `r`.
-
theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.leancomplete
theorem CryptBoolean.algebraicImmunity_sub_functionAlgebraicDegree_le_add {n : ℕ} (f h : CryptBoolean.BooleanFunction n) : CryptBoolean.algebraicImmunity f - FABL.functionAlgebraicDegree h ≤ CryptBoolean.algebraicImmunity (f + h)
theorem CryptBoolean.algebraicImmunity_sub_functionAlgebraicDegree_le_add {n : ℕ} (f h : CryptBoolean.BooleanFunction n) : CryptBoolean.algebraicImmunity f - FABL.functionAlgebraicDegree h ≤ CryptBoolean.algebraicImmunity (f + h)
Symmetric lower form of stability under low-degree perturbations.