{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/4760","repository_url":"https://api.github.com/repos/ipfs/go-ipfs","labels_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/4760/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/4760/comments","events_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/4760/events","html_url":"https://github.com/ipfs/go-ipfs/issues/4760","id":302042256,"number":4760,"title":"`ipfs dag put` generating partially colliding/matching hashes","user":{"login":"XertroV","id":1046448,"avatar_url":"https://avatars0.githubusercontent.com/u/1046448?v=4","gravatar_id":"","url":"https://api.github.com/users/XertroV","html_url":"https://github.com/XertroV","followers_url":"https://api.github.com/users/XertroV/followers","following_url":"https://api.github.com/users/XertroV/following{/other_user}","gists_url":"https://api.github.com/users/XertroV/gists{/gist_id}","starred_url":"https://api.github.com/users/XertroV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XertroV/subscriptions","organizations_url":"https://api.github.com/users/XertroV/orgs","repos_url":"https://api.github.com/users/XertroV/repos","events_url":"https://api.github.com/users/XertroV/events{/privacy}","received_events_url":"https://api.github.com/users/XertroV/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-03T23:38:47Z","updated_at":"2018-03-06T23:41:53Z","closed_at":"2018-03-06T23:41:53Z","author_association":"NONE","body":"#### Version information:\r\n\r\ngo-ipfs version: 0.4.13-\r\nRepo version: 6\r\nSystem version: amd64/darwin\r\nGolang version: go1.9.2\r\n\r\n#### Type:\r\nBug (or just my misunderstanding)\r\n\r\n#### Description:\r\n\r\nSo I don't think I've actually found a real collision or weakness (just seems so unlikely) - but here's the data anyway.\r\n\r\nI have at least 1 other file that also does this (besides the `{}` base case), FYI\r\n\r\n```bash\r\n$ echo \"{}\" | shasum -a 256\r\nca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356\r\n\r\n$ echo \"{}\" | ipfs dag put -f raw --input-enc raw --hash sha2-256\r\nzb2rhkFjaEEfsGTTeHVAGXB3qq7RzLHJojqpucfYFzoL2gB9P\r\n\r\n# for comparison\r\n$ echo \"{}\" | ipfs block put\r\nQmbx76B2S21SWTRwBAktMwSeficnbKR6v8pbEb7DZkhzwf\r\n\r\n$ node\r\n> d = s => require(\"bs58\").decode(s).toString('hex')\r\n[Function: d]\r\n> d(\"zb2rhkFjaEEfsGTTeHVAGXB3qq7RzLHJojqpucfYFzoL2gB9P\")\r\n'82c1fdecaf85bde607d66fee097164d691cb4a4e3618fe71857fc2f0a4eefec8e6a6f1c5'\r\n```\r\n\r\n### comparing hashes\r\n\r\n```\r\nobject put:  1220ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356\r\noriginal:        ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356\r\ndag put: 82c1fdecee918eeaf57f8d872bba2c96ba09040f1a2164bae9bd9bd01ed9b63e9e442356\r\n```\r\n\r\nNothing lines up except for the last **6** bytes.\r\n\r\nNeedless to say I'm a bit weirded out by this."},"comment":{"url":"https://api.github.com/repos/ipfs/go-ipfs/issues/comments/370969573","html_url":"https://github.com/ipfs/go-ipfs/issues/4760#issuecomment-370969573","issue_url":"https://api.github.com/repos/ipfs/go-ipfs/issues/4760","id":370969573,"user":{"login":"XertroV","id":1046448,"avatar_url":"https://avatars0.githubusercontent.com/u/1046448?v=4","gravatar_id":"","url":"https://api.github.com/users/XertroV","html_url":"https://github.com/XertroV","followers_url":"https://api.github.com/users/XertroV/followers","following_url":"https://api.github.com/users/XertroV/following{/other_user}","gists_url":"https://api.github.com/users/XertroV/gists{/gist_id}","starred_url":"https://api.github.com/users/XertroV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XertroV/subscriptions","organizations_url":"https://api.github.com/users/XertroV/orgs","repos_url":"https://api.github.com/users/XertroV/repos","events_url":"https://api.github.com/users/XertroV/events{/privacy}","received_events_url":"https://api.github.com/users/XertroV/received_events","type":"User","site_admin":false},"created_at":"2018-03-06T23:41:53Z","updated_at":"2018-03-06T23:41:53Z","author_association":"NONE","body":"Ahh! Neato. The more you know!"}}
{"actor":{"display_login":"XertroV"}}