日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

DCC_2012_Sihong Su . Xiaohu Tang rotation symmetric boolean functions

發布時間:2023/12/20 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 DCC_2012_Sihong Su . Xiaohu Tang rotation symmetric boolean functions 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

論文名稱:Construction of rotation symmetric Boolean functions with optimal algebraic immunity and high nonlinearity

1.majority function

2.Preliminaries

3 Compositions of an integer k

4 Construction of RSBFs on odd number of variables





5.SageMath程序實現

from sage.crypto.boolean_function import BooleanFunction k=6 n=2*k+1 t=0 top=0 Sum=0 s=[None]*n set=[] #整數分解 def dfs():global Sum,top,t,k,s,setif Sum == k:if s[0] != 1:#構造的布爾函數要求開頭不為1set.append(s[0:top])returnif Sum > k:returnfor i in range(1,k+1):Sum+=is[top]=itop=top+1dfs()Sum-=itop=top-1s[top]=i dfs() #print(set) #求集合T T=[] for i in range(len(set)):tmp=[]for j in set[i]:for k in range(j):tmp.append(1)tmp.append(0)for k in range(n - len(tmp)):tmp.append(0 )T.append(tmp) #print(T) #print(len(T)) #求集合U U=[] for i in range(len(set)):k1=set[i][0]tmp=[0]*(n-k1)tmp=tmp+[1]*(k1-1)+[0]for j in range(n):tmp[j]=(tmp[j]+T[i][j])%2U.append(tmp) #print(U) #構造擇多函數 f=[0]*(2^n) for i in range(2^n):tmp=list(str('{0:b}'.format(i)).rjust(n,'0'))listkey=[int(x) for x in tmp ]wt=0for j in listkey:if j==0:wt=wt+1if wt >= ((n-1)/2+1):f[i]=1TU=T+U supp=[] for Set in TU:for j in range(0,n):tmp=Set[j:]+Set[:j]index=0for k in range(len(tmp)):if tmp[k]==1:index=index+2^(n-k-1)supp.append(index) for i in supp:f[i]=(f[i]+1)%2B=BooleanFunction(f) deg=0 ANF=str(B.algebraic_normal_form()).split("+") for i in range(len(ANF)):count=0for j in range(len(ANF[i])):if ANF[i][j]=="x":count=count+1if count>deg:deg=count #將真值表寫入文件,使用其他程序測試函數抵抗快速代數攻擊的能力 filename='truth_table.txt' with open(filename,'w') as fw:fw.writelines(str(f))

總結

以上是生活随笔為你收集整理的DCC_2012_Sihong Su . Xiaohu Tang rotation symmetric boolean functions的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。