|
[原创]用CRC编解码矩阵的概念任意制造CRC碰撞
新版本V4.03http://www.hotc51.com/HotPower_HotWC3.html 已和答案一致,并可攻击本主贴下的所有的CRC表格,并得出相应的CRC多项式, 并可自动生成CRC位域4表和C语言算法. |
|
|
|
与王育民教授邮件中揭示的一些CRC编码矩阵与CRC编解码表之间的关系
73岁高龄的王教授现在还在忘我的工作,非常感动。 与王老聊了4个多小时,从古典密码、流密码、分组密码、公开密钥密码到量子密码。 实在受益匪浅~~~ 我年轻的时候就只和大自己一辈的高工们交流,从他们那里我学到了不少知识。 以至于和同辈交流很少~~~ 现在更是喜欢和“80后”交往,有点“老小孩”的感觉。 也许是这样,我和王老竟然交流了4个多小时~~~ 他很慈祥、很近人,很学究~~~ 我们交流的共同语言很多,以至于忘了时间~~~ 主 题: Re: Re:Re:_Re:迟复 [举报垃圾邮件] 时 间: 2009年8月30日(星期日) 上午10:29 发件人: ymwang <ymwang1936@foxmail.com>添加到通讯录拒收邀请 收件人: HotPower <hotpower@126.com> 抄送人: (无) 附 件: Shannon与现代密码学.doc(172.94K) 下载附件 - 保存到网易网盘 X高工: 很高兴我们能一起愉快地交流一下午,希望将来有机会你能和我们学校的的年轻人一起合作搞些研究。这样可以发挥你的特长,能够互补双赢。 发去一份材料供你参考。 祝好! 王育民 本想上传王老的文章,可惜这里的论坛vista下不让上传。 与73岁高龄的王教授愉快交流的4个多小时 |
|
|
|
与王育民教授邮件中揭示的一些CRC编码矩阵与CRC编解码表之间的关系
今天下午与王老见面。有些想法不见面是说不清的~~~ |
|
[讨论]既然算法公开,那还有加密的必要?
他可是“嵌入式”圈内的牛人呀~~ |
|
与王育民教授邮件中揭示的一些CRC编码矩阵与CRC编解码表之间的关系
从HotWC3的框图中我们可以看到: 它的主密钥流分成了左右对称的各子密钥流,由于内核采用强制可逆的CRC算法, 故不需要王教授的“密钥流生成器”,否则与CRC核有些工作相同的且复杂而不必要的步骤。 HotWC3的各自密钥流采用不同的移位及互控走停方式,效率绝不次于传统的“密钥流生成器”。 流密码最大的安全在于流密钥流的伪随机周期尽可能长,从而达到“伪一次一密”,使密码不可破解。 公开的流密码体系很少,因为它比分组密码更安全且主要用于军事和外交及通讯。 流密码的安全基于密钥流发生器的伪随机,分组密码基于非线性置换。 HotWC3结合了流密码和分组密码的优点,在流密码引进了“可逆”的CRC算法进行“置换”。 传统的"CRC碰撞"是指不同的CRC明文会得到相同的密文即CRC校验和,而菜农通过多年对 CRC的研究扩展了"CRC碰撞"的定义,将传统的"CRC碰撞"定义为"CRC明文碰撞",并扩展了 “CRC密钥碰撞”,即不同的CRC密钥(初值、权值及方向)会得到相同的CRC密文或CRC明文和密文对。 碰撞就是多对一或单向的表现,即已知密文或明文与密文对也无法推出密钥。 碰撞的根本就是不能可逆即不能作为密码体系。 但是加密和解密方都知道密钥时,将不会产生碰撞,它是一对一的关系,即已知密钥和明文必对应 唯一的密文,反之已知密钥和密文,也必对应唯一的明文。 故:HotWC3的安全基于对密钥的保护和CRC的“任意碰撞” 最后归为“HotWC3的安全基于对密钥的保护” 所以HotWC3是一种安全的流密码体系,它巧妙地利用的碰撞的单向性使逆向无法实现。 碰撞也间接地逼迫逆向者只能穷举一条路。 HotWC3的子密钥流长短不一,主要是对付中间攻击,即选择某一明文密文对进行穷举。 HotWC3中间攻击需要80位密钥长度,而主密钥总长大于80位,故必产生“碰撞”。 所以中间攻击对HotWC3是无效攻击。逆向者攻击长度必须大于80位,所以HotWC3是很安全的。 |
|
[原创]图解CRC编解码矩阵及解码矩阵列坐标“CRC碰撞”
请问你的流程图+一些文字注解是用什么画的? Visio的“文本工具”。 本想上传这个框图的源文件HotWC3.vsd,可惜本论坛在vista下不允许 |
|
[原创]图解CRC编解码矩阵及解码矩阵列坐标“CRC碰撞”
CRC编码矩阵与CRC编码表之间的关系如下:(其中:初值为上次的密文) 密文=CRC编码矩阵[初值,明文]=CRC编码矩阵[上次的密文,明文] 密文=CRC编码矩阵[0, 初值 xor 明文]=CRC编码表[初值 xor 明文] 密文=CRC编码矩阵[0, 上次的密文 xor 明文]=CRC编码表[上次的密文 xor 明文] 明文=CRC解码矩阵[初值,密文] = CRC解码矩阵[上次的密文,密文] 明文=初值 xor CRC解码矩阵[0, 密文] = 初值 xor CRC解码表[密文] 目前教科书和网上流传的CRC查表法可归纳为:(注一般为左移CRCN) 密文=CRC编码表[((初值 >> (N-k)) ^ 明文) & (2 ** k - 1)] ^ (初值 << k) 其中N为CRCN,即CRC4,CRC8,CRC16,....k=4,8,16,... **表示乘方运算 ^表示异或运算 >> <<表示移位 N >= 4,一般取N>=16,k=8,即256个数据一个CRC表。 |
|
|
|
[原创]用CRC编解码矩阵的概念任意制造CRC碰撞
理论上的md5破解没有太大意义 它不过是穷举次数低于MD5宣称的密钥长度即穷举次数。 由于现在的密钥长度都很长,即使少几位实际应用还是无法破解。 我研究CRC碰撞就是研究如何破解,如何防止被破解。 菜农论证HotWC3的安全已全部结束,结论是只有穷举一条路。 菜农改造了CRC,使它从数学界称之为“单向散列”变为“陷门单向散列”。 并为此找到了CRC的“可逆条件”,并以此发现了“CRC编解码矩阵”, 把CRC碰撞“升华”到任意碰撞,并加入了更高层次的“CRC密钥碰撞”。 菜农不是数学家,无法像数学家那样论证新加入的“性质”,但我用程序 跑通并得到证实。 新版的HotWC3演算器http://www.hotc51.com/HotPower_HotWC3.html内加入了 CRC碰撞表。(在CRC4下点击“CRC表”) 下面给出几个CRC4贴图,可以看出用所有的攻击手段都无法破解CRC密码。 已知任意明文和密文对或密文和明文对都会有16组CRC4密钥(初值、权、方向) 已知明文或密文将要面对256组CRC4密钥(初值、权、方向) 从图中可以看到(权值下有2行数字,上面1行被可逆条件屏蔽了): 永远找不到权值0,2,4,6这4个数,因为它被压缩掉了。故必须穷举。 这里主要以最小的CRC4举例,大位数的CRC密码肯定要破解难度大的多。 |
|
|
|
[原创]用CRC编解码矩阵的概念任意制造CRC碰撞
估计攻击失败的应该都是右移CRC 例如右移CRC8: 多项式=X8+X5+X4+1 (符合1-Wire总线协议) 这是1-Wire总线协议的缔造者Dallas/Maxim给出多项式 且权=0x18. 网上可以找到权=0x31,0x8c,0x98这三种。http://blog.ednchina.com/hotpower/220371/message.aspx 0x18的算法是先记忆最低位,直接XOR 0x18,再右移。 0x8c的算法是先记忆最低位,再右移,然后XOR 0x8c。 但是表达式自动计算就很难受,因为0x8c被解释为:X8+X4+X3+1,和X8+X5+X4+1有1位的差距。 结果一样,可能叫法有出入,在03年的CRC演算器就采用了0x18 后来发现CRC编解码矩阵后决定采用0x8c. 因为在0x18时,明文0x80对应的密文=0x8c.而它应该是新规则中被攻击为合法的权值。 为统一权的攻击法则: 左移时攻击明文0x01得到的密文即为权值。 右移时攻击明文0x80得到的密文即为权值。 显然0x18已不符合时代的要求,而且左右移CRC程序框架上也不太相似。 故新的CRC右移算法采用:先记忆最低位,再右移,然后XOR 0x8c。 而且规定若要满足可逆条件,右移CRC权的最高位恒为1.这样左右移CRC运算程序架构师一样的。 原来正运算中,XOR的是初值,由于初值和明文可以交换,现算法可以改为XOR明文, 这样正运算和逆运算的XOR的分别是明文和密文,非常对称。 对CRC64权的攻击结果中发现它的CRC表是权为0x01b0000000000000生成的表。 必须去掉可逆选项,此时明文从0~0xff全部正确,但超过0x100后全部出错。 显然0x01b0000000000000不满足CRC可逆的规定,强行可逆和CRC表不同。 更奇怪的是CRC表是左移生成的不可逆表,查表程序却是右移的算法,很是晕!!! 故攻击此CRC64必定失败。 若要兼容此算法,不采用查表,则在0~0xFF采用不可逆左移,其他采用可逆的右移。晕。 菜农做的CRC演算器主要是为CRC密码及CRC碰撞设计的,所有的权必须要满足可逆的要求。 故有些不可逆即单向散列的CRC菜农不会去支持。 因为HotWC3密码的核将随意地选用这些具有可能关系的CRC,这样才能实现加密和解密。 不可逆就无法做成密码体系。 |
|
[原创]用CRC编解码矩阵的概念任意制造CRC碰撞
利用CRC权攻击特性对fsum frontend-1.5.5.1软件的CRC攻击结果: http://www.google.cn/search?hl=zh-CN&newwindow=1&q=fsum+frontend-1.5.5.1&aq=f&oq= 虽然http://fsumfe.sourceforge.net/index.php有java源代码 这里主要是论述如何攻击特定CRC算法的权值。(假设什么都不公开,只告诉是一种CRC算法) “权的攻击法则”: 左移时攻击明文为1得到的密文即为权值。 右移时攻击明文为2^(N-1)得到的密文即为权值。 CRC8:(成功) 初值=00 权值=XX 入值=XX 出值=XX 方向=X 输入=01 输出=07 预测攻击结果:左移CRC8,入值=00 出值=00 权值=07(X8=X,X0=1可逆) 最终确认 输入=80 输出=89 预测攻击结果:右移CRC8,入值=00 出值=00 权值=89(X8=1可逆,X0=X) 攻击失败 CRC8成功确认: 初值=00 权值=07 入值=00 出值=00 方向=左移 CRC16:(失败) 初值=0000 权值=XXXX 入值=XXXX 出值=XXXX 方向=X 输入=0001 输出=C0C1 预测攻击结果:左移CRC16,入值=0000 出值=0000 权值=C0C1(X16=X,X0=1可逆) 攻击失败 输入=8000 输出=C061 预测攻击结果:右移CRC16,入值=0000 出值=0000 权值=C061(X16=1可逆,X0=X) 攻击失败 输入=FFFE 输出=70C0 预测攻击结果:左移CRC16,入值=FFFF 出值=FFFF 权值=8F3F(X16=X,X0=1可逆) 攻击失败 输入=7FFF 输出=7060 预测攻击结果:右移CRC16,入值=FFFF 出值=FFFF 权值=8F9F(X16=1可逆,X0=X) 攻击失败 CRC16失败确认: 初值=0000 权值=XXXX 入值=XXXX 出值=XXXX 方向=X CRC16_ccitt:(成功) 初值=0000 权值=XXXX 入值=XXXX 出值=XXXX 方向=X 输入=0001 输出=0D2E 预测攻击结果:左移CRC16,入值=0000 出值=0000 权值=0D2E(X16=X,X0=1可逆) 攻击失败 输入=8000 输出=0697 预测攻击结果:右移CRC16,入值=0000 出值=0000 权值=0697(X16=0单向,X0=X) 放弃攻击 输入=FFFE 输出=1021 预测攻击结果:左移CRC16,入值=FFFF 出值=0000 权值=1021(X16=X,X0=1可逆) 最终确认 输入=7FFF 输出=1B98 预测攻击结果:右移CRC16,入值=FFFF 出值=0000 权值=1B98(X16=0单向,X0=X) 放弃攻击 CRC16_ccitt成功确认: 初值=0000 权值=1021 入值=FFFF 出值=0000 方向=左移 CRC16_zmodem:(成功) 初值=0000 权值=XXXX 入值=XXXX 出值=XXXX 方向=X 输入=0001 输出=1021 预测攻击结果:左移CRC16,入值=0000 出值=0000 权值=1021(X16=X,X0=1可逆) 最终确认 输入=8000 输出=1B98 预测攻击结果:右移CRC16,入值=0000 出值=0000 权值=1B98(X16=0单向,X0=X) 放弃攻击 CRC16_zmodem成功确认: 初值=0000 权值=1021 入值=0000 出值=0000 方向=左移 CRC16_xmodem:(失败) 初值=0000 权值=XXXX 入值=XXXX 出值=XXXX 方向=X 输入=0001 输出=17CE 预测攻击结果:左移CRC16,入值=0000 出值=0000 权值=17CE(X16=X,X0=0单向) 放弃攻击 输入=8000 输出=0BE7 预测攻击结果:右移CRC16,入值=0000 出值=0000 权值=0BE7(X16=0单向,X0=X) 放弃攻击 输入=0001 输出=17CE 预测攻击结果:左移CRC16,入值=0000 出值=FFFF 权值=E831(X16=X,X0=1可逆) 攻击失败 输入=8000 输出=0BE7 预测攻击结果:右移CRC16,入值=0000 出值=FFFF 权值=F418(X16=1单向,X0=X) 攻击失败 输入=FFFE 输出=0AC7 预测攻击结果:左移CRC16,入值=FFFF 出值=0000 权值=0AC7(X16=X,X0=1可逆) 攻击失败 输入=7FFF 输出=16EE 预测攻击结果:右移CRC16,入值=FFFF 出值=0000 权值=16EE(X16=0单向,X0=X) 放弃攻击 输入=FFFE 输出=0AC7 预测攻击结果:左移CRC16,入值=FFFF 出值=FFFF 权值=F538(X16=X,X0=0单向) 放弃攻击 输入=7FFF 输出=16EE 预测攻击结果:右移CRC16,入值=FFFF 出值=FFFF 权值=E911(X16=1可逆,X0=X) 攻击失败 CRC16_xmodem失败确认: 初值=0000 权值=XXXX 入值=XXXX 出值=XXXX 方向=X CRC16_ibm:(成功) 初值=0000 权值=XXXX 入值=XXXX 出值=XXXX 方向=X 输入=0001 输出=8005 预测攻击结果:左移CRC16,入值=0000 出值=0000 权值=8005(X16=X,X0=1可逆) 最终确认 输入=8000 输出=8009 预测攻击结果:右移CRC16,入值=0000 出值=0000 权值=8009(X16=1可逆,X0=X) 攻击失败 CRC16_ibm成功确认: 初值=0000 权值=8005 入值=0000 出值=0000 方向=左移 CRC16_x25:(失败) 初值=0000 权值=XXXX 入值=XXXX 出值=XXXX 方向=X 输入=0001 输出=1ECE 预测攻击结果:左移CRC16,入值=0000 出值=0000 权值=1ECE(X16=X,X0=0单向) 放弃攻击 输入=8000 输出=838B 预测攻击结果:右移CRC16,入值=0000 出值=0000 权值=838B(X16=1可逆,X0=X) 攻击失败 输入=FFFE 输出=EE76 预测攻击结果:左移CRC16,入值=FFFF 出值=0000 权值=1189(X16=X,X0=1可逆) 攻击失败 输入=7FFF 输出=7333 预测攻击结果:右移CRC16,入值=FFFF 出值=0000 权值=8CCC(X16=1可逆,X0=X) 攻击失败 CRC16_x25失败确认: 初值=0000 权值=XXXX 入值=XXXX 出值=XXXX 方向=X CRC24:(失败) 初值=000000 权值=XXXXXX 入值=XXXXXX 出值=XXXXXX 方向=X 输入=000001 输出=A3A3D9 预测攻击结果:左移CRC24,入值=000000 出值=000000 权值=A3A3D9(X24=X,X0=1 可逆) 攻击失败 输入=800000 输出=3EEB8B 预测攻击结果:右移CRC24,入值=000000 出值=000000 权值=3EEB8B(X24=0,X0=X 单向) 放弃攻击 输入=FFFFFE 输出=4E5B17 预测攻击结果:左移CRC24,入值=FFFFFF 出值=FFFFFF 权值=A3A3D9(X24=X,X0=1 可逆) 攻击失败 输入=7FFFFF 输出=D31345 预测攻击结果:右移CRC24,入值=FFFFFF 出值=FFFFFF 权值=3EEB8B(X24=0,X0=X 单向) 放弃攻击 CRC24失败确认: 初值=0000 权值=8005 入值=0000 出值=0000 方向=左移 CRC64_ecma:(成功) 初值=0000000000000000 权值=XXXXXXXXXXXXXXXX 入值=XXXXXXXXXXXXXXXX 出值=XXXXXXXXXXXXXXXX 方向=X 输入=0000000000000001 输出=41A3A0A90F2460FE 预测攻击结果:左移CRC64,入值=0000000000000000 出值=0000000000000000 权值=01B0000000000000(X64=X,X0=0 单向) 放弃攻击 输入=8000000000000000 输出=01A9A0A153672B36 预测攻击结果:右移CRC64,入值=0000000000000000 出值=0000000000000000 权值=00000000000000D8(X64=0单向,X0=X) 放弃攻击 输入=FFFFFFFFFFFFFFFE 输出=BD0F1E145615C96C 预测攻击结果:左移CRC64,入值=FFFFFFFFFFFFFFFF 出值=FFFFFFFFFFFFFFFF 权值=42F0E1EBA9EA3693(X64=X,X0=1 可逆) 最终确认 输入=7FFFFFFFFFFFFFFF 输出=FD051E1C0A5682A4 预测攻击结果:右移CRC64,入值=FFFFFFFFFFFFFFFF 出值=FFFFFFFFFFFFFFFF 权值=02FAE1E3F5A97D5B(X64=0单向,X0=X) 放弃攻击 CRC64_ecma成功确认: 初值=0000000000000000 权值=42F0E1EBA9EA3693 入值=FFFFFFFFFFFFFFFF 出值=FFFFFFFFFFFFFFFF 方向=左移 CRC64:(失败) 初值=0000000000000000 权值=XXXXXXXXXXXXXXXX 入值=XXXXXXXXXXXXXXXX 出值=XXXXXXXXXXXXXXXX 方向=X 输入=0000000000000001 输出=01B0000000000000 预测攻击结果:左移CRC64,入值=0000000000000000 出值=0000000000000000 权值=01B0000000000000 (X64=X,X0=0 单向) 放弃攻击(不可逆攻击出下表) 输入=8000000000000000 输出=00000000000000D8 预测攻击结果:右移CRC64,入值=0000000000000000 出值=0000000000000000 权值=00000000000000D8 (X64=0单向,X0=X) 放弃攻击 输入=FFFFFFFFFFFFFFFE 输出=52B0000000000000 预测攻击结果:左移CRC64,入值=FFFFFFFFFFFFFFFF 出值=FFFFFFFFFFFFFFFF 权值=AD4FFFFFFFFFFFFF (X64=X,X0=1 可逆) 攻击失败 输入=7FFFFFFFFFFFFFFF 输出=53000000000000D8 预测攻击结果:右移CRC64,入值=FFFFFFFFFFFFFFFF 出值=FFFFFFFFFFFFFFFF 权值=ACFFFFFFFFFFFF27 (X64=1可逆, X0=X) 攻击失败 CRC64失败确认: 初值=0000000000000000 权值=XXXXXXXXXXXXXXXX 入值=XXXXXXXXXXXXXXXX 出值=XXXXXXXXXXXXXXXX 方向=X 下面是对CRC64攻击出来的CRC表,它显然是不可逆的(与57楼的CRC表格完全相同): module fsumfe.digest.algo.crc64; |
|
[原创]用CRC编解码矩阵的概念任意制造CRC碰撞
Fsum Frontend 1.5.5.1在vista下不能运行。我无法找到那个CRC64的多项式。 可以对这个CRC64“攻击”4次即可得到这个crc64的多项式。 假定出入值不取反,即xor 0x00000000 1.若左移CRC64, 用0x00000001作为明文,执行得到CRC64,即为这个crc64的多项式。 2.若右移CRC64, 用0x80000000作为明文,执行得到CRC64,即为这个crc64的多项式。 假定出入值取反,即xor 0xffffffffffffffff 3.若左移CRC64, 用0xfffffffffffffffe作为明文,执行得到CRC64,取反后即为这个crc64的多项式。 4.若右移CRC64, 用0x7ffffffffffffffff作为明文,执行得到CRC64,取反后即为这个crc64的多项式。 |
|
[原创]用CRC编解码矩阵的概念任意制造CRC碰撞
57楼的CRC64 ISO3309俺做不出来。 因为CRC64 ISO3309的多项式为:X64+X4+X3+X1+X0 其中X0=1 对于CRC左移,因为要保持CRC可逆,必须最低位恒为1, 故:X64+X4+X3+X1+X0 实际为X4+X3+X1+X0 即左移不要最高位X64 权=0x000000000000001B 对于CRC右移,因为要保持CRC可逆,必须最高位恒为1, 故:X64+X4+X3+X1+X0 实际为X64+X4+X3+X1 即右移不要最低位X0 权=0x800000000000000D 菜农的权选择规则可参见:http://blog.ednchina.com/hotpower/220371/message.aspx 我用左移CRC找到一个类似的CRC表,但原算法应该是右移的。 和57楼表的差异在于低位是矩阵的列坐标号,故不知真正的权值。说实话“CRC市场很乱” |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值