Tu-Deng Conjecture论文下载
论文名称:A conjecture about binary strings and its applications on constructing Boolean functions with optimal algebraic immunity
1. Tu-Deng Conjecture
2. Construction1
3. Construction1 optimal algebraic immunity n/2
4.Construction1 Algebraic degree n/2
5. Construction1 Bent Function
//此为magma代码
//计算涂邓猜想构造1函数非线性度
//k:=2;
for k:=1 to 12 by 1 do
G<x>:=GF(2,k);
Z:=IntegerRing();
g:=[];
for tt:=0 to 2^k-2 by 1 do //初始化g的真值表全为0
bin1:=Eltseq(x^tt, GF(2)); toInt1 := [Z | bin1 [j] : j in {1.. k by 1}];
k1:=&+[toInt1[i]*(2^(i-1)): i in [1..k]]; g[k1]:=0;
end for;
for tt:=0 to 2^(k-1)-1 by 1 do //根据g的支撑架生成g的真值表
bin2:=Eltseq(x^tt, GF(2)); toInt2 := [Z | bin2 [j] : j in {1.. k by 1}];
k2:=&+[toInt2[i]*(2^(i-1)): i in [1..k]]; g[k2]:=1;
end for;
//g:=[0] cat g;
n:=2*k;
F<w>:=GF(2,n);
f:=[];
for tt:=0 to 2^n-2 by 1 do //初始化f的真值表全为0
bin3:=Eltseq(w^tt, GF(2)); toInt3 := [Z | bin3 [j] : j in {1.. n by 1}];
k3:=&+[toInt3[i]*(2^(i-1)): i in [1..n]]; f[k3]:=0;
end for;
for tt:=0 to 2^k-2 by 1 do //由f(x,y)=g(xy^(2^k-2))生成f的真值表
for dd:=0 to 2^k-2 by 1 do
bin4:=Eltseq(x^tt, GF(2)); toInt4 := [Z | bin4 [j] : j in {1.. k by 1}];
bin5:=Eltseq(x^dd, GF(2)); toInt5 := [Z | bin5 [j] : j in {1.. k by 1}];
bin6:=Eltseq(x^(tt+dd*(2^k-2)), GF(2)); toInt6 := [Z | bin6 [j] : j in {1.. k by 1}];
toIntw:=toInt4 cat toInt5;
k4:=&+[toIntw[i]*(2^(i-1)): i in [1..n]];
k5:=&+[toInt6[i]*(2^(i-1)): i in [1..k]];
value:=g[k5];
f[k4]:=value;
end for;
end for;
f**重点内容**:=[0] cat f;
a:= [1-2*f[i]:i in [1..2^n]];
for tt:=1 to n by 1 do // butterfly algorithm
t:=2^n div 2^tt;
for j:=0 to 2^tt-1 by 2 do
for l:=1 to t by 1 do
a[t*j+l]:=a[t*j+l]+a[t*(j+1)+l];
a[t*(j+1)+l]:=a[t*j+l]-2*a[t*(j+1)+l];
end for;
end for;
end for;
b:=[Abs (a[i]):i in [1..2^n]];
nl:=2^(n-1)-Max(b) div 2;
nl;
end for;
6. Construction 2
7.Construction2 optimal algebraic immunity n/2
8.the low bound of nonlinearity
9.the real value of Construction2 nonlinearity
//此为magma代码
//计算涂邓猜想构造2函数非线性度
//k:=3;
for k:=2 to 12 by 1 do
G<x>:=GF(2,k);
Z:=IntegerRing();
g:=[];
for tt:=0 to 2^k-2 by 1 do //初始化g的真值表全为0
bin1:=Eltseq(x^tt, GF(2)); toInt1 := [Z | bin1 [j] : j in {1.. k by 1}];
k1:=&+[toInt1[i]*(2^(i-1)): i in [1..k]]; g[k1]:=0;
end for;
for tt:=0 to 2^(k-1)-1 by 1 do //根据g的支撑架生成g的真值表
bin2:=Eltseq(x^tt, GF(2)); toInt2 := [Z | bin2 [j] : j in {1.. k by 1}];
k2:=&+[toInt2[i]*(2^(i-1)): i in [1..k]]; g[k2]:=1;
end for;
//g:=[0] cat g;
n:=2*k;
F<w>:=GF(2,n);
f:=[];
for tt:=0 to 2^n-2 by 1 do //初始化f的真值表全为0
bin3:=Eltseq(w^tt, GF(2)); toInt3 := [Z | bin3 [j] : j in {1.. n by 1}];
k3:=&+[toInt3[i]*(2^(i-1)): i in [1..n]]; f[k3]:=0;
end for;
for tt:=0 to 2^k-2 by 1 do //由f(x,y)=g(xy^(2^k-2))//生成f的真值表
for dd:=0 to 2^k-2 by 1 do
bin4:=Eltseq(x^tt, GF(2)); toInt4 := [Z | bin4 [j] : j in {1.. k by 1}];
bin5:=Eltseq(x^dd, GF(2)); toInt5 := [Z | bin5 [j] : j in {1.. k by 1}];
bin6:=Eltseq(x^((tt+dd*(2^k-2)) mod (2^k-1)), GF(2)); toInt6 := [Z | bin6 [j] : j in {1.. k by 1}];
toIntw:=toInt4 cat toInt5;
k4:=&+[toIntw[i]*(2^(i-1)): i in [1..n]];
k5:=&+[toInt6[i]*(2^(i-1)): i in [1..k]];
value:=g[k5];
f[k4]:=value;
end for;
end for;
for dd:=2^(k-1)-1 to 2^k-2 by 1 do //当x=0,y属于{x^i|i=2^(k-1)-1,...2^k-2};
bin7:=Eltseq(x^dd, GF(2)); toInt7 := [Z | bin7 [j] : j in {1.. k by 1}];
k7:=&+[toInt7[i]*(2^(i-1)): i in [1..k]]; f[k7]:=1;
end for;
f:=[0] cat f;
a:= [1-2*f[i]:i in [1..2^n]];
for tt:=1 to n by 1 do // butterfly algorithm
t:=2^n div 2^tt;
for j:=0 to 2^tt-1 by 2 do
for l:=1 to t by 1 do
a[t*j+l]:=a[t*j+l]+a[t*(j+1)+l];
a[t*(j+1)+l]:=a[t*j+l]-2*a[t*(j+1)+l];
end for;
end for;
end for;
b:=[Abs (a[i]):i in [1..2^n]];
nl:=2^(n-1)-Max(b) div 2;
nl;
end for;
#此为sagemath代码
from sage.crypto.boolean_function import BooleanFunction
k=13
n=2*k
g.<w>=GF(2^k)
g=[0]*(2^k)
for tt in range(0,2^(k-1)):
g[(w^tt).integer_representation()]=1
f=[0]*(2^n)
#x!=0,y!=0
for tt in range(0,2^k-1):
for dd in range(0,2^k-1):
k1=((w^tt)*(w^(dd*(2^k-2)))).integer_representation()
# k1=(w^(tt+dd)).integer_representation()
k2=((w^tt).integer_representation())*(2^k)+(w^dd).integer_representation()
f[k2]=g[k1]
#x=0,y属于{(alpha)^i|i=2^(k-1)-1,...,2^k-2}
for tt in range(2^(k-1)-1,2^k-1):
k3=(w^tt).integer_representation()
f[k3]=1
B=BooleanFunction(f)
B.nonlinearity()
程序计算结果
10. construction2 Immunity against fast algebraic attacks
n=4: (1,1)
n=6: (1,3),(2,3)
n=8: (1,4),(2,4),(3,3)
n=10: (1,5),(2,5),(3,5),(4,4)
n=12: (1,6),(2,6),(3,6),(4,6),(5,5)
抵抗快速代数攻击能力比较差,特别是e比较小的情况下