|
[分享]Hash Functions and Information Theoretic Security
哈希函数的安全性分析,好像有点意思,感谢分享。 |
|
[注意]大家留一下联系方式~~
邮箱:rmusique@gmail.com or dgrave@126.com MSN: bit@live.cn 武汉,硕士在读 擅长Delphi编程,不过也仅仅是CODING而已,加密算法什么的依然需要磨练... |
|
[分享]RSA资料
找了一个帮助理解RSA原理的简单代码,用rsa.rar中的rsa.c可以模拟一个简单的RSA加解密过程,例如: $ ./rsa -m8 -g Generating primes l(p)=0 l(q)=7 l(p)=7 l(q)=8 p=127 q=251 fi=31500 ... choose <a> such that it has no factors of fi: 2^2 * 3^2 * 5^3 * 7 a = 11 (privkey)x=8591, y=-3, (pubkey)pq=31877 * encrypt secret message '999' (with public key [31877,11]) $ ./rsa -e 31877 11 999 crypted: 15722 * 'crack' rsa: $ ./rsa -k 31877 11 a=11 pq=31877 ... fi=31500 ... (privkey)x=8591 y=-3 g=1 * decrypt encrypted message: $ ./rsa -e 31877 8591 15722 crypted: 999 以及一个关于RSA原理的PPT,其中以RSA-129为例讲解的。 [QUOTE=饮水思源]RSA tools http://bbs.pediy.com/showthread.php?p=149866[/QUOTE] |
|
[分享]GPUs - NVIDIA CUDA 平台相关资料
这个我就不清楚了,没有接触过RSA-129。不知道版主有没有普通PC上破解RSA-129的源码资料,有的话可能会方便点。(Google了下好像没有人做过这方面的) CUDA MD5实际上就是把穷举MD5工作交给GPU去做,而且并没有最初设想的拆分算法过程。 我们一般实现MD5破解是通过一个循环,从字符集里产生一个密码,计算MD5 -> 比较是不是所需要的结果。这种方式瓶颈在于MD5值的计算上。 而CUDA MD5中是将每个MD5计算分配给一个线程,利用CUDA的优势,让 8*256 个线程去同时跑 2048 个MD5值!也就说并不是在一次计算中将之并行化,而是相当于用 2048 台机器并行去计算这些MD5值,然后比较结果。 举个例子,假设有 AA/AB/AC/AD/.../ZX/ZY/ZZ 这样一组需要测试的密码,原来的程序只能是:for (x = 从 AA/AB/.../ZZ 中选取一个密码) 不知道这样说明的话rockinuk版主能否明白。也就说只要有RSA-129的穷举破解程序,就可以改成CUDA的代码,同时起 8*256 个线程去计算不同密钥的RSA就行了。 不过看到GPU的这个计算能力,我最先想到的是用这个高速生成RainBow Table。实际上计算一个链长大于10000,Hash链较多的彩虹表,是相当耗时的。现在可以改成让每个线程负责计算一条链,这样GPU性能越高,一次计算的链也就越多,生成速度也就越快。 |
|
[分享]GPUs - NVIDIA CUDA 平台相关资料
再来是利用CUDA平台高速破解MD5的例子,实际上这样的代码Google就能找到很多,推荐两个不错的: CUDA MD5 (需要boost库,不过代码比较短) http://code.google.com/p/cudamd5/ MD5 GPU Crack (写得比较完善的MD5破解程序) http://bvernoux.free.fr/md5/index.php 我测试CUDA MD5,在模拟器环境下,穷举出“n2xv51”这样小写+数字的6位MD5,只用了1253秒,放到GPU中跑的话估计还会提升不少: > cudamd5.exe 6 6 D43384B77C4EEDD75FFA9F3569447C75 "0123456789abcdefghijklmnopqrstuvwxyz" 其他几个类似的项目: HashClash http://code.google.com/p/hashclash/ Nightingale is a a GPU password software designed to encrypt or bruteforce password using GPU http://code.google.com/p/nightingale/ |
|
[分享]GPUs - NVIDIA CUDA 平台相关资料
之前是官方的资料,贴个另外的教程: CUDA, Supercomputing for the Masses: Part 1-14 http://www.ddj.com/architect/207200659 http://www.ddj.com/hpc-high-performance-computing/207402986 ... (只给出Part1,2的链接,拖到最后有个列表可以选择) |
|
[分享]GPUs + Information Security issue papers.
找了几个关于用CUDA加速MD5破解的工程,有条件的可以编译一个试试看: Nightingale is a a GPU password software designed to encrypt or bruteforce password using GPU http://code.google.com/p/nightingale/ CUDA MD5 http://code.google.com/p/cudamd5/ HashClash http://code.google.com/p/hashclash/ NVIDIA CUDA校园程序设计大赛 相关下载 http://cuda.csdn.net/Contest/pro/nvidia_show.aspx |
|
[分享]GPUs + Information Security issue papers.
开发手册的演示代码,估计压根没考虑这个... 实际上你看他 h_A, h_B 的初值都没给,不过从结构上已经可以体现CUDA的方便了。矩阵相加这样做肯定比 for (N*N) 次要快 |
|
[分享]GPUs + Information Security issue papers.
赞!CUDA果然是个好东西,对编程人员来说完全是透明的,并且相当容易上手。稍微扫了一眼 Programming Guide 就可以明白利用CUDA操作GPU进行运算是怎么回事, 例如这个矩阵加法例子(NVIDIA CUDA Programming Guide 2.3: p18): // Device code __global__ void[B] VecAdd[/B](float* A, float* B, float* C) { int i = blockDim.x * blockIdx.x + threadIdx.x; if (i < N) C[i] = A[i] + B[i]; } // Host code int main() { int N = ...; size_t size = N * sizeof(float); // Allocate input vectors h_A and h_B in host memory float* h_A = malloc(size); float* h_B = malloc(size); // Allocate vectors in device memory float* d_A; cudaMalloc((void**)&d_A, size); float* d_B; cudaMalloc((void**)&d_B, size); float* d_C; cudaMalloc((void**)&d_C, size); // Copy vectors from host memory to device memory cudaMemcpy(d_A, h_A, size, cudaMemcpyHostToDevice); cudaMemcpy(d_B, h_B, size, cudaMemcpyHostToDevice); // Invoke kernel int threadsPerBlock = 256; int blocksPerGrid = (N + threadsPerBlock – 1) / threadsPerBlock; [B]VecAdd[/B]<<<blocksPerGrid, threadsPerBlock>>>(d_A, d_B, d_C); // Copy result from device memory to host memory // h_C contains the result in host memory cudaMemcpy(h_C, d_C, size, cudaMemcpyDeviceToHost); // Free device memory cudaFree(d_A); cudaFree(d_B); cudaFree(d_C); } 这段代码利用cuda*这种函数在设备内存中进行操作,然后将要GPU运算的VecAdd函数通过 VecAdd<<<xx, xxx>>>(d_A, d_B, d_C); 这样的方式调用 (<<<..>>>是CUDA自定义的操作,表示该函数由GPU负责),后面传入在设备内存中的 d_A, d_B, d_C。算完后再将设备内存中的 d_C 写回主机内存 h_C 中。 |
|
[分享]GPUs + Information Security issue papers.
消息已收到,个人对这个很感兴趣,希望能够在代码编写上出一份力。 先去收集些相关的编程资料好了。 我机器果然过时了,NV GeForce 8400以上的台式机显卡才支持CUDA。 这是支持的产品列表:http://www.nvidia.cn/object/cuda_learn_products_cn.html 微软的方案虽然能让支持DX9的显卡跑起来,不过居然要用C#或.Net写... 真是陷入窘境了 找到个不错的地方 GPGPU Stream Processing(CUDA\OpenCL\DirectCompute):http://www.opengpu.org/bbs/forumdisplay.php?fid=6 |
|
[分享]GPUs + Information Security issue papers.
学习下,听说有些解密软件就是通过NV的GPU库加速计算的,不过想必需要涉及很深的硬件编程理论才能实用化。 |
|
[求助]关于cookies
暗红色链接是IE的历史链接记录,和Cookie无关。清除IE的访问历史即可。 |
|
|
|
[原创]The XOR Secret in Our Computer System--延伸討論
嗯,这两个例子刚好一个是+4,另一个是+8,类推3次进位的就是+16了(8,24,40,...)。 至于间隔多少,是由二进制的尾数决定的: 前三个: 2 .... ..[COLOR="Red"]1[/COLOR]0 (+ 4) 2,6,10,14... 4 .... .[COLOR="red"]1[/COLOR]00 (+ 8) 4,12,20... 8 .... [COLOR="red"]1[/COLOR]000 (+16) 8,24,40... 再往后继续乘2(1继续向前挪动): 16 ...[COLOR="red"]1[/COLOR] 0000 (+32) ... 32 ..[COLOR="red"]1[/COLOR]0 0000 ... 二进制的角度很容易理解吧,至于里面的数学规律,我就不继续想了... 为什么不考虑8的倍数?2的倍数呢? |
|
[原创]The XOR Secret in Our Computer System--延伸討論
不是,不过繁体字也能看懂吧,文言文不都是繁体字? 总之随意了,尊重个人习惯,用繁体用简体都不影响交流 忘了,附带一个显示两个数计算结果和16进制的程序,方便验证结果。 u_int32_t a, b; u_int32_t temp; do { a = 0; b = 0; printf("\n请输入两个正整数A,B (以逗号分割): "); scanf("%d,%d", &a, &b); // 输出下计算结果 temp = (-a)^(-b); printf("%d xor %d, C1=0x%.8X, C2=0x%.8X\n", a, b, (a^b), temp); printf(" (%.8X xor %.8X) = (%.8X xor %.8X)\n", a, b, -a, -b); }while ( a || b ); 之前那个枚举这些数的程序,删掉了那些没用的代码,具体看附件中的程序 |
|
[原创]The XOR Secret in Our Computer System--延伸討論
先说明这个思路不是我想出来的,昨天吃饭时和几个哥们聊起这个问题,他们倒是从二进制角度解释了这一现象。其实版主的思路已经很接近了,就是看二进制的最后几位来确定xor后结果是否相等。 我们知道『负数 = 正数取反+1』,因为偶数取反+1后会有进位,导致了可能 (A ⊕ B) != (-A ⊕ -B) 总结来说,就是看二进制进位后停在哪一位上。一旦两个数+1操作进位的位数相同,就产生 (A ⊕ B) = (-A ⊕ -B) 举个例子: 我们先看偶数的情况: 按照这个理论,两个数都是奇数的情况也很容易解释了,奇数取反后末尾为 (...0)b,+1后不会进位(也就是进位0次的情况),所以100%相等。一奇一偶也一样,奇数取反+1不进位,但偶数却进位了(也就是进位的位数不相同),所以异或后结果不相等。 |
|
[原创]The XOR Secret in Our Computer System--延伸討論
1. A,B 两数相等应该也算是一种特例,因为 0 没有正负之分 2. 考虑偶数的情况下,发现虽然A,B取8以内只有 2 xor 6 = (-2) xor (-6) 这个特例,但是8以外这样的情况还很多,比如:6 xor 10, 6 xor 14, ..., 86 xor 90, ... 6 xor 10, (00000006 xor 0000000A) = (FFFFFFFA xor FFFFFFF6) 利用之前那个TestXor()函数,写了个程序枚举A, B同为偶数时的例外情况。附件中是100以内的输出结果和源码(源代码没有整理过,随便看看吧) |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值