资源简介
原来我总是很自信地以为:你有本事找到 MD5 的碰撞又如何?你难道还有本事让两个可执行文件的 MD5 一样,却又都能正常运行,并且可以做完全不同的事情么?
答:还真的可以.
http://www.win.tue.nl/hashclash/ ... World-colliding.exe
http://www.win.tue.nl/hashclash/ ... World-colliding.exe
这两个程序会在屏幕上打印出不同的字符,但是它们的 MD5 都是一样的。
通读其论文后摘要如下:
这几位密码学家使用的是“构造前缀碰撞法”(chosen-prefix collisions)来进行此次攻击(是王小云所使用的攻击方法的改进版本)。
他们所使用的计算机是一台 Sony PS3,且仅用了不到两天。
他们的结论:MD5 算法不应再被用于任何软件完整性检查或代码签名的用途。
另:现在,如果仅仅是想要生成 MD5 相同而内容不同的文件的话,在任何主流配置的电脑上用几秒钟就可以完成了。

代码片段和文件信息
/*
MD5 collision generator
=======================
Source code files:
block0.cpp
block1.cpp
main.cpp
main.hpp
md5.cpp
block1wang.cpp
block1stevens00.cpp
block1stevens01.cpp
block1stevens10.cpp
block1stevens11.cpp
Win32 executable:
fastcoll_v1.0.0.5.exe
Version
=======
version 1.0.0.5 April 2006.
Copyright
=========
?M. Stevens 2006. All rights reserved.
Disclaimer
==========
This software is provided as is. Use is at the user‘s risk.
No guarantee whatsoever is given on how it may function or malfunction.
Support cannot be expected.
This software is meant for scientific and educational purposes only.
It is forbidden to use it for other than scientific or educational purposes.
In particular commercial and malicious use is not allowed.
Further distribution of this software by whatever means is not allowed
without our consent.
This includes publication of source code or executables in printed form
on websites newsgroups CD-ROM‘s etc.
Changing the (source) code without our consent is not allowed.
In all versions of the source code this disclaimer the copyright
notice and the version number should be present.
*/
#include
#include
#include “main.hpp“
uint32 seed32_1 seed32_2;
void find_block0(uint32 block[] const uint32 IV[])
{
uint32 Q[68] = { IV[0] IV[3] IV[2] IV[1] };
std::vector q4mask(1<<4);
for (unsigned k = 0; k < q4mask.size(); ++k)
q4mask[k] = ((k<<2) ^ (k<<26)) & 0x38000004;
std::vector q9q10mask(1<<3);
for (unsigned k = 0; k < q9q10mask.size(); ++k)
q9q10mask[k] = ((k<<13) ^ (k<<4)) & 0x2060;
std::vector q9mask(1<<16);
for (unsigned k = 0; k < q9mask.size(); ++k)
q9mask[k] = ((k<<1) ^ (k<<2) ^ (k<<5) ^ (k<<7) ^ (k<<8) ^ (k<<10) ^ (k<<11) ^ (k<<13)) & 0x0eb94f16;
while (true)
{
Q[Qoff + 1] = xrng64();
Q[Qoff + 3] = (xrng64() & 0xfe87bc3f) | 0x017841c0;
Q[Qoff + 4] = (xrng64() & 0x44000033) | 0x000002c0 | (Q[Qoff + 3] & 0x0287bc00);
Q[Qoff + 5] = 0x41ffffc8 | (Q[Qoff + 4] & 0x04000033);
Q[Qoff + 6] = 0xb84b82d6;
Q[Qoff + 7] = (xrng64() & 0x68000084) | 0x02401b43;
Q[Qoff + 8] = (xrng64() & 0x2b8f6e04) | 0x005090d3 | (~Q[Qoff + 7] & 0x40000000);
Q[Qoff + 9] = 0x20040068 | (Q[Qoff + 8] & 0x00020000) | (~Q[Qoff + 8] & 0x40000000);
Q[Qoff + 10] = (xrng64() & 0x40000000) | 0x1040b089;
Q[Qoff + 11] = (xrng64() & 0x10408008) | 0x0fbb7f16 | (~Q[Qoff + 10] & 0x40000000);
Q[Qoff + 12] = (xrng64() & 0x1ed9df7f) | 0x00022080 | (~Q[Qoff + 11] & 0x40200000);
Q[Qoff + 13] = (xrng64() & 0x5efb4f77) | 0x20049008;
Q[Qoff + 14] = (xrng64() & 0x1fff5f77) | 0x0000a088 | (~Q[Qoff + 13] & 0x40000000);
Q[Qoff + 15] = (xrng64() & 0x5efe7ff7) | 0x80008000 | (~Q[Qoff + 14] & 0x00010000);
Q[Qoff + 16] = (xrng64() & 0x1ffdffff) | 0xa0000000 | (~Q[Qoff + 15] & 0x40020000);
MD5_REVERSE_STEP(0 0xd76aa478 7);
MD5_REVERSE_STEP(6 0xa8304613 17);
MD5
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 11877 2006-04-28 16:16 block0.cpp
文件 2512 2006-04-28 16:16 block1.cpp
文件 9813 2006-04-28 16:16 block1stevens00.cpp
文件 9716 2006-04-28 16:16 block1stevens01.cpp
文件 9846 2006-04-28 16:16 block1stevens10.cpp
文件 9898 2006-04-28 16:16 block1stevens11.cpp
文件 10316 2006-04-28 16:16 block1wang.cpp
文件 11037 2006-04-28 16:15 main.cpp
文件 2634 2006-04-28 16:16 main.hpp
文件 4818 2006-04-28 16:16 md5.cpp
- 上一篇:ini文件读取源代码
- 下一篇:c++基础封装线程、锁、定时器、原子操作等
相关资源
- 派克变换VC++源码(附文档)
- QR二维码C++源码 算法实现
- socket通讯c++源码(客户端+服务端)
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- 标准的MD5源码md5.cmd5.h使用说明文件
- 超级玛丽c++源码win32Linux平台
- 网络游戏脱机外挂(辅助)C++源码(
- 雷霆战机 c++源码
- celrityC/C++源码查看工具
- puma560的运动学正解和逆解的C++源码
- 网络调试助手C++源码(VS 2008开发)
- AES 加密 C++源码
- 哈夫曼压缩和解压c++源码
- 基于混沌算法的图像加密系统C++源码
- 学生成绩管理系统C++源码
- 网络拓扑发现算法c++源码
- MD5算法源代码(MFC)
- C++ 排课程序源代码
- Matlab中峰值计算函数findpeaks()的c
- jpeg jpg解码 C++
- 大鱼吃小鱼游戏VC++源码
- 仿QQ登陆聊天界面源码C++
- Nehe的OpenGL教程电子书(chm格式)中文
- 词法分析C++源码
- vc++ MD5算法源码
- 自制杀毒软件C++源码
- 车牌识别c++源码
- RBF神经网络C++源码
- 图书管理系统软件设计C++源码
- CEC2017测试函数C++源码、和文献介绍
评论
共有 条评论