Cryptographic Boolean Functions in Lean

4.1. Affine functions🔗

Theorem4.1.1
Group: Chapter 4: Classes with Provable Spectra and Weights (30)
Group member previews
Preview
Definition 4.1.2
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 1.7.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 3
Reverse dependency previews
Preview
Corollary 4.2.5
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Affine Walsh spectrum (Carlet, Section 5.1, p. 68). Let n\ge0, let a,u\in V_n, and let \epsilon\in\mathbb F_2. For \ell(x)=a\mathbin\cdot x+\epsilon, the unnormalized Walsh transform satisfies W_\ell(u)= \begin{cases} 2^n(-1)^\epsilon,&u=a,\\ 0,&u\ne a. \end{cases}

Lean code for Theorem4.1.11 theorem
  • theoremdefined in CryptBoolean/Carlet/Chapter05/Affine.lean
    complete
    theorem CryptBoolean.walshTransform_affineFunction {n : } (b : FABL.𝔽₂)
      (a u : FABL.F₂Cube n) :
      CryptBoolean.walshTransform (FABL.affineFunction b a) u =
        if u = a then CryptBoolean.bitSignInt b * 2 ^ n else 0
    theorem CryptBoolean.walshTransform_affineFunction
      {n : } (b : FABL.𝔽₂)
      (a u : FABL.F₂Cube n) :
      CryptBoolean.walshTransform
          (FABL.affineFunction b a) u =
        if u = a then
          CryptBoolean.bitSignInt b * 2 ^ n
        else 0
    The raw Walsh transform of an affine Boolean function is supported at its linear part. 
Definition4.1.2
Group: Chapter 4: Classes with Provable Spectra and Weights (30)
Group member previews
Preview
Theorem 4.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 1
Used by 2
Reverse dependency previews
Preview
Theorem 5.5.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Maiorana--McFarland functions (Carlet, Section 5.1, p. 68). Fix a decomposition V_{r+s}=V_r\times V_s. A Boolean function f:V_r\times V_s\to\mathbb F_2 is a Maiorana--McFarland function when, for every y\in V_s, the function x\mapsto f(x,y) is affine. Equivalently, the truth table of f is the concatenation, indexed by y, of affine truth tables on V_r.

Lean code for Definition4.1.21 definition
  • defdefined in CryptBoolean/Carlet/Chapter05/Affine.lean
    complete
    def CryptBoolean.IsMaioranaMcFarland {r s : }
      (f : CryptBoolean.BooleanFunction (r + s)) : Prop
    def CryptBoolean.IsMaioranaMcFarland {r s : }
      (f :
        CryptBoolean.BooleanFunction
          (r + s)) :
      Prop
    Carlet's Chapter 5 Maiorana--McFarland functions: each restriction to the first block is
    affine. 

Carlet uses this Chapter 5 name for concatenations of affine restrictions. Section 6.4 later specializes the construction to a class of bent functions.