5-3.低漢明權重(Low Hamming Weight)的離散對數問題-可變參數的Splitting System
上一篇Coppersmitch方法將解\(x\)二進位切成兩等份,每個等份再分別列舉1的可能位置。可變參數的Splitting System方法則根據\(t_s\)值,調整集合\(\cal{B}\)的大小來列舉1的可能位置,所以說Coppersmitch方法可算是可變參數的Splitting System的特例。以下表格為兩種方法的比較。
Coppersmith Splitting System | 可變參數的Splitting System |
定義
假設\(m\)和\(t\)都是偶數且\(0<t<m\),定義\((m,t)\)的splitting system是符合以下2點的數對\((X,\cal{B})\)
1.集合\(X\)有\(m\)個元素,集合\(\cal{B}\)有\(\displaystyle \frac{m}{2}\)個\(X\)的子集合,\(\cal{B}\)稱為區塊(blocks)。
2.對所有\(X\)的子集合\(Y\),\(Y\)有\(t\)個元素,存在一個區塊\(B\)使得\(B\)和\(Y\)的交集個數為\(\displaystyle \frac{t}{2}\)。 | 定義
假設\(m\)、\(t\)和\(t_s\)和都是整數且\(0<t<m\)、\(0\le t_s \le t\),定義\((m,t,t_s)\)的可變參數splitting system是符合以下2點的數對\((X,\cal{B})\)
1.集合\(X\)有\(m\)個元素,集合\(\cal{B}\)有\(\displaystyle \Bigg\lfloor\; \frac{t_s m}{t}\Bigg\rfloor\;\)個\(X\)的子集合,\(\cal{B}\)稱為區塊(blocks)。
2.對所有\(X\)的子集合\(Y\),\(Y\)有\(t\)個元素,存在一個區塊\(B\)使得\(B\)和\(Y\)的交集個數為\(\displaystyle t_s\)。
|
產生\(\displaystyle (\frac{m}{2};m,t)\)的Coppersmith splitting system方法
令\(X=Z_m\),定義\(B_i=\{\;i+j\pmod{m}:0\le j\le m/2-1\}\;\)
\(\cal B\)\(=\{\;B_i:0\le i \le m/2-1\}\;\) | 產生\(\displaystyle (m;m,t,t_s)\)的可變參數splitting system方法
令\(X=Z_m\),定義\(B_i=\{\;i+j\pmod{m}:0\le j\le \Bigg\lfloor\;\frac{t_sm}{t}\Bigg\rfloor\;-1\}\;\)
\(\cal B\)\(=\{\;B_i:0\le i \le m-1\}\;\) |
以\(m=8,t=4\)為例(解\(x\)有8位元,其中有4個1,分成2個1和2個1分別列舉)
\(X=Z_m=\{\;0,1,2,3,4,5,6,7\}\;\),\(B_0=\{\;0,1,2,3\}\;\),\(B_1=\{\;1,2,3,4\}\;\),\(B_2=\{\;2,3,4,5\}\;\),\(B_3=\{\;3,4,5,6\}\;\),\(\cal B\)\(=\{\;B_0,B_1,B_2,B_3\}\;\)
子集合\(Y=\{\;0,2,4,6\}\;\)有4個元素,存在\(B_0,B_1,B_2,B_3\)和\(Y\)交集2個元素。
子集合\(Y=\{\;1,3,5,7\}\;\)有4個元素,存在\(B_0,B_1,B_2,B_3\)和\(Y\)交集2個元素。
子集合\(Y=\{\;0,1,6,7\}\;\)有4個元素,存在\(B_0\)和\(Y\)交集2個元素。
子集合\(Y=\{\;0,2,5,7\}\;\)有4個元素,存在\(B_0\)和\(Y\)交集2個元素。
子集合\(Y=\{\;4,5,6,7\}\;\)有4個元素,存在\(B_2,B_3\)和\(Y\)交集2個元素。 | 以\(m=8,t=4,t_s=1\)為例(解\(x\)有8位元,其中有4個1,分成1個1和3個1分別列舉)
\(X=Z_m=\{\;0,1,2,3,4,5,6,7\}\;\),\(B_0=\{\;0,1\}\;\),\(B_1=\{\;1,2\}\;\),\(B_2=\{\;2,3\}\;\),\(B_3=\{\;3,4\}\;\),\(B_4=\{\;4,5\}\;\),\(B_5=\{\;5,6\}\;\),\(B_6=\{\;6,7\}\;\),\(B_7=\{\;7,0\}\;\),\(\cal B\)\(=\{\;B_0,B_1,B_2,B_3,B_4,B_5,B_6,B_7\}\;\)
子集合\(Y=\{\;0,2,4,6\}\;\)有4個元素,存在\(B_0,B_1,B_2,B_3,B_4,B_5,B_6,B_7\)和\(Y\)交集1個元素。
子集合\(Y=\{\;1,3,5,7\}\;\)有4個元素,存在\(B_0,B_1,B_2,B_3,B_4,B_5,B_6,B_7\)和\(Y\)交集1個元素。
子集合\(Y=\{\;0,1,6,7\}\;\)有4個元素,存在\(B_0,B_1,B_5,B_6,B_7\)和\(Y\)交集1個元素。
子集合\(Y=\{\;0,2,5,7\}\;\)有4個元素,存在\(B_0,B_1,B_2,B_4,B_5,B_6,B_7\)和\(Y\)交集1個元素。
子集合\(Y=\{\;4,5,6,7\}\;\)有4個元素,存在\(B_3,B_4,B_5,B_6,B_7\)和\(Y\)交集1個元素。 |
| 以\(m=8,t=4,t_s=2\)為例
\(X=Z_m=\{\;0,1,2,3,4,5,6,7\}\;\),\(B_0=\{\;0,1,2,3\}\;\),\(B_1=\{\;1,2,3,4\}\;\),\(B_2=\{\;2,3,4,5\}\;\),\(B_3=\{\;3,4,5,6\}\;\),\(B_4=\{\;4,5,6,7\}\;\),\(B_5=\{\;5,6,7,0\}\;\),\(B_6=\{\;6,7,0,1\}\;\),\(B_7=\{\;7,0,1,2\}\;\),\(\cal B\)\(=\{\;B_0,B_1,B_2,B_3,B_4,B_5,B_6,B_7\}\;\)
\(B_0,B_1,B_2,B_3\)和Coppersmith splitting system相同
\(B_4,B_5,B_6,B_7\)則是\(B_0,B_1,B_2,B_3\)的補集。 |
演算法和上一篇大致相同,僅集合\(\cal{B}\)大小不同。
以\(2^{142}\equiv 79\pmod{181}\)為例,解\(x=(142)_{10}=(10001110)_2\),1的分佈不平均。
\(\{\;0,1 \}\;\)任取1個的子集合\(Y_1\),\(\{\;2,3,4,5,6,7 \}\;\)任取3個的子集合\(Y_2\)
\(\matrix{Y_1&val(Y_1)&\alpha^{val(Y_1)}\pmod{181}&Y_2&val(Y_2)&\beta \alpha^{-val(Y_2)}\pmod{181}\cr
\{\;0\}\;&2^0=1&2^1\equiv 2&\{\;2,3,4\}\;& 2^2+2^3+2^4=28&79*2^{-28}\equiv 36\cr
\{\;1\}\;&2^1=2&2^2\equiv 4&\{\;2,3,5\}\;&2^2+2^3+2^5=44&79*2^{-44}\equiv 106\cr
&&&\{\;2,3,6\}\;&2^2+2^3+2^6=76&79*2^{-76}\equiv 176\cr
&&&\{\;2,3,7\}\;&2^2+2^3+2^7=140&79*2^{-140}\equiv 4\cr
&&&\{\;2,4,5\}\;&2^2+2^4+2^5=52&79*2^{-52}\equiv 180\cr
&&&\{\;2,4,6\}\;&2^2+2^4+2^6=84&79*2^{-84}\equiv 12\cr
&&&\{\;2,4,7\}\;&2^2+2^4+2^7=148&79*2^{-148}\equiv 99\cr
&&&\{\;2,5,6\}\;&2^2+2^5+2^6=100&79*2^{-100}\equiv 156\cr
&&&\{\;2,5,7\}\;&2^2+2^5+2^7=164&79*2^{-164}\equiv 20\cr
&&&\{\;2,6,7\}\;&2^2+2^6+2^7=196&79*2^{-196}\equiv 122\cr
&&&\{\;3,4,5\}\;&2^3+2^4+2^5=56&79*2^{-56}\equiv 147\cr
&&&\{\;3,4,6\}\;&2^3+2^4+2^6=88&79*2^{-88}\equiv 46\cr
&&&\{\;3,4,7\}\;&2^3+2^4+2^7=152&79*2^{-152}\equiv 108\cr
&&&\{\;3,5,6\}\;&2^3+2^5+2^6=104&79*2^{-104}\equiv 55\cr
&&&\{\;3,5,7\}\;&2^3+2^5+2^7=168&79*2^{-168}\equiv 137\cr
&&&\{\;3,6,7\}\;&2^3+2^6+2^7=200&79*2^{-200}\equiv 166\cr
&&&\{\;4,5,6\}\;&2^4+2^5+2^6=112&79*2^{-112}\equiv 49\cr
&&&\{\;4,5,7\}\;&2^4+2^5+2^7=176&79*2^{-176}\equiv 178\cr
&&&\{\;4,6,7\}\;&2^4+2^6+2^7=208&79*2^{-208}\equiv 36\cr
&&&\{\;5,6,7\}\;&2^5+2^6+2^7=224&79*2^{-224}\equiv 106}\)
可找到
\(2^2\equiv79*2^{-140}\equiv 4\pmod{181}\),\(Y_1=\{\;1\}\;\),\(Y_2=\{\;2,3,7\}\;\),\(x=2+140=142\)
\(\{\;1,2 \}\;\)任取1個的子集合\(Y_1\),\(\{\;0,3,4,5,6,7 \}\;\)任取3個的子集合\(Y_2\)
\(\matrix{Y_1&val(Y_1)&\alpha^{val(Y_1)}\pmod{181}&Y_2&val(Y_2)&\beta \alpha^{-val(Y_2)}\pmod{181}\cr
\{\;1\}\;&2^1=2&2^2\equiv 4&\{\;0,3,4\}\;&2^0+2^3+2^4=25&79*2^{-25}\equiv107\cr
\{\;2\}\;&2^2=4&2^4\equiv 16&\{\;0,3,5\}\;&2^0+2^3+2^5=41&79*2^{-41}\equiv124\cr
&&&\{\;0,3,6\}\;&2^0+2^3+2^6=73&79*2^{-73}\equiv141\cr
&&&\{\;0,3,7\}\;&2^0+2^3+2^7=137&79*2^{-137}\equiv32\cr
&&&\{\;0,4,5\}\;&2^0+2^4+2^5=49&79*2^{-49}\equiv173\cr
&&&\{\;0,4,6\}\;&2^0+2^4+2^6=81&79*2^{-81}\equiv96\cr
&&&\{\;0,4,7\}\;&2^0+2^4+2^7=145&79*2^{-145}\equiv68\cr
&&&\{\;0,5,6\}\;&2^0+2^5+2^6=97&79*2^{-97}\equiv162\cr
&&&\{\;0,5,7\}\;&2^0+2^5+2^7=161&79*2^{-161}\equiv160\cr
&&&\{\;0,6,7\}\;&2^0+2^6+2^7=193&79*2^{-193}\equiv71\cr
&&&\{\;3,4,5\}\;&2^3+2^4+2^5=56&79*2^{-56}\equiv147\cr
&&&\{\;3,4,6\}\;&2^3+2^4+2^6=88&79*2^{-88}\equiv46\cr
&&&\{\;3,4,7\}\;&2^3+2^4+2^7=152&79*2^{-152}\equiv108\cr
&&&\{\;3,5,6\}\;&2^3+2^5+2^6=104&79*2^{-104}\equiv55\cr
&&&\{\;3,5,7\}\;&2^3+2^5+2^7=168&79*2^{-168}\equiv137\cr
&&&\{\;3,6,7\}\;&2^3+2^6+2^7=200&79*2^{-200}\equiv166\cr
&&&\{\;4,5,6\}\;&2^4+2^5+2^6=112&79*2^{-112}\equiv49\cr
&&&\{\;4,5,7\}\;&2^4+2^5+2^7=176&79*2^{-176}\equiv178\cr
&&&\{\;4,6,7\}\;&2^4+2^6+2^7=208&79*2^{-208}\equiv36\cr
&&&\{\;5,6,7\}\;&2^5+2^6+2^7=224&79*2^{-224}\equiv106}\)
找不到\(Y_1,Y_2\)使得\(\alpha^{val(Y_1)}\equiv \beta \alpha^{-val(Y_2)}\pmod{p}\)
\(\{\;2,3 \}\;\)任取1個的子集合\(Y_1\),\(\{\;0,1,4,5,6,7 \}\;\)任取3個的子集合\(Y_2\)
\(\matrix{Y_1&val(Y_1)&\alpha^{val(Y_1)}\pmod{181}&Y_2&val(Y_2)&\beta \alpha^{-val(Y_2)}\pmod{181}\cr
\{\;2\}\;&2^2=4&2^4\equiv 16&\{\;0,1,4\}\;&2^0+2^1+2^4=19&79*2^{-19}\equiv151\cr
\{\;3\}\;&2^3=8&2^8\equiv 75&\{\;0,1,5\}\;&2^0+2^1+2^5=35&79*2^{-35}\equiv153\cr
&&&\{\;0,1,6\}\;&2^0+2^1+2^6=67&79*2^{-67}\equiv155\cr
&&&\{\;0,1,7\}\;&2^0+2^1+2^7=131&79*2^{-131}\equiv57\cr
&&&\{\;0,4,5\}\;&2^0+2^4+2^5=49&79*2^{-49}\equiv173\cr
&&&\{\;0,4,6\}\;&2^0+2^4+2^6=81&79*2^{-81}\equiv96\cr
&&&\{\;0,4,7\}\;&2^0+2^4+2^7=145&79*2^{-145}\equiv68\cr
&&&\{\;0,5,6\}\;&2^0+2^5+2^6=97&79*2^{-97}\equiv162\cr
&&&\{\;0,5,7\}\;&2^0+2^5+2^7=161&79*2^{-161}\equiv160\cr
&&&\{\;0,6,7\}\;&2^0+2^6+2^7=193&79*2^{-193}\equiv71\cr
&&&\{\;1,4,5\}\;&2^1+2^4+2^5=50&79*2^{-50}\equiv177\cr
&&&\{\;1,4,6\}\;&2^1+2^4+2^6=82&79*2^{-82}\equiv48\cr
&&&\{\;1,4,7\}\;&2^1+2^4+2^7=146&79*2^{-146}\equiv34\cr
&&&\{\;1,5,6\}\;&2^1+2^5+2^6=98&79*2^{-98}\equiv81\cr
&&&\{\;1,5,7\}\;&2^1+2^5+2^7=162&79*2^{-162}\equiv80\cr
&&&\{\;1,6,7\}\;&2^1+2^6+2^7=194&79*2^{-194}\equiv126\cr
&&&\{\;4,5,6\}\;&2^4+2^5+2^6=112&79*2^{-112}\equiv49\cr
&&&\{\;4,5,7\}\;&2^4+2^5+2^7=176&79*2^{-176}\equiv178\cr
&&&\{\;4,6,7\}\;&2^4+2^6+2^7=208&79*2^{-208}\equiv36\cr
&&&\{\;5,6,7\}\;&2^5+2^6+2^7=224&79*2^{-224}\equiv106}\)
找不到\(Y_1,Y_2\)使得\(\alpha^{val(Y_1)}\equiv \beta \alpha^{-val(Y_2)}\pmod{p}\)
\(\{\;3,4 \}\;\)任取1個的子集合\(Y_1\),\(\{\;0,1,2,5,6,7 \}\;\)任取3個的子集合\(Y_2\)
\(\matrix{Y_1&val(Y_1)&\alpha^{val(Y_1)}\pmod{181}&Y_2&val(Y_2)&\beta \alpha^{-val(Y_2)}\pmod{181}\cr
\{\;3\}\;&2^3=8&2^8\equiv 75&\{\;0,1,2\}\;&2^0+2^1+2^2=7&79*2^{-7}\equiv19\cr
\{\;4\}\;&2^4=16&2^{16}\equiv 14&\{\;0,1,5\}\;&2^0+2^1+2^5=35&79*2^{-35}\equiv153\cr
&&&\{\;0,1,6\}\;&2^0+2^1+2^6=67&79*2^{-67}\equiv155\cr
&&&\{\;0,1,7\}\;&2^0+2^1+2^7=131&79*2^{-131}\equiv57\cr
&&&\{\;0,2,5\}\;&2^0+2^2+2^5=37&79*2^{-37}\equiv174\cr
&&&\{\;0,2,6\}\;&2^0+2^2+2^6=69&79*2^{-69}\equiv84\cr
&&&\{\;0,2,7\}\;&2^0+2^2+2^7=133&79*2^{-133}\equiv150\cr
&&&\{\;0,5,6\}\;&2^0+2^5+2^6=97&79*2^{-97}\equiv162\cr
&&&\{\;0,5,7\}\;&2^0+2^5+2^7=161&79*2^{-161}\equiv160\cr
&&&\{\;0,6,7\}\;&2^0+2^6+2^7=193&79*2^{-193}\equiv71\cr
&&&\{\;1,2,5\}\;&2^1+2^2+2^5=38&79*2^{-38}\equiv87\cr
&&&\{\;1,2,6\}\;&2^1+2^2+2^6=70&79*2^{-70}\equiv42\cr
&&&\{\;1,2,7\}\;&2^1+2^2+2^7=134&79*2^{-134}\equiv75\cr
&&&\{\;1,5,6\}\;&2^1+2^5+2^6=98&79*2^{-98}\equiv81\cr
&&&\{\;1,5,7\}\;&2^1+2^5+2^7=162&79*2^{-162}\equiv80\cr
&&&\{\;1,6,7\}\;&2^1+2^6+2^7=194&79*2^{-194}\equiv126\cr
&&&\{\;2,5,6\}\;&2^2+2^5+2^6=100&79*2^{-100}\equiv156\cr
&&&\{\;2,5,7\}\;&2^2+2^5+2^7=164&79*2^{-164}\equiv20\cr
&&&\{\;2,6,7\}\;&2^2+2^6+2^7=196&79*2^{-196}\equiv122\cr
&&&\{\;5,6,7\}\;&2^5+2^6+2^7=224&79*2^{-224}\equiv106}\)
可找到
\(2^8\equiv79*2^{-134}\equiv 75\pmod{181}\),\(Y_1=\{\;3\}\;\),\(Y_2=\{\;1,2,7\}\;\),\(x=8+134=142\)
\(\{\;4,5 \}\;\)任取1個的子集合\(Y_1\),\(\{\;0,1,2,3,6,7 \}\;\)任取3個的子集合\(Y_2\)
\(\matrix{Y_1&val(Y_1)&\alpha^{val(Y_1)}\pmod{181}&Y_2&val(Y_2)&\beta \alpha^{-val(Y_2)}\pmod{181}\cr
\{\;4\}\;&2^4=16&2^{16}\equiv 14&\{\;0,1,2\}\;&2^0+2^1+2^2=7&79*2^{-7}\equiv19\cr
\{\;5\}\;&2^5=32&2^{32}\equiv 15&\{\;0,1,3\}\;&2^0+2^1+2^3=11&79*2^{-11}\equiv103\cr
&&&\{\;0,1,6\}\;&2^0+2^1+2^6=67&79*2^{-67}\equiv155\cr
&&&\{\;0,1,7\}\;&2^0+2^1+2^7=131&79*2^{-131}\equiv57\cr
&&&\{\;0,2,3\}\;&2^0+2^2+2^3=13&79*2^{-13}\equiv71\cr
&&&\{\;0,2,6\}\;&2^0+2^2+2^6=69&79*2^{-69}\equiv84\cr
&&&\{\;0,2,7\}\;&2^0+2^2+2^7=133&79*2^{-133}\equiv150\cr
&&&\{\;0,3,6\}\;&2^0+2^3+2^6=73&79*2^{-73}\equiv141\cr
&&&\{\;0,3,7\}\;&2^0+2^3+2^7=137&79*2^{-137}\equiv32\cr
&&&\{\;0,6,7\}\;&2^0+2^6+2^7=193&79*2^{-193}\equiv71\cr
&&&\{\;1,2,3\}\;&2^1+2^2+2^3=14&79*2^{-14}\equiv126\cr
&&&\{\;1,2,6\}\;&2^1+2^2+2^6=70&79*2^{-70}\equiv42\cr
&&&\{\;1,2,7\}\;&2^1+2^2+2^7=134&79*2^{-134}\equiv75\cr
&&&\{\;1,3,6\}\;&2^1+2^3+2^6=74&79*2^{-74}\equiv161\cr
&&&\{\;1,3,7\}\;&2^1+2^3+2^7=138&79*2^{-138}\equiv16\cr
&&&\{\;1,6,7\}\;&2^1+2^6+2^7=194&79*2^{-194}\equiv126\cr
&&&\{\;2,3,6\}\;&2^2+2^3+2^6=76&79*2^{-76}\equiv176\cr
&&&\{\;2,3,7\}\;&2^2+2^3+2^7=140&79*2^{-140}\equiv4\cr
&&&\{\;2,6,7\}\;&2^2+2^6+2^7=196&79*2^{-196}\equiv122\cr
&&&\{\;3,6,7\}\;&2^3+2^6+2^7=200&79*2^{-200}\equiv166}\)
找不到\(Y_1,Y_2\)使得\(\alpha^{val(Y_1)}\equiv \beta \alpha^{-val(Y_2)}\pmod{p}\)
\(\{\;5,6 \}\;\)任取1個的子集合\(Y_1\),\(\{\;0,1,2,3,4,7 \}\;\)任取3個的子集合\(Y_2\)
\(\matrix{Y_1&val(Y_1)&\alpha^{val(Y_1)}\pmod{181}&Y_2&val(Y_2)&\beta \alpha^{-val(Y_2)}\pmod{181}\cr
\{\;5\}\;&2^5=32&2^{32}\equiv 15&\{\;0,1,2\}\;&2^0+2^1+2^2=7&79*2^{-7}\equiv19\cr
\{\;6\}\;&2^6=64&2^{64}\equiv 44&\{\;0,1,3\}\;&2^0+2^1+2^3=11&79*2^{-11}\equiv103\cr
&&&\{\;0,1,4\}\;&2^0+2^1+2^4=19&79*2^{-19}\equiv151\cr
&&&\{\;0,1,7\}\;&2^0+2^1+2^7=131&79*2^{-131}\equiv57\cr
&&&\{\;0,2,3\}\;&2^0+2^2+2^3=13&79*2^{-13}\equiv71\cr
&&&\{\;0,2,4\}\;&2^0+2^2+2^4=21&79*2^{-21}\equiv83\cr
&&&\{\;0,2,7\}\;&2^0+2^2+2^7=133&79*2^{-133}\equiv150\cr
&&&\{\;0,3,4\}\;&2^0+2^3+2^4=25&79*2^{-25}\equiv107\cr
&&&\{\;0,3,7\}\;&2^0+2^3+2^7=137&79*2^{-137}\equiv32\cr
&&&\{\;0,4,7\}\;&2^0+2^4+2^7=145&79*2^{-145}\equiv68\cr
&&&\{\;1,2,3\}\;&2^1+2^2+2^3=14&79*2^{-14}\equiv126\cr
&&&\{\;1,2,4\}\;&2^1+2^2+2^4=22&79*2^{-22}\equiv132\cr
&&&\{\;1,2,7\}\;&2^1+2^2+2^7=134&79*2^{-134}\equiv75\cr
&&&\{\;1,3,4\}\;&2^1+2^3+2^4=26&79*2^{-26}\equiv144\cr
&&&\{\;1,3,7\}\;&2^1+2^3+2^7=138&79*2^{-138}\equiv16\cr
&&&\{\;1,4,7\}\;&2^1+2^4+2^7=146&79*2^{-146}\equiv34\cr
&&&\{\;2,3,4\}\;&2^2+2^3+2^4=28&79*2^{-28}\equiv36\cr
&&&\{\;2,3,7\}\;&2^2+2^3+2^7=140&79*2^{-140}\equiv4\cr
&&&\{\;2,4,7\}\;&2^2+2^4+2^7=148&79*2^{-148}\equiv99\cr
&&&\{\;3,4,7\}\;&2^3+2^4+2^7=152&79*2^{-152}\equiv108}\)
找不到\(Y_1,Y_2\)使得\(\alpha^{val(Y_1)}\equiv \beta \alpha^{-val(Y_2)}\pmod{p}\)
\(\{\;6,7 \}\;\)任取1個的子集合\(Y_1\),\(\{\;0,1,2,3,4,5 \}\;\)任取3個的子集合\(Y_2\)
\(\matrix{Y_1&val(Y_1)&\alpha^{val(Y_1)}\pmod{181}&Y_2&val(Y_2)&\beta \alpha^{-val(Y_2)}\pmod{181}\cr
\{\;6\}\;&2^6=64&2^{64}\equiv 44&\{\;0,1,2\}\;&2^0+2^1+2^2=7&79*2^{-7}\equiv19\cr
\{\;7\}\;&2^7=128&2^{128}\equiv 126&\{\;0,1,3\}\;&2^0+2^1+2^3=11&79*2^{-11}\equiv103\cr
&&&\{\;0,1,4\}\;&2^0+2^1+2^4=19&79*2^{-19}\equiv151\cr
&&&\{\;0,1,5\}\;&2^0+2^1+2^5=35&79*2^{-35}\equiv153\cr
&&&\{\;0,2,3\}\;&2^0+2^2+2^3=13&79*2^{-13}\equiv71\cr
&&&\{\;0,2,4\}\;&2^0+2^2+2^4=21&79*2^{-21}\equiv83\cr
&&&\{\;0,2,5\}\;&2^0+2^2+2^5=37&79*2^{-37}\equiv174\cr
&&&\{\;0,3,4\}\;&2^0+2^3+2^4=25&79*2^{-25}\equiv107\cr
&&&\{\;0,3,5\}\;&2^0+2^3+2^5=41&79*2^{-41}\equiv124\cr
&&&\{\;0,4,5\}\;&2^0+2^4+2^5=49&79*2^{-49}\equiv173\cr
&&&\{\;1,2,3\}\;&2^1+2^2+2^3=14&79*2^{-14}\equiv126\cr
&&&\{\;1,2,4\}\;&2^1+2^2+2^4=22&79*2^{-22}\equiv132\cr
&&&\{\;1,2,5\}\;&2^1+2^2+2^5=38&79*2^{-38}\equiv87\cr
&&&\{\;1,3,4\}\;&2^1+2^3+2^4=26&79*2^{-26}\equiv144\cr
&&&\{\;1,3,5\}\;&2^1+2^3+2^5=42&79*2^{-42}\equiv62\cr
&&&\{\;1,4,5\}\;&2^1+2^4+2^5=50&79*2^{-50}\equiv177\cr
&&&\{\;2,3,4\}\;&2^2+2^3+2^4=28&79*2^{-28}\equiv36\cr
&&&\{\;2,3,5\}\;&2^2+2^3+2^5=44&79*2^{-44}\equiv106\cr
&&&\{\;2,4,5\}\;&2^2+2^4+2^5=52&79*2^{-52}\equiv180\cr
&&&\{\;3,4,5\}\;&2^3+2^4+2^5=56&79*2^{-56}\equiv147}\)
可找到
\(2^{128}\equiv79*2^{-14}\equiv 126\pmod{181}\),\(Y_1=\{\;7\}\;\),\(Y_2=\{\;1,2,3\}\;\),\(x=128+14=142\)
\(\{\;7,0 \}\;\)任取1個的子集合\(Y_1\),\(\{\;1,2,3,4,5,6 \}\;\)任取3個的子集合\(Y_2\)
\(\matrix{Y_1&val(Y_1)&\alpha^{val(Y_1)}\pmod{181}&Y_2&val(Y_2)&\beta \alpha^{-val(Y_2)}\pmod{181}\cr
\{\;7\}\;&2^7=128&2^{128}\equiv 126&\{\;1,2,3\}\;&2^1+2^2+2^3=14&79*2^{-14}\equiv126\cr
\{\;0\}\;&2^0=1&2^1\equiv 2&\{\;1,2,4\}\;&2^1+2^2+2^4=22&79*2^{-22}\equiv132\cr
&&&\{\;1,2,5\}\;&2^1+2^2+2^5=38&79*2^{-38}\equiv87\cr
&&&\{\;1,2,6\}\;&2^1+2^2+2^6=70&79*2^{-70}\equiv42\cr
&&&\{\;1,3,4\}\;&2^1+2^3+2^4=26&79*2^{-26}\equiv144\cr
&&&\{\;1,3,5\}\;&2^1+2^3+2^5=42&79*2^{-42}\equiv62\cr
&&&\{\;1,3,6\}\;&2^1+2^3+2^6=74&79*2^{-74}\equiv161\cr
&&&\{\;1,4,5\}\;&2^1+2^4+2^5=50&79*2^{-50}\equiv177\cr
&&&\{\;1,4,6\}\;&2^1+2^4+2^6=82&79*2^{-82}\equiv48\cr
&&&\{\;1,5,6\}\;&2^1+2^5+2^6=98&79*2^{-98}\equiv81\cr
&&&\{\;2,3,4\}\;&2^2+2^3+2^4=28&79*2^{-28}\equiv36\cr
&&&\{\;2,3,5\}\;&2^2+2^3+2^5=44&79*2^{-44}\equiv106\cr
&&&\{\;2,3,6\}\;&2^2+2^3+2^6=76&79*2^{-76}\equiv176\cr
&&&\{\;2,4,5\}\;&2^2+2^4+2^5=52&79*2^{-52}\equiv180\cr
&&&\{\;2,4,6\}\;&2^2+2^4+2^6=84&79*2^{-84}\equiv12\cr
&&&\{\;2,5,6\}\;&2^2+2^5+2^6=100&79*2^{-100}\equiv156\cr
&&&\{\;3,4,5\}\;&2^3+2^4+2^5=56&79*2^{-56}\equiv147\cr
&&&\{\;3,4,6\}\;&2^3+2^4+2^6=88&79*2^{-88}\equiv46\cr
&&&\{\;3,5,6\}\;&2^3+2^5+2^6=104&79*2^{-104}\equiv55\cr
&&&\{\;4,5,6\}\;&2^4+2^5+2^6=112&79*2^{-112}\equiv49}\)
可找到
\(2^{128}\equiv79*2^{-14}\equiv 126\pmod{181}\),\(Y_1=\{\;7\}\;\),\(Y_2=\{\;1,2,3\}\;\),\(x=128+14=142\)
參考資料:
Sungwook Kim, Jung Hee Cheon:A Parameterized Splitting System and Its Application to the Discrete Logarithm Problem with Low Hamming Weight Product Exponents. Public Key Cryptography 2008: 328-343
https://www.iacr.org/archive/pkc2008/49390329/49390329.pdf
從L中取n個元素的子集合副程式
(%i1)
Combination(L,n):=block
([c:[],s],
if length(L)>n then
(for r in L do
(s:delete(r,L),
c:unique(append(c,Combination(s,n)))
)
)
else
(c:[L]),
return(c)
)$
解低漢明權重的離散對數問題可變參數Splitting System方法副程式
(%i2)
LowHammingWeightDLP3(alpha,beta,p,t,ts):=block
([m,order,SetBnumber,Beta,inv_alpha,i,Y1,Y2,valY1,valY2,lenY1,lenY2,SetBcomplement,ListY1,ListY2,indexY1:1,indexY2:1,x1:0,x2:0,x:0],
print("ord(",alpha,")=",order:zn_order(alpha,p),",",alpha^string(order),"≡1(mod",p,")"),
print("m=Ceiling(log2",order,")=",m:ceiling(log(order)/log(2))),
print("Zm=",create_list(i,i,0,m-1)),
print("|Bi|=Floor(ts*m/t)=",SetBnumber:floor(ts*m/t)),
print("Bi={i+j (mod m):0≤j≤Floor(ts*m/t)-1},β={Bi:0≤i≤m-1}"),
print("β=",Beta:create_list(create_list(mod(i+j,m),j,0,SetBnumber-1),i,0,m-1)),
print("--------"),
inv_alpha:inv_mod(alpha,p),
for i:1 thru m do
(print("B",i-1,"=",Beta[ i ]),
print("從B",i-1,"取元素個數為ts=",ts,"個的子集合Y1,共C(Floor(ts*m/t),ts)=C(",SetBnumber,",",ts,")=",lenY1: (SetBnumber)!/((ts)!*(SetBnumber-ts)!),"個"),
print("Y1=",Y1:Combination(Beta[ i ],ts)),
print("val(Y1)=Σ2"^"y","=",valY1:create_list(apply("+",y),y,2^Y1)),
print("計算[",alpha^"val(Y1)",",val(Y1)]數對"),
print("ListY1=",ListY1:create_list([power_mod(alpha,valY1[ i ],p),valY1[ i ]],i,1,lenY1)),
print("Zm\\B",i-1,"=",SetBcomplement:sort(create_list(mod(i-1-j,m),j,1,m-SetBnumber))),
print("從Zm\\B",i-1,"取元素個數為t-ts=",t-ts,"個的子集合Y1,共C(m-floor(ts*m/t),t-ts)=C(",m-SetBnumber,",",t-ts,")=",lenY2: (m-SetBnumber)!/((m-SetBnumber-t+ts)!*(t-ts)!),"個"),
print("Y2=",Y2:Combination(SetBcomplement,t-ts)),
print("val(Y2)=Σ2"^"y","=",valY2:create_list(apply("+",y),y,2^Y2)),
print("計算[",beta,"*",alpha^"-val(Y2)",",","val(Y2)]數對"),
print("ListY2=",ListY2:create_list([mod(beta*power_mod(inv_alpha,valY2[ i ],p),p),valY2[ i ]],i,1,lenY2)),
print("由小到大排序"),
print("ListY1=",ListY1:sort(ListY1)),
print("ListY2=",ListY2:sort(ListY2)),
indexY1:1,indexY2:1,x1:0,x2:0,
while indexY1<=lenY1 and indexY2<=lenY2 do
(if ListY1[indexY1][1]=ListY2[indexY2][1] then
(print("ListY1和ListY2互相比較找到相同值"),
x1: ListY1[indexY1][2],x2: ListY2[indexY2][2],
print(alpha^string(x1),"≡",beta,"*",alpha^concat("-",x2),"≡",ListY1[indexY1][1],"(mod",p,")"),
print("x=",x1,"+",x2,"=",x:mod(x1+x2,order)),
indexY1:indexY1+1,
indexY2:indexY2+1
)
else if ListY1[indexY1][1]<ListY2[indexY2][1] then
(indexY1:indexY1+1)
else
(indexY2:indexY2+1)
),
if x1=0 and x2=0 then
(print("ListY1和ListY2互相比較沒找到相同值")),
print("--------")
),
if x=0 then
(print("無解"),
return()
)
else
(return(x))
)$
\(\alpha^x \equiv \beta \pmod{p}\),已知x的漢明權重\(t=4\),參數\(t_s=1\)
(%i7)
alpha:2;
beta:79;
p:181;
t:4;
ts:1;
(alpha) 2
(beta) 79
(p) 181
(t) 4
(ts) 1
解低漢明權重的離散對數問題-可變參數Splitting System方法
(%i8) x: LowHammingWeightDLP3(alpha,beta,p,t,ts);
\(ord(2)=180\),\(2^{180}\equiv 1\pmod{181}\)
\(m=Ceiling(log_2 180)=8\)
\(Zm=[0,1,2,3,4,5,6,7]\)
\(|\;Bi|\;=Floor(ts*m/t)=2\)
\(Bi=\{\;i+j\pmod{m}:0\le j\le Floor(ts*m/t)-1\}\;\),\(\beta=\{\;Bi:0\le i\le m-1\}\;\)
\(\beta=[[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,0]]\)
--------
\(B0=[0,1]\)
從B0取元素個數為\(ts=1\)個的子集合\(Y1\),共\(C(Floor(ts*m/t),ts)=C(2,1)=2\)個
\(Y1=[[0],[1]]\)
\(val(Y1)=Σ2^y=[1,2]\)
計算\([2^{val(Y1)},val(Y1)]\)數對
\(ListY1=[[2,1],[4,2]]\)
\(Zm\backslash\;B0=[2,3,4,5,6,7]\)
從\(Zm\backslash\;B0\)取元素個數為\(t-ts=3\)個的子集合\(Y1\),共\(C(m-floor(ts*m/t),t-ts)=C(6,3)=20\)個
\(Y2=[[2,3,4],[2,3,5],[2,3,6],[2,3,7],[2,4,5],[2,4,6],[2,4,7],[2,5,6],[2,5,7],[2,6,7],\)
\([3,4,5],[3,4,6],[3,4,7],[3,5,6],[3,5,7],[3,6,7],[4,5,6],[4,5,7],[4,6,7],[5,6,7]]\)
\(val(Y2)=Σ2^y=[28,44,76,140,52,84,148,100,164,196,56,88,152,104,168,200,112,176,208,224]\)
計算\([79*2^{-val(Y2)},val(Y2)]\)數對
\(ListY2=[[36,28],[106,44],[176,76],[4,140],[180,52],[12,84],[99,148],[156,100],[20,164],[122,196],\)
\([147,56],[46,88],[108,152],[55,104],[137,168],[166,200],[49,112],[178,176],[36,208],[106,224]]\)
由小到大排序
\(ListY1=[[2,1],[4,2]]\)
\(ListY2=[[4,140],[12,84],[20,164],[36,28],[36,208],[46,88],[49,112],[55,104],[99,148],[106,44],\)
\([106,224],[108,152],[122,196],[137,168],[147,56],[156,100],[166,200],[176,76],[178,176],[180,52]]\)
\(ListY1\)和\(ListY2\)互相比較找到相同值
\(2^2\equiv 79*2^{-140}\equiv 4\pmod{181}\)
\(x=2+140=142\)
--------
\(B1=[1,2]\)
從\(B1\)取元素個數為\(ts=1\)個的子集合\(Y1\),共\(C(Floor(ts*m/t),ts)=C(2,1)=2\)個
\(Y1=[[1],[2]]\)
\(val(Y1)=Σ2^y=[2,4]\)
計算\([2^{val(Y1)},val(Y1)]\)數對
\(ListY1=[[4,2],[16,4]]\)
\(Zm\backslash\;B1=[0,3,4,5,6,7]\)
從\(Zm\backslash\;B1\)取元素個數為\(t-ts=3\)個的子集合\(Y1\),共\(C(m-floor(ts*m/t),t-ts)=C(6,3)=20\)個
\(Y2=[[0,3,4],[0,3,5],[0,3,6],[0,3,7],[0,4,5],[0,4,6],[0,4,7],[0,5,6],[0,5,7],[0,6,7],\)
\([3,4,5],[3,4,6],[3,4,7],[3,5,6],[3,5,7],[3,6,7],[4,5,6],[4,5,7],[4,6,7],[5,6,7]]\)
\(val(Y2)=Σ2^y=[25,41,73,137,49,81,145,97,161,193,56,88,152,104,168,200,112,176,208,224]\)
計算\([79*2^{-val(Y2)},val(Y2)]\)數對
\(ListY2=[[107,25],[124,41],[141,73],[32,137],[173,49],[96,81],[68,145],[162,97],[160,161],[71,193],\)
\([147,56],[46,88],[108,152],[55,104],[137,168],[166,200],[49,112],[178,176],[36,208],[106,224]]\)
由小到大排序
\(ListY1=[[4,2],[16,4]]\)
\(ListY2=[[32,137],[36,208],[46,88],[49,112],[55,104],[68,145],[71,193],[96,81],[106,224],[107,25],\)
\([108,152],[124,41],[137,168],[141,73],[147,56],[160,161],[162,97],[166,200],[173,49],[178,176]]\)
\(ListY1\)和\(ListY2\)互相比較沒找到相同值
--------
\(B2=[2,3]\)
從\(B2\)取元素個數為\(ts=1\)個的子集合\(Y1\),共\(C(Floor(ts*m/t),ts)=C(2,1)=2\)個
\(Y1=[[2],[3]]\)
\(val(Y1)=Σ2^y=[4,8]\)
計算\([2^{val(Y1)},val(Y1)]\)數對
\(ListY1=[[16,4],[75,8]]\)
\(Zm\backslash\;B2=[0,1,4,5,6,7]\)
從\(Zm\backslash\;B2\)取元素個數為\(t-ts=3\)個的子集合\(Y1\),共\(C(m-floor(ts*m/t),t-ts)=C(6,3)=20\)個
\(Y2=[[0,1,4],[0,1,5],[0,1,6],[0,1,7],[0,4,5],[0,4,6],[0,4,7],[0,5,6],[0,5,7],[0,6,7],\)
\([1,4,5],[1,4,6],[1,4,7],[1,5,6],[1,5,7],[1,6,7],[4,5,6],[4,5,7],[4,6,7],[5,6,7]]\)
\(val(Y2)=Σ2^y=[19,35,67,131,49,81,145,97,161,193,50,82,146,98,162,194,112,176,208,224]\)
計算\([79*2^{-val(Y2)},val(Y2)]\)數對
\(ListY2=[[151,19],[153,35],[155,67],[57,131],[173,49],[96,81],[68,145],[162,97],[160,161],[71,193],\)
\([177,50],[48,82],[34,146],[81,98],[80,162],[126,194],[49,112],[178,176],[36,208],[106,224]]\)
由小到大排序
\(ListY1=[[16,4],[75,8]]\)
\(ListY2=[[34,146],[36,208],[48,82],[49,112],[57,131],[68,145],[71,193],[80,162],[81,98],[96,81],\)
\([106,224],[126,194],[151,19],[153,35],[155,67],[160,161],[162,97],[173,49],[177,50],[178,176]]\)
\(ListY1\)和\(ListY2\)互相比較沒找到相同值
--------
\(B3=[3,4]\)
從\(B3\)取元素個數為\(ts=1\)個的子集合\(Y1\),共\(C(Floor(ts*m/t),ts)=C(2,1)=2\)個
\(Y1=[[3],[4]]\)
\(val(Y1)=Σ2^y=[8,16]\)
計算\([2^{val(Y1)},val(Y1)]\)數對
\(ListY1=[[75,8],[14,16]]\)
\(Zm\backslash\;B3=[0,1,2,5,6,7]\)
從\(Zm\backslash\;B3\)取元素個數為\(t-ts=3\)個的子集合\(Y1\),共\(C(m-floor(ts*m/t),t-ts)=C(6,3)=20\)個
\(Y2=[[0,1,2],[0,1,5],[0,1,6],[0,1,7],[0,2,5],[0,2,6],[0,2,7],[0,5,6],[0,5,7],[0,6,7],\)
\([1,2,5],[1,2,6],[1,2,7],[1,5,6],[1,5,7],[1,6,7],[2,5,6],[2,5,7],[2,6,7],[5,6,7]]\)
\(val(Y2)=Σ2^y=[7,35,67,131,37,69,133,97,161,193,38,70,134,98,162,194,100,164,196,224]\)
計算\([79*2^{-val(Y2)},val(Y2)]\)數對
\(ListY2=[[19,7],[153,35],[155,67],[57,131],[174,37],[84,69],[150,133],[162,97],[160,161],[71,193],\)
\([87,38],[42,70],[75,134],[81,98],[80,162],[126,194],[156,100],[20,164],[122,196],[106,224]]\)
由小到大排序
\(ListY1=[[14,16],[75,8]]\)
\(ListY2=[[19,7],[20,164],[42,70],[57,131],[71,193],[75,134],[80,162],[81,98],[84,69],[87,38],\)
\([106,224],[122,196],[126,194],[150,133],[153,35],[155,67],[156,100],[160,161],[162,97],[174,37]]\)
\(ListY1\)和\(ListY2\)互相比較找到相同值
\(2^8\equiv 79*2^{-134}\equiv 75\pmod{181}\)
\(x=8+134=142\)
--------
\(B4=[4,5]\)
從\(B4\)取元素個數為\(ts=1\)個的子集合\(Y1\),共\(C(Floor(ts*m/t),ts)=C(2,1)=2\)個
\(Y1=[[4],[5]]\)
\(val(Y1)=Σ2^y=[16,32]\)
計算\([2^{val(Y1)},val(Y1)]\)數對
\(ListY1=[[14,16],[15,32]]\)
\(Zm\backslash\;B4=[0,1,2,3,6,7]\)
從\(Zm\backslash\;B4\)取元素個數為\(t-ts=3\)個的子集合\(Y1\),共\(C(m-floor(ts*m/t),t-ts)=C(6,3)=20\)個
\(Y2=[[0,1,2],[0,1,3],[0,1,6],[0,1,7],[0,2,3],[0,2,6],[0,2,7],[0,3,6],[0,3,7],[0,6,7],\)
\([1,2,3],[1,2,6],[1,2,7],[1,3,6],[1,3,7],[1,6,7],[2,3,6],[2,3,7],[2,6,7],[3,6,7]]\)
\(val(Y2)=Σ2^y=[7,11,67,131,13,69,133,73,137,193,14,70,134,74,138,194,76,140,196,200]\)
計算\([79*2^{-val(Y2)},val(Y2)]\)數對
\(ListY2=[[19,7],[103,11],[155,67],[57,131],[71,13],[84,69],[150,133],[141,73],[32,137],[71,193],\)
\([126,14],[42,70],[75,134],[161,74],[16,138],[126,194],[176,76],[4,140],[122,196],[166,200]]\)
由小到大排序
\(ListY1=[[14,16],[15,32]]\)
\(ListY2=[[4,140],[16,138],[19,7],[32,137],[42,70],[57,131],[71,13],[71,193],[75,134],[84,69],\)
\([103,11],[122,196],[126,14],[126,194],[141,73],[150,133],[155,67],[161,74],[166,200],[176,76]]\)
\(ListY1\)和\(ListY2\)互相比較沒找到相同值
--------
\(B5=[5,6]\)
從\(B5\)取元素個數為\(ts=1\)個的子集合\(Y1\),共\(C(Floor(ts*m/t),ts)=C(2,1)=2\)個
\(Y1=[[5],[6]]\)
\(val(Y1)=Σ2^y=[32,64]\)
計算\([2^{val(Y1)},val(Y1)]\)數對
\(ListY1=[[15,32],[44,64]]\)
\(Zm\backslash\;B5=[0,1,2,3,4,7]\)
從\(Zm\backslash\;B5\)取元素個數為\(t-ts=3\)個的子集合\(Y1\),共\(C(m-floor(ts*m/t),t-ts)=C(6,3)=20\)個
\(Y2=[[0,1,2],[0,1,3],[0,1,4],[0,1,7],[0,2,3],[0,2,4],[0,2,7],[0,3,4],[0,3,7],[0,4,7],\)
\([1,2,3],[1,2,4],[1,2,7],[1,3,4],[1,3,7],[1,4,7],[2,3,4],[2,3,7],[2,4,7],[3,4,7]]\)
\(val(Y2)=Σ2^y=[7,11,19,131,13,21,133,25,137,145,14,22,134,26,138,146,28,140,148,152]\)
計算\([79*2^{-val(Y2)},val(Y2)]\)數對
\(ListY2=[[19,7],[103,11],[151,19],[57,131],[71,13],[83,21],[150,133],[107,25],[32,137],[68,145],\)
\([126,14],[132,22],[75,134],[144,26],[16,138],[34,146],[36,28],[4,140],[99,148],[108,152]]\)
由小到大排序
\(ListY1=[[15,32],[44,64]]\)
\(ListY2=[[4,140],[16,138],[19,7],[32,137],[34,146],[36,28],[57,131],[68,145],[71,13],[75,134],\)
\([83,21],[99,148],[103,11],[107,25],[108,152],[126,14],[132,22],[144,26],[150,133],[151,19]]\)
\(ListY1\)和\(ListY2\)互相比較沒找到相同值
--------
\(B6=[6,7]\)
從\(B6\)取元素個數為\(ts=1\)個的子集合\(Y1\),共\(C(Floor(ts*m/t),ts)=C(2,1)=2\)個
\(Y1=[[6],[7]]\)
\(val(Y1)=Σ2^y=[64,128]\)
計算\([2^{val(Y1)},val(Y1)]\)數對
\(ListY1=[[44,64],[126,128]]\)
\(Zm\backslash\;B6=[0,1,2,3,4,5]\)
從\(Zm\backslash\;B6\)取元素個數為\(t-ts=3\)個的子集合\(Y1\),共\(C(m-floor(ts*m/t),t-ts)=C(6,3)=20\)個
\(Y2=[[0,1,2],[0,1,3],[0,1,4],[0,1,5],[0,2,3],[0,2,4],[0,2,5],[0,3,4],[0,3,5],[0,4,5],\)
\([1,2,3],[1,2,4],[1,2,5],[1,3,4],[1,3,5],[1,4,5],[2,3,4],[2,3,5],[2,4,5],[3,4,5]]\)
\(val(Y2)=Σ2^y=[7,11,19,35,13,21,37,25,41,49,14,22,38,26,42,50,28,44,52,56]\)
計算\([79*2^{-val(Y2)},val(Y2)]\)數對
\(ListY2=[[19,7],[103,11],[151,19],[153,35],[71,13],[83,21],[174,37],[107,25],[124,41],[173,49],\)
\([126,14],[132,22],[87,38],[144,26],[62,42],[177,50],[36,28],[106,44],[180,52],[147,56]]\)
由小到大排序
\(ListY1=[[44,64],[126,128]]\)
\(ListY2=[[19,7],[36,28],[62,42],[71,13],[83,21],[87,38],[103,11],[106,44],[107,25],[124,41],\)
\([126,14],[132,22],[144,26],[147,56],[151,19],[153,35],[173,49],[174,37],[177,50],[180,52]]\)
\(ListY1\)和\(ListY2\)互相比較找到相同值
\(2^{128}\equiv79*2^{-14}\equiv126\pmod{181}\)
\(x=128+14=142\)
--------
\(B7=[7,0]\)
從\(B7\)取元素個數為\(ts=1\)個的子集合\(Y1\),共\(C(Floor(ts*m/t),ts)=C(2,1)=2\)個
\(Y1=[[0],[7]]\)
\(val(Y1)=Σ2^y=[1,128]\)
計算\([2^{val(Y1)},val(Y1)]\)數對
\(ListY1=[[2,1],[126,128]]\)
\(Zm\backslash\;B7=[1,2,3,4,5,6]\)
從\(Zm\backslash\;B7\)取元素個數為\(t-ts=3\)個的子集合\(Y1\),共\(C(m-floor(ts*m/t),t-ts)=C(6,3)=20\)個
\(Y2=[[1,2,3],[1,2,4],[1,2,5],[1,2,6],[1,3,4],[1,3,5],[1,3,6],[1,4,5],[1,4,6],[1,5,6],\)
\([2,3,4],[2,3,5],[2,3,6],[2,4,5],[2,4,6],[2,5,6],[3,4,5],[3,4,6],[3,5,6],[4,5,6]]\)
\(val(Y2)=Σ2^y=[14,22,38,70,26,42,74,50,82,98,28,44,76,52,84,100,56,88,104,112]\)
計算\([79*2^{-val(Y2)},val(Y2)]\)數對
\(ListY2=[[126,14],[132,22],[87,38],[42,70],[144,26],[62,42],[161,74],[177,50],[48,82],[81,98],\)
\([36,28],[106,44],[176,76],[180,52],[12,84],[156,100],[147,56],[46,88],[55,104],[49,112]]\)
由小到大排序
\(ListY1=[[2,1],[126,128]]\)
\(ListY2=[[12,84],[36,28],[42,70],[46,88],[48,82],[49,112],[55,104],[62,42],[81,98],[87,38],\)
\([106,44],[126,14],[132,22],[144,26],[147,56],[156,100],[161,74],[176,76],[177,50],[180,52]]\)
\(ListY1\)和\(ListY2\)互相比較找到相同值
\(2^{128}\equiv79*2^{-14}\equiv126\pmod{181}\)
\(x=128+14=142\)
--------
(x) 142