|
[原创]The XOR Secret in Our Computer System
这就是那个算法,就是比较A, B两个数的情况,当都是偶数时多判断一下吧,代码如下 #define ERROR_RESULT -1 // 测试两个正数的XOR值 int TestXor(u_int32_t A, u_int32_t B) { u_int32_t C1 = 0, C2 = 0; if ( (A % 2) && (B % 2) ) { // A, B都是奇数 C1 = A ^ B; C2 = (-1*A)^(-1*B); }else if ( !(A % 2) && !(B % 2) ) { // A, B都是偶数 if ( (!(A % 4) && !(B % 4)) && ((A % 8) && (B % 8)) ) { // 且整除4不整除8 C1 = A ^ B; C2 = (-1*A)^(-1*B); }else return ERROR_RESULT; }else return ERROR_RESULT; // A, B中有一个是奇数 printf("%d xor %d, C1=0x%.8X, C2=0x%.8X\n", A, B, C1, C2); return 0; } 调用方式: if ( ERROR_RESULT == TestXor(8, 11) ) { printf("输入有误!\n"); } 不过还没想出来这个函数怎么用... 完整的工程已经传上来了,Dev-Cpp的工程文件和编译好的可执行程序,VC应该也能编译成功。输入 55,57 或 12,28 这样的两个数进行计算。 |
|
[原创]The XOR Secret in Our Computer System
若有空,請著手改寫這個 program,至於怎麼改,等你回我 message 後,我告訴你怎麼改。 改个小程序的时间当然有,关注一下怎么改,版主是想验证什么方面? |
|
[分享]Diffie 訪問英國的演講MP3 檔
下来听听看,不过能听懂就好了-_- |
|
算文件摘要的话,最快是什么算法
很多散列算法都能做文件摘要,例如 VirusTotal 用到的MD5、SHA-1等 自己写算法也行,不过要注意,文件摘要的目的是让算出的散列值尽可能只对应一个文件,比如你 CRC(文件A),但也有可能出现 CRC(文件B) = CRC(文件A) 的冲突情况,只要要解决这个问题你的摘要算法就OK了。 解决办法也很简单,所谓再一再二不能再三再四,用2-3个不同的哈希算法计算文件的摘要,哪怕第一个算法的散列值碰撞了,第二个算法同时发生 Hash(文件A) = Hash(文件B) 的可能性可以说微乎其微... VirusTotal中就是复合采用 MD5/SHA-1/文件大小 来唯一确定一个文件的。 |
|
|
|
[原创]分析了一下360安全卫士的HOOK
这个很强大,一直不知道360 Hook了哪些地方,LZ good job! |
|
[原创]The XOR Secret in Our Computer System
可能是我理解錯了,我對2-3這兩點沒意見 我們先討論對于 (A) ⊕ (B) = (-A) ⊕ (-B) 這個公式 也許我上面沒說清楚,我窮舉得出的是對于第4點這個成立的概率:
當A, B 均為偶數時,(A) ⊕ (B) = (-A) ⊕ (-B) 成立的概率是 33.33%,不知這點版主同意否? 現在我不明白的是這個“二分之一,四分之一”指的是什麽
是說A, B均為奇數時 (A) ⊕ (B) = (-A) ⊕ (-B) 成立的概率(我說的100%是指這個)?還是A, B均為奇數的概率(應該是指這個吧)?恕我愚鈍,我似乎把自己給繞進去了... ps: 這個我知道,r, s同時是奇偶數的概率很明顯 那,當 r 及 s 均為奇數,機率就是 四分之一。 那,當 r 及 s 為一奇一偶數,機率就是 二分之一。 那,當 r 及 s 均為偶數,機率就是 四分之一。 需要確定的是 r, s同爲奇數情况下 (A) ⊕ (B) = (-A) ⊕ (-B) 成立的概率 以及 r, s同爲偶數情况下 (A) ⊕ (B) = (-A) ⊕ (-B) 成立的概率。 ps2: 一般加密中會選擇兩個大素數進行XOR操作,而素數除2外都是奇數... 所以只考慮同爲奇數、同爲偶數的情况才有意義。 |
|
[原创]The XOR Secret in Our Computer System
看过那篇paper了 以奇数来说,当两两均为奇数时, (A⊕ B) = (-A⊕ -B) 条件永远成立。当两两均为偶数时,要符合特定条件才会成立。由于计算过程,有点复杂,非本文探讨主轴,因此未列其中 两个数都是奇数的概率是100%吧,那篇论文的 Lemma 4 不就是在证明奇数时相等?倒是 Lemma 5 没见着,估计版主是截掉了 另外,为什么两偶数是50%?我用程序穷举了-10000 ~ 10000 之间的数XOR(就是上面程序,把偶数那个if的注释去掉),结果是33.32%。 一奇一偶倒是0%,这样加起来是 100%*0.25 + 33.32%*0.25 = 33.3% |
|
[原创]放个Pdf重命名小工具大家用
[QUOTE=一鸿;692665]void _tmain(int argc, _TCHAR* argv[]) { __asm { push offset fuck_exception push dword ptr fs:[0] mov dword ptr fs:[0], esp }...[/QUOTE] try { ... }catch { } |
|
[原创]The XOR Secret in Our Computer System
写程序下才发现之前我完全没懂 原来XOR相同只在一定条件下成立。 我测试了(整数) -100000 ~ 100000 以内的数xor: 两个数都是奇数时是100%, 直接看代码吧,附上工程和可执行程序: #include <stdio.h> #include <stdlib.h> #define u_int32_t unsigned int void printXORImpact(u_int32_t nSize) { int i, j; u_int32_t temp; u_int32_t count = 0, sum = 0; if (nSize == 0) return; for (i = 0; i < nSize; i++) { for (j = 0; j < nSize; j++) if ((i % 2 != 0) && (j % 2 != 0)) // 奇数 //if ((i % 2 == 0) && (j % 2 == 0)) // 偶数 { temp = (-1*i)^(-1*j); if (temp == (i^j)) { count++; //printf("Impact at (%d xor %d)\n", i, j); } sum++; } } printf("XOR Impact %d/%d times, %.2f%%\n", count, sum, (double)count/sum*100); return; } int main(int argc, char *argv[]) { printXORImpact(1000); system("PAUSE"); return 0; } |
|
[分享+讨论]对 XOR_password 及XOR_cryptanalyiss 等相关论文研讨。(No. 1)
看过版主的 The XOR Secret in Our Computer System 后大致知道你想干什么了,运用 r ⊕m = (-r)⊕(-m) 的理论找目前这些算法的漏洞吗?有意思 这个论文也拖回去看看先。 |
|
[原创]The XOR Secret in Our Computer System
很易懂,写得不错 (A) ⊕ (B) = (-A) ⊕ (-B) 就是说虽然负数虽然在我们看来前面多了个负号,但是计算机是通过在补码来表示的,导致两个负数都补1后XOR结果相同。 嗯,好像可以减少一半的探测次数,得到 (-A) 也就知道 (A) 了。 |
|
[分享]XOR_password ( cc-96-189 ) 94 篇論文--請幫忙更改檔名。
好的,不过我先读两篇密码学的论文试试自己这方面的深浅。 我以前密码学课学得稀烂,所以想加入密码学小组锻炼下,老是看自己方向的论文感觉思维都被禁锢了... |
|
|
|
[分享]XOR_password ( cc-96-189 ) 94 篇論文--請幫忙更改檔名。
反正闲着也是闲着,这两天被Windows下编译mystar搞郁闷了,正好换换心情... |
|
[原创]放个Pdf重命名小工具大家用
LZ速度真快 试了下感觉不错,确实如 rockinuk 版主说的有些文件会 [e] rename() error ,比如遇到标题换行、特殊字符(比如最后的星号)、冒号,直接送 MoveFileA 肯定会失败。 附件中有三个不能修改的例子 |
|
[分享]XOR_password ( cc-96-189 ) 94 篇論文--請幫忙更改檔名。
6楼 96-120:25篇 (25 files) 3楼 152-172:21篇 ( 5 files) 7楼 121-151:31篇 (32 files) 8楼 173-189:17篇 (17 files) 一共94篇论文 |
|
[分享]XOR_password ( cc-96-189 ) 94 篇論文--請幫忙更改檔名。
173 - 189,全部都在这里了 |
|
|
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值