|
[讨论]哪位有效率比较高的密码生成算法?
如果是指定长度的,那就尽量不要用递归之类的方法,减少进栈出栈占用的时间,改用循环处理,除此外想不出有什么可以提速的地方。 |
|
|
|
[分享]密码学相关专著.
谢谢分享! |
|
|
|
[求助]哪里能找到RC4算法分析及攻击的资料?
(Not So) Random Shuffles of RC4.pdf A Class of Weak Keys in the RC4 Stream Cipher.pdf A Practical Attack on Broadcast RC4.pdf Analysis Methods for Alleged RC4.pdf Analysis of the stream cipher RC4.pdf Attacks on the RC4 stream cipher.pdf Linear Statistical Weakness of Alleged RC4 Keystream Generator.pdf Predicting and Distinguishing Attacks on RC4 Keystream Generator.pdf Reducing the State Space of RC4 Stream Cipher.pdf Similar State Tables and Related Keys in RC4.pdf Statistical Analysis of the Alleged RC4 Keystream Generator.pdf Weaknesses in the Key Scheduling Algorithm of RC4.pdf 以上文档都可以在网上找到。 |
|
[分享]歡迎加入密碼學小組。
竟然成了核心成员,惭愧! 原来学数学的,对密码学比较感兴趣,以前都是在看雪上潜水闲逛,看看感兴趣的文章, 了解一些安全方面的内容,那天误打误撞进了R大的贴子,居然成了核心成员,真是汗颜。 我的水平和诸位相比顶多算初学者级别。最近有点忙,没什么时间逛论坛,表决的事还 是诸位定好了。 |
|
[讨论]压缩筛选法求1~N内的所有质数
[QUOTE=lingyu;633215]若只存储相邻两个素数的差值的一半即(p[k]-p[k-1])/2, 用一个字节一直表示小于304599508537的素数。[/QUOTE] 好主意,在看雪的收获真是不小,“听君一席话,胜读十年书。” 惟一的问题就是用起来有点小小的不爽,每次要经过一定的计算才能得到具体的素数, 瑕不掩瑜,一点小小的损失对于N倍的存储扩展来说还是值得的。 |
|
[求助]请问这是什么加密方式
用Base64解码后得到十六制内容如下: 17 00 00 00 cf 8e 13 15 3c cb 51 90 ff 0c f3 9f c0 2e f0 94 85 75 d4 8a fe 53 8c 76 73 ff 98 16 19 08 74 33 前面的17 00 00 00很有可能是一个指示长度的数值。 |
|
[原创]密码学入门系列(三) 之 希尔密码(古典)
常在看雪看破文的应该都知道,R大可能刚来不熟悉。 |
|
[分享]发篇ROOTKIT检测的强文,至今未读懂
严重同意,明明就是1+1=2的事,非要来上一大堆公式加引理,A=1,B=1,然后A+B=2,让你云里雾里的,真正要做的事其实两三句话就讲清楚了,好象写的越复杂才越学术化,表达的越白话,人人都能看懂就成科普,真搞不懂这种折腾有什么用,我宁愿别人告诉我1+1=2让我一听就明白,也不想听一堆废话来证明自己已经可以理解很高层次的学术研究了。理论需要成体系,需要规范化,但不是绕圈圈。 |
|
[原创]密码学入门系列(三) 之 希尔密码(古典)
不必太在意,写出来一来是对自己知识归纳表达能力的锻炼,二来还可以温故知新增加交流,只要时间允许,不妨当做一种兴趣来完成。 |
|
[讨论]压缩筛选法求1~N内的所有质数
按你的方法写了个程序,不过我没用到11,只用到5。 #include <stdio.h> #include <math.h> #define NUM 50000000 typedef unsigned char BYTE; BYTE table[NUM/30+1]; void suShu() { int i, j, k, u, x, y, z; int predict[10] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29}; int xbit[8] = {1, 7, 11, 13, 17, 19, 23, 29}; int flag[30]; int halfNum; for(i=0; i<30; i++) flag[i] = 8; for(i=0; i<8; i++) flag[xbit[i]] = i; table[0] = 1; halfNum = (int)sqrt(1.0*NUM)-29; for( j=0,k=0; k<halfNum; j++,k+=30 ) { for(i=0; i<8; i++) { if (((table[j]>>i)&1) == 0) { z = k+xbit[i]; u = z%30; y = z*z; x = y%30; for( ; y<=NUM; y+=z) { if (flag[x] < 8) table[y/30] |= (1<<flag[x]); x += u; if (x >= 30) x -= 30; } } } } halfNum += 30; for(i=0; i<8; i++) { if (((table[j]>>i)&1) == 0) { z = k+xbit[i]; if (z < halfNum) { u = z%30; y = z*z; x = y%30; for( ; y<=NUM; y+=z) { if (flag[x] < 8) table[y/30] |= (1<<flag[x]); x += u; if (x > 30) x -= 30; } } } } for( k=0; k<10; k++) printf("%10d", predict[k]); for( j=1,k=30; k<=NUM-30; j++,k+=30 ) { for(i=0; i<8; i++) { if (((table[j]>>i)&1) == 0) { printf("%10d", k+xbit[i]); } } } for(i=0; i<8; i++) { if (((table[j]>>i)&1) == 0) { if ((k+xbit[i]) <= NUM) printf("%10d", k+xbit[i]); } } printf("\n"); } int main() { suShu(); return 0; } |
|
[分享]一些密码学的资料
不谢不谢,你上缴的东西更多。 |
|
[讨论]压缩筛选法求1~N内的所有质数
你在这里的改进对你的程序整体影响已经不大了,我说的方法是对梵听版所做的优化,因为你的程序比我们的更复杂,好比我的程序走的是一条筋的直路,你的程序就好比是崎岖小路,虽然这个比喻不大贴切,就象下面两个程序: for(i=0; i<100; i++) j += i; 和 for(i=0; i<100; i++) if (i%5) j += i; else j *= i; 一样,第一个CPU的流程比较通顺,第二个就会磕磕碰碰。 |
|
[讨论]压缩筛选法求1~N内的所有质数
当时看到梵听的版本时,我只是觉得他的方法很直观,但是程序的书写上不够优化,所以在他的基础上简单的进行了改进优化,其它的都没改变。 1)即然是指定大小的空间,能不用new就不要用new了,预先分配的空间不仅节省时间也让编译时可以有目的的优化。 2)用位操作相对来说空间更少,数据不必经常换进换出,cache命中率会高一点。 3)他在扫描K以后的质数时用了乘法,我改成加法,并且从K*K开始,以前的不必再判了。 |
|
[讨论]压缩筛选法求1~N内的所有质数
不错,一个简单的技巧让空间利用率翻了3.75倍。 |
|
|
|
|
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值