V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yfgeek
V2EX  ›  程序员

如何在短时间内快速找到字符串经过 sha1 算法的前 16 位的碰撞

  •  
  •   yfgeek · 2016-10-26 09:10:52 +08:00 · 2511 次点击
    这是一个创建于 2755 天前的主题,其中的信息可能已经有所发展或是发生改变。

    问题描述

    如何在短时间内快速找到字符串经过 sha1 算法的前 16 位的碰撞

    最近的一个作业,写了一个 linux shell 。

    #!/bin/sh
    for((i=0;i<1000000000;i++));
    do
    echo -n $i | sha1sum - | cut -c1-15 >> d0
    done
    

    做运算,可是速度太慢,要跑 3 天 3 夜,于是寻找资料:

    工具

    • sha1_nearcoll_attack.zip 编译 boost 要很久很久 查找相近 sha1 碰撞工具

    https://marc-stevens.nl/p/hashclash/downloads.php

    • Malicious SHA-1 sha1 的文件碰撞生成工具

    https://malicioussha1.github.io/

    • hashclash 的 linux 64 编译后工具

    https://github.com/ohadcn/hashclash/tree/master/hashclash

    文章

    • 58 步逼近 sha1 算法

    https://cryptome.org/sha1-attacks.htm

    http://blog.rexdf.org/2014/07/hash%E6%91%98%E8%A6%81%E7%AE%97%E6%B3%95%E7%9A%84%E6%94%BB%E5%87%BB/

    大家有什么好想法吗

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2780 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 02:41 · PVG 10:41 · LAX 19:41 · JFK 22:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.