|
[建议]密钥库标准化及其应用
欢迎大家讨论。 标准密钥库是公开资源,可以放在云端,并应有自动维护的能力,供大家享用,如果你经常用到最好本机也有一份,这样工作效率更高。 标准密钥库虽然公开后不再能称为真随机数组集合,但仍然保有真随机数组的某些性质,例如元素之间没有任何关联,这是任何伪随机数组绝对没有的性质,标准密钥库中的数组稍变换一下就能恢复成为真随机数组。 应用标准密钥库能使加密更简单、快捷、安全。 内容补遗 一楼中述说了,变换密钥库中数据的两种方法都是借助于随机函数,再说一种不使用随机函数的方法,例如我们需要建造长度为N的数组,在数据库中任意点A开始依次选取长度为N的数组,在数据库中任意点B开始依次选取长度为N的数组,这两个数组不允许有交集,让这两个数组数据,依序号相互运算得出新数组。只要别人无法知道你的操作过程,那新数组就是真随机数组了。 |
|
[原创]计算机生成真随机数原理及实践
http://bbs.cisps.org/viewtopic.php?f=104&t=33556&sid=99c8a1a3e3647e5038295b7aada93ca5 再好的随机函数也只能生成伪随机序列。所以好不到哪里去。但你可以改造它们,打乱其内部规律,参见 http://bbs.pediy.com/showthread.php?t=190453 介绍的方法 |
|
[原创]计算机生成真随机数原理及实践
差多了,各轮运算方法类似只是参数不同而已,两个随机函数可以差得很多这里没有可比性。上面只是举例实际上可以用更多的随机函数,在各序列中上蹿下跳根本无法分析。想当然看问题是不行的,把地球看成一粒微尘,里面的复杂性也不会变化。 |
|
[原创]计算机生成真随机数原理及实践
如果这样可能做出的随机数组更好些,选取两个长周期性能优良的随机函数A和B,用真随机数做A的种子生成第一个随机数,用这个随机数做B的种子生成第二个随机数并作为A的种子,余此类推生成随机数组。这样数据内部的分布就比较复杂了,既不像A序列也不像B序列。 |
|
[原创]计算机生成真随机数原理及实践
可悲的是那十几项标准还是不能判断随机数组是不是真随机数组。主要是对伪随机数组的内部关联性不能判断出来。 |
|
[原创]计算机生成真随机数原理及实践
基本同意上述说法。随机程度现在还没有统一的标准,如果有方法计算数组的熵也就可以度量随机性了。如果一个数组成员基本符合均匀分布那随机性应该就不错了。 上面说的随机数组生成方法,虽然种子是真随机数,但生成的数组仍然是伪随机序列,其缺陷是内在的,少量应用或许没什么问题,大量应用能显现出其缺陷而影响你的目的,尤其是伪随机序列交叉应用时,道理很简单因为伪随机序列源于同样的生成机制,如果这样的数据在计算中相遇的时候容易出问题。 除了上面说的随机数组生成方法,随机数组是可以随意建造的,例如物理方法:你手里有一万个带顺序编号的同样的纸片,并且纸片有正反两面,抛撒下来你就有了一万位二进制数......。数学方法就更随意了,构造成员均匀分布的原始数组,用随机排序去打乱它们的秩序吧,一遍不行就多遍,最终得到分布均匀的随机序列。 |
|
[讨论]密文破解根本就不可能
穷举攻击对于长的用户密码来说毫无用处,为了增加用户密码长度,可以在加密程序中增加一些前缀或后缀的选项,可一下子让用户密码长度增加许多,或者在输入用户密码之前或之后输入单位名称、单位地址等增加长度。 甚至你可以指定一个系统文件作为用户密码的后援库随意调用其中内容为你加密所用。 |
|
[原创]计算机生成真随机数原理及实践
做过一些测试,一般函数算式等执行时间都是严格一致的。但例外的也有就像上面说的。据说有的计算机已经有专门生成随机数的芯片,但还没见到。实际上计算机的指令寄存器的数据实际是很随机的,但是无法将其读出,否则将是不错的随机数源头。 |
|
[原创]计算机生成真随机数原理及实践
随机函数再好也是源于同样的规则,生成的数据无法和真随机数比,尽管周期大的了不得,如果大量引用据说能产生一些不相干的东西使你的运算目标受到影响。 |
|
[原创]计算机生成真随机数原理及实践
不要总是指出不对,请用道理或数据打倒楼主的谬论。楼主认为真随机数无非是一些没有规律的乱码,即使理论上能找出规律,实际上很困难或找不出规律的都可以一样放心使用。 有人曾对我说投掷骰子也不能生成随机数,理由是你如果把这个骰子的所有动力学参数都搞清楚,那么骰子的运动就是必然的事情毫无随机性可言,但实际上骰子的运动状态由多种因素决定,你的测量未必能在不干扰骰子运动的条件下完成,所以根本不可能实现,即使测量实现了你也无法控制那些因素,例如投掷者的力道方向等,所有那些说道毫无意义,只是搞笑而已。 |
|
[原创]计算机生成真随机数原理及实践
上面是利用声卡驱动生成随机数的例子,方法很简单随便编个小程序就可以验证它,随机数根据考查是均匀分布的,是不是真随机数需要有人去证实,我还没有观察到反例。如果用来生成少量随机数还行,数量大了效率就太低了。 上面是利用计算机硬件来获得随机数。用纯粹计算能得到真随机数吗?我想也是可以的但程序不会太简单,可以利用模拟技术来实现仅举一例,例如模拟256个小球在矩形空间做二维刚体碰撞运动,如果初速度和运动方向都是不同的,它们将演绎出形形色色的运动状态,当运动达到相对稳定后可以从小球的坐标提取随机量... 8楼acqqer的方法也可以生成真随机数,他的方法是采用系统周期计数值作为种子,启动一个周期达到10的6000次方的随机函数取值作为输出。再优化一下是可以实用的。 |
|
[原创]计算机生成真随机数原理及实践
是不是真随机数,要拿数据来说啦,你觉得不是你可以证明它不是,例如你可估算它后面的值,如果总是说对了,那它肯定是伪随机数了。 楼上扔球的时间肯定是随机数了,但要将这些随机数直接使用是不行的,需要用数学方法将随机性提取出来才好作其它使用。 |
|
[原创]计算机生成真随机数原理及实践
谢谢8楼介绍的伪随机数算法。 |
|
|
|
|
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值