{"id":25637573,"url":"https://github.com/fyxme/crc-32-hash-collider","last_synced_at":"2025-04-14T23:06:21.417Z","repository":{"id":202287902,"uuid":"384144886","full_name":"fyxme/crc-32-hash-collider","owner":"fyxme","description":"CRC-32 collision finder","archived":false,"fork":false,"pushed_at":"2024-10-10T20:13:44.000Z","size":3,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T23:05:49.876Z","etag":null,"topics":["brute-force","bruteforce","collision","crc-32","crc32","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fyxme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-07-08T14:05:50.000Z","updated_at":"2024-10-10T20:13:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c0635a2-f82f-43d8-b400-db36a2280c91","html_url":"https://github.com/fyxme/crc-32-hash-collider","commit_stats":null,"previous_names":["fyxme/crc-32-hash-collider"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyxme%2Fcrc-32-hash-collider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyxme%2Fcrc-32-hash-collider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyxme%2Fcrc-32-hash-collider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyxme%2Fcrc-32-hash-collider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fyxme","download_url":"https://codeload.github.com/fyxme/crc-32-hash-collider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975316,"owners_count":21192209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brute-force","bruteforce","collision","crc-32","crc32","go","golang"],"created_at":"2025-02-23T01:27:47.954Z","updated_at":"2025-04-14T23:06:21.385Z","avatar_url":"https://github.com/fyxme.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CRC-32 hash collider\n\nCRC-32 collision finder\n\n[CRC-32 algorithm](https://en.wikipedia.org/wiki/Cyclic_redundancy_check#CRC-32_algorithm) outputs a 32-bit unsigned value and therefore can be easily bruteforced to find hash collisions.\n\nThis code uses the IEEE polynomial, however can be easily modified to other polynomials.\n\nWritten because I was looking for a tool to generate CRC-32 collisions during a CTF but couldn't find any at the time...\n\n*After learning more about CRC-32, I've come to realise that there are faster ways to find collisions and reverse the output value. Since CRC-32 is not a cryptographic hash function, there are mathematical ways to reverse the hash value to a valid input. For more information, see the following tool: [crc32](https://github.com/theonlypwner/crc32).*\n\n## Usage\n\nTo use this tool, simply modify the crc-32 target value and run:\n\n```bash\ngo run collide.go\n```\n\n## Example\n\nLooking to find a collision for CRC-32 value: -432570933\n\n_Note: old python versions generated signed integers and therefore allowed negative CRC-32 values_\n\n```golang\n// target CRC-32\n// \u0026 0xffffffff is to convert to uint\n// required since old python versions allowed negative values to be produced\n// hence its needed if you want to find a collision for a \"negative\" crc hash value\nconst target = -432570933 \u0026 0xffffffff\n\n// max string length\nmaxLen := 5\n```\n\nRunning it produces the following output:\n```\n$ go run collide.go\nCollision found: 4iSg@\n```\n\nWhich can be verified using `ipython`:\n```\nIn [1]: import binascii\nIn [2]: print(binascii.crc32(\"4iSg@\"))\n-432570933\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffyxme%2Fcrc-32-hash-collider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffyxme%2Fcrc-32-hash-collider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffyxme%2Fcrc-32-hash-collider/lists"}