|
|
|
|
|
[原创]计算机生成真随机数原理及实践
我可以给你一个最简单的检测随机性的方法:你用你的算法生成一个100M以上的文件,然后使用RAR或zip压缩一下,如果压缩后的文件和原文件几乎一样大,那么大致可以认为你过了随机性检测的某一项检测。 |
|
[原创]计算机生成真随机数原理及实践
“上蹿下跳”是否就“无法分析”需要实际检验。 目前世界上好的伪随机数生成算法屈指可数,你如果有好的算法,不妨使用NIST的随机性测试软件测试一下。如果各项都达标,可以让学术界鉴定。 |
|
[原创]计算机生成真随机数原理及实践
把A、B看做一个整体不就行了。事实上,目前的hash算法和对称算法,都是由很多轮运算组成,这里的每一轮运算,就相当于你说的A、B函数。 |
|
|
|
[原创]计算机生成真随机数原理及实践
NIST早就有随机数检测标准,国密现在也有了随机数检测标准。 随机数检测标准比你想象的严格的多,除了熵和卡方分布之外,还包括很多检测手段,例如:压缩性、线性秩相关性等,一般生成的随机数,要达到这个标准中规定的显著性水平,并不是一件容易事。 |
|
[原创]计算机生成真随机数原理及实践
“随机”并不是一个绝对的概念,可以检验一个串的随机性程度,但不管什么程度,都不能说这个串就是随机数。 也不是说真随机数就是随机性好,伪随机数就是随机性差,这里的真假其实是指产生随机的源头,通常“真随机”是由确定的物理随机源产生,例如芯片运算中的电流干扰;而“伪随机”通常是由确定的数值(种子)产生,是通过计算模拟产生。一般经验其实是:真随机的随机性不如伪随机。 随机数发生器通常的做法是:用真随机(物理随机源)产生种子,用伪随机(密码计算,例如DES,SHA1)产生需要的随机数。 |
|
[求助]32位无符号随机函数
fips上有随机数测试软件,去测一下,看能有几项能通过。 |
|
[讨论]关于ECC椭圆曲线加密算法的疑问
你可以仔细看看你的计算公式,你会发现:只要“C2 = rY+M,M = C2-xC1”中的加法和减法互逆、且满足结合律和交换律,正确性就与M是否在曲线上没关系。你可以根据曲线点的运算法则验证一下。 目前这种加密方式很少采用了,现在更多看到的方法是:使用rY产生与M等长伪随机序列,用该序列异或M得密文,其中r为随机生成的数,Y为公钥;通常,为了保证密文的不可篡改,还要计算rY和密文的MAC;最后,密文由三部分构成:rG,密文,MAC。这里包含rG是因为需要给解密方利用私钥计算出rY。 ECC的算法协议有多种:美国等西方国家常使用ECDSA,中国使用SM2,韩国也有自己的标准,也有其他几种行业标准。 |
|
|
|
[求助]x ^ 6 % 32 == 17 求 x ?
第3步确实可以用更简单的方法求得,不过需要用到有限群的分解方面的知识,对于模数为2^n的情况,还可以有一般化的方法。 |
|
[求助]x ^ 6 % 32 == 17 求 x ?
了解如下几点即可: 1、x显然是奇数,奇数显然与32互素,所以问题可以转化为模32的剩余类乘法群来解决; 2、(x^6)^3mod32=17 ->x^18mod32=17->x^2mod32=17->x^4mod32=1->4是x的阶; 3、搜索小于32的所有非1奇数m,若m^4mod32=1且x^2mod32!=1,记录下来,设为m1,m2,...mt,最后的解为mi+32k。 附上问题的解:7+32k,23+32k,25+32k |
|
[讨论]密码陷阱
使用密码设备时,通常几次密码输入出错,设备就被锁定,无法操作了。 |
|
[原创]欢迎破解——812加密算法
楼主的意思,算是看明白了。 其实这个做法,很久之前就有,比你这个简单: 设密钥为k,使用随机化函数将k扩散(例如SHA256(k||i),每个i可以得出一组结果,将结果拼起来即可),扩散长度和明文一样长,然后,加密(或解密)就是将扩散值与明文(或密文)异或。 这是一种很好的方法,类似于香农的所提的随机序列密码。 这个密码算法的主要问题有2点: 1、算法强度完全依赖于随机化函数; 2、只能一次一密。 当前国际上使用ECC的加解密算法时,这种做法很常见,sm2的加解密就使用了这种方法。 |
|
[原创]欢迎破解——812加密算法
"原理上就不可破解的加密方式"只有一种,就是随机序列密码,可是在现实中,不存在真正的随机数。 |
|
[原创] 尝试密码攻击(穷举攻击)及其对策
暴力攻击根本就不需要所谓的研究,理论上也并不是"只要有高强的运算能力、和大量的时间任何加密都不在话下",要考虑到地球上物质是有限的,即使你把地球上每一个原子做成一个高性能的处理器,给你一万年,使用暴力攻击也破解不了1000bit的随机序列密码。 密码分析与软件逆向也完全是两个不同的概念。软件逆向实际上是可以看见算法和算法运算过程中的数据流,甚至可以直接看见密钥,着力点在于对CPU和编译器的理解上,密码分析通常是只假设已知算法,分析算法中数据处理的关联性,找出最小的密钥集。密码分析基本上是一门纯数学,不使用计算机,也可以进行密码分析。 |
|
[原创]我的近8年工作生涯
中国绝大部分人所认识的数学,其实都是数学里的很小的一个分支:算数。 数学在编程中,其实不是一个用不用的到的问题,而是会不会用的问题。举个简单例子:要实现a和b的数据互换,一般人会借用一个缓冲区实现,懂一点技巧的,可能用a=a+b,b=a-b,a=a-b实现,更懂的人可能用a=a^b,b=a^b,a=a^b实现。发现这些技巧的,通常都是懂一点数学应用的,特别是最后一种方式,会用数学和不会用数学的人,在解释上面就会有很大差异:后者会说,使用真值表验证一下,就知道正确了,前者会说:异或运算是模2加运算,而模2加运算满足交换律和结合律,同时模2加运算中,加法和减法是同一个运算。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值