{"action":"closed","issue":{"url":"https://api.github.com/repos/wultra/powerauth-crypto/issues/185","repository_url":"https://api.github.com/repos/wultra/powerauth-crypto","labels_url":"https://api.github.com/repos/wultra/powerauth-crypto/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/wultra/powerauth-crypto/issues/185/comments","events_url":"https://api.github.com/repos/wultra/powerauth-crypto/issues/185/events","html_url":"https://github.com/wultra/powerauth-crypto/issues/185","id":358645292,"node_id":"MDU6SXNzdWUzNTg2NDUyOTI=","number":185,"title":"Crypto 3.0: Hash based counter","user":{"login":"romanstrobl","id":26658588,"node_id":"MDQ6VXNlcjI2NjU4NTg4","avatar_url":"https://avatars2.githubusercontent.com/u/26658588?v=4","gravatar_id":"","url":"https://api.github.com/users/romanstrobl","html_url":"https://github.com/romanstrobl","followers_url":"https://api.github.com/users/romanstrobl/followers","following_url":"https://api.github.com/users/romanstrobl/following{/other_user}","gists_url":"https://api.github.com/users/romanstrobl/gists{/gist_id}","starred_url":"https://api.github.com/users/romanstrobl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romanstrobl/subscriptions","organizations_url":"https://api.github.com/users/romanstrobl/orgs","repos_url":"https://api.github.com/users/romanstrobl/repos","events_url":"https://api.github.com/users/romanstrobl/events{/privacy}","received_events_url":"https://api.github.com/users/romanstrobl/received_events","type":"User","site_admin":false},"labels":[{"id":282636162,"node_id":"MDU6TGFiZWwyODI2MzYxNjI=","url":"https://api.github.com/repos/wultra/powerauth-crypto/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"romanstrobl","id":26658588,"node_id":"MDQ6VXNlcjI2NjU4NTg4","avatar_url":"https://avatars2.githubusercontent.com/u/26658588?v=4","gravatar_id":"","url":"https://api.github.com/users/romanstrobl","html_url":"https://github.com/romanstrobl","followers_url":"https://api.github.com/users/romanstrobl/followers","following_url":"https://api.github.com/users/romanstrobl/following{/other_user}","gists_url":"https://api.github.com/users/romanstrobl/gists{/gist_id}","starred_url":"https://api.github.com/users/romanstrobl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romanstrobl/subscriptions","organizations_url":"https://api.github.com/users/romanstrobl/orgs","repos_url":"https://api.github.com/users/romanstrobl/repos","events_url":"https://api.github.com/users/romanstrobl/events{/privacy}","received_events_url":"https://api.github.com/users/romanstrobl/received_events","type":"User","site_admin":false},"assignees":[{"login":"romanstrobl","id":26658588,"node_id":"MDQ6VXNlcjI2NjU4NTg4","avatar_url":"https://avatars2.githubusercontent.com/u/26658588?v=4","gravatar_id":"","url":"https://api.github.com/users/romanstrobl","html_url":"https://github.com/romanstrobl","followers_url":"https://api.github.com/users/romanstrobl/followers","following_url":"https://api.github.com/users/romanstrobl/following{/other_user}","gists_url":"https://api.github.com/users/romanstrobl/gists{/gist_id}","starred_url":"https://api.github.com/users/romanstrobl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romanstrobl/subscriptions","organizations_url":"https://api.github.com/users/romanstrobl/orgs","repos_url":"https://api.github.com/users/romanstrobl/repos","events_url":"https://api.github.com/users/romanstrobl/events{/privacy}","received_events_url":"https://api.github.com/users/romanstrobl/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-09-10T14:19:48Z","updated_at":"2018-09-18T20:12:17Z","closed_at":"2018-09-18T20:12:17Z","author_association":"COLLABORATOR","body":"Implement new hash based counter as defined in specification:\r\n\r\nLet's call this new hash-based counter as `CTR_DATA`, which must be 16 bytes long. I'll use following terms in documentation:\r\n\r\n- `CTR` - current linear counter; 64 bit, big endian ordered integer.\r\n- `CTR_DATA` - new non-incremental counter; array of 16 bytes.\r\n- `CTR_DATA_next` - a next value for `CTR_DATA`\r\n\r\nProposed changes in counter related tasks:\r\n\r\n- **New activation:**\r\n  Server generates first CTR_DATA and sends it to the client during the initial keys exchange:\r\n  ```\r\n  CTR_DATA = Generator.randomBytes(16)\r\n  ```\r\n\r\n- **Calculating signature**\r\n  - In the signature calculation routine, we're just use `CTR_DATA` as it is, instead of original `CTR`.\r\n  - Server must decide which value must be used for calculation, depending on the version of the protocol.\r\n  \r\n\r\n- **Calculating next value** (equivalent to `CTR = CTR + 1`)\r\n  ```\r\n  CTR_DATA_next = ByteUtils.convert32Bto16B(Hash.sha256(CTR_DATA))\r\n  ``` \r\n \r\n- **Migrating old activation** requires two new endpoints (see separate chapter)\r\n"}}
{"actor":{"display_login":"romanstrobl"}}