{"action":"created","issue":{"url":"https://api.github.com/repos/P-H-C/phc-winner-argon2/issues/46","labels_url":"https://api.github.com/repos/P-H-C/phc-winner-argon2/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/P-H-C/phc-winner-argon2/issues/46/comments","events_url":"https://api.github.com/repos/P-H-C/phc-winner-argon2/issues/46/events","html_url":"https://github.com/P-H-C/phc-winner-argon2/issues/46","id":122849617,"number":46,"title":"spec vs reference implementation","user":{"login":"kerukuro","id":16343264,"avatar_url":"https://avatars.githubusercontent.com/u/16343264?v=3","gravatar_id":"","url":"https://api.github.com/users/kerukuro","html_url":"https://github.com/kerukuro","followers_url":"https://api.github.com/users/kerukuro/followers","following_url":"https://api.github.com/users/kerukuro/following{/other_user}","gists_url":"https://api.github.com/users/kerukuro/gists{/gist_id}","starred_url":"https://api.github.com/users/kerukuro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerukuro/subscriptions","organizations_url":"https://api.github.com/users/kerukuro/orgs","repos_url":"https://api.github.com/users/kerukuro/repos","events_url":"https://api.github.com/users/kerukuro/events{/privacy}","received_events_url":"https://api.github.com/users/kerukuro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-18T00:05:28Z","updated_at":"2015-12-21T21:19:24Z","closed_at":null,"body":"1. In section 3.2 Operation, the spec defines that the first two blocks should be set like this:\r\nB[i][0] = H'(H0||i||0), B[i][1] = H'(H0||i||1).\r\nHowever, the reference implementation initializes them like this:\r\nB[i][0] = H'(H0||0||i), B[i][1] = H'(H0||1||i).\r\n\r\n2. I can't match the description of H' function (in the same section) to the implementation. The description of H' function states that r=tao/32-1, and V[r+1] is absent if 64 divides tao. However, that can't be true because this would give us 992-byte hash when we request 1024-byte output (Tag = A1||A2||...||Ar, with V[r+1] absent, where r = 1024/32 - 1 = 31, and each A is 32 bytes). Also, when tao is less than 32, the definition results in a negative value of r."},"comment":{"url":"https://api.github.com/repos/P-H-C/phc-winner-argon2/issues/comments/166426961","html_url":"https://github.com/P-H-C/phc-winner-argon2/issues/46#issuecomment-166426961","issue_url":"https://api.github.com/repos/P-H-C/phc-winner-argon2/issues/46","id":166426961,"user":{"login":"khovratovich","id":4190130,"avatar_url":"https://avatars.githubusercontent.com/u/4190130?v=3","gravatar_id":"","url":"https://api.github.com/users/khovratovich","html_url":"https://github.com/khovratovich","followers_url":"https://api.github.com/users/khovratovich/followers","following_url":"https://api.github.com/users/khovratovich/following{/other_user}","gists_url":"https://api.github.com/users/khovratovich/gists{/gist_id}","starred_url":"https://api.github.com/users/khovratovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khovratovich/subscriptions","organizations_url":"https://api.github.com/users/khovratovich/orgs","repos_url":"https://api.github.com/users/khovratovich/repos","events_url":"https://api.github.com/users/khovratovich/events{/privacy}","received_events_url":"https://api.github.com/users/khovratovich/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T21:19:24Z","updated_at":"2015-12-21T21:19:24Z","body":"The spec is wrong, I will fix that."}}