Pinned Repositories
aes
A pure Python implementation of AES
api-v1-client-python
Blockchain Bitcoin Developer APIs - Python
awesome-gpt3
awesome-graph-explainability-papers
Papers about explainability of GNNs
bert_language_understanding
Pre-training of Deep Bidirectional Transformers for Language Understanding: pre-train TextCNN
bitcoin-abe
Abe: block browser for Bitcoin and similar currencies
bitcoinbook
Mastering Bitcoin 2nd Edition - Programming the Open Blockchain
CryptoChallenge
密码算法和密码破译挑战题
DSA
MD4-Collision
MD4 Collisions MD4 is a 128-bit cryptographic hash function, meaning it should take a work factor of roughly 2^64 to find collisions. It turns out we can do much better. The paper "Cryptanalysis of the Hash Functions MD4 and RIPEMD" by Wang et al details a cryptanalytic attack that lets us find collisions in 2^8 or less. Given a message block M, Wang outlines a strategy for finding a sister message block M', differing only in a few bits, that will collide with it. Just so long as a short set of conditions holds true for M. What sort of conditions? Simple bitwise equalities within the intermediate hash function state, e.g. a[1][6] = b[0][6]. This should be read as: "the sixth bit (zero-indexed) of a[1] (i.e. the first update to 'a') should equal the sixth bit of b[0] (i.e. the initial value of 'b')". It turns out that a lot of these conditions are trivial to enforce. To see why, take a look at the first (of three) rounds in the MD4 compression function. In this round, we iterate over each word in the message block sequentially and mix it into the state. So we can make sure all our first-round conditions hold by doing this: # calculate the new value for a[1] in the normal fashion a[1] = (a[0] + f(b[0], c[0], d[0]) + m[0]).lrot(3) # correct the erroneous bit a[1] ^= ((a[1][6] ^ b[0][6]) << 6) # use algebra to correct the first message block m[0] = a[1].rrot(3) - a[0] - f(b[0], c[0], d[0]) Simply ensuring all the first round conditions puts us well within the range to generate collisions, but we can do better by correcting some additional conditions in the second round. This is a bit trickier, as we need to take care not to stomp on any of the first-round conditions. Once you've adequately massaged M, you can simply generate M' by flipping a few bits and test for a collision. A collision is not guaranteed as we didn't ensure every condition. But hopefully we got enough that we can find a suitable (M, M') pair without too much effort. Implement Wang's attack.
HMY626's Repositories
HMY626/MD4-Collision
MD4 Collisions MD4 is a 128-bit cryptographic hash function, meaning it should take a work factor of roughly 2^64 to find collisions. It turns out we can do much better. The paper "Cryptanalysis of the Hash Functions MD4 and RIPEMD" by Wang et al details a cryptanalytic attack that lets us find collisions in 2^8 or less. Given a message block M, Wang outlines a strategy for finding a sister message block M', differing only in a few bits, that will collide with it. Just so long as a short set of conditions holds true for M. What sort of conditions? Simple bitwise equalities within the intermediate hash function state, e.g. a[1][6] = b[0][6]. This should be read as: "the sixth bit (zero-indexed) of a[1] (i.e. the first update to 'a') should equal the sixth bit of b[0] (i.e. the initial value of 'b')". It turns out that a lot of these conditions are trivial to enforce. To see why, take a look at the first (of three) rounds in the MD4 compression function. In this round, we iterate over each word in the message block sequentially and mix it into the state. So we can make sure all our first-round conditions hold by doing this: # calculate the new value for a[1] in the normal fashion a[1] = (a[0] + f(b[0], c[0], d[0]) + m[0]).lrot(3) # correct the erroneous bit a[1] ^= ((a[1][6] ^ b[0][6]) << 6) # use algebra to correct the first message block m[0] = a[1].rrot(3) - a[0] - f(b[0], c[0], d[0]) Simply ensuring all the first round conditions puts us well within the range to generate collisions, but we can do better by correcting some additional conditions in the second round. This is a bit trickier, as we need to take care not to stomp on any of the first-round conditions. Once you've adequately massaged M, you can simply generate M' by flipping a few bits and test for a collision. A collision is not guaranteed as we didn't ensure every condition. But hopefully we got enough that we can find a suitable (M, M') pair without too much effort. Implement Wang's attack.
HMY626/CryptoChallenge
密码算法和密码破译挑战题
HMY626/DSA
HMY626/api-v1-client-python
Blockchain Bitcoin Developer APIs - Python
HMY626/bert_language_understanding
Pre-training of Deep Bidirectional Transformers for Language Understanding: pre-train TextCNN
HMY626/crypto-deanonymization
De-anonymize Cryptocurrency with Spark Distributed Analysis
HMY626/FE-Summary
collect interview questions for web front-end developer.
HMY626/itchat_wechat
HMY626/Neural-Style-Transfer
A Image Style Transfer using Python writen by four cool boys.
HMY626/RSA
HMY626/XDUthesis-personal
XDUthesis 西安电子科技大学学位论文模板 Xidian University thesis template
HMY626/Algorithm_Interview_Notes-Chinese
2018/2019/校招/春招/秋招/算法/机器学习(Machine Learning)/深度学习(Deep Learning)/自然语言处理(NLP)/C/C++/Python/面试笔记
HMY626/blk_parser
A Python parser for the blk files of the Bitcoin blockchain
HMY626/Chinese_from_dongxiexidian
mirror of dongxiexidian/Chinese
HMY626/Cplex-Python-API-Sample
A sample project for demonstrating how to solve common optimization problems using Cplex Python API
HMY626/Cryptography-course-design
CUMT密码学课程设计源代码
HMY626/Entity-Search-On-Twitter
This py shows the typical entity search and data mining operatings on social topology network.
HMY626/linkedin_data_cluster
领英数据的聚类
HMY626/Mining-the-Social-Web-2nd-Edition
The official online compendium for Mining the Social Web, 2nd Edition (O'Reilly, 2013)
HMY626/oh-my-zsh
A delightful community-driven (with 1,200+ contributors) framework for managing your zsh configuration. Includes 200+ optional plugins (rails, git, OSX, hub, capistrano, brew, ant, php, python, etc), over 140 themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
HMY626/OpenVPN
SmartVPN为光宇游戏运维团队发布的一个帮助运维人员快速自动化安装OPENVPN服务的脚本,主要用于企业使用OpenVPN组网环境。
HMY626/Python_sdk
HMY626/pytorch_structure2vec
pytorch implementation of structure2vec (https://arxiv.org/abs/1603.05629)
HMY626/rusty-blockparser
Multi-threaded Bitcoin Blockchain Parser written in Rust language
HMY626/sccs32s
iterative method to find connected components in an undirected graph
HMY626/SPTAG
A distributed approximate nearest neighborhood search (ANN) library which provides a high quality vector index build, search and distributed online serving toolkits for large scale vector search scenario.
HMY626/terminal
The new Windows Terminal, and the original Windows console host -- all in the same place!
HMY626/wechat_jump_game
python 微信《跳一跳》辅助