{"action":"created","comment":{"url":"https://api.github.com/repos/randombit/botan/pulls/comments/65819843","id":65819843,"diff_hunk":"@@ -1,3 +1,9 @@\n+[ChaCha(8)]","path":"src/tests/data/stream/chacha.vec","position":1,"original_position":1,"commit_id":"73999802065c7e278b637bef31e9c81ef6daae5c","original_commit_id":"73999802065c7e278b637bef31e9c81ef6daae5c","user":{"login":"randombit","id":469092,"avatar_url":"https://avatars.githubusercontent.com/u/469092?v=3","gravatar_id":"","url":"https://api.github.com/users/randombit","html_url":"https://github.com/randombit","followers_url":"https://api.github.com/users/randombit/followers","following_url":"https://api.github.com/users/randombit/following{/other_user}","gists_url":"https://api.github.com/users/randombit/gists{/gist_id}","starred_url":"https://api.github.com/users/randombit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randombit/subscriptions","organizations_url":"https://api.github.com/users/randombit/orgs","repos_url":"https://api.github.com/users/randombit/repos","events_url":"https://api.github.com/users/randombit/events{/privacy}","received_events_url":"https://api.github.com/users/randombit/received_events","type":"User","site_admin":false},"body":"Tests for the `seek` function are also needed. Add support in the tests (src/tests/test_stream.cpp) for an Seek parameter (which defaults to 0 for compatibility with existing tests), then using another implementation create ChaCha test vectors using at least Seek 1...65 and then also very large offsets.","created_at":"2016-06-05T16:00:01Z","updated_at":"2016-06-05T16:00:01Z","html_url":"https://github.com/randombit/botan/pull/497#discussion_r65819843","pull_request_url":"https://api.github.com/repos/randombit/botan/pulls/497","_links":{"self":{"href":"https://api.github.com/repos/randombit/botan/pulls/comments/65819843"},"html":{"href":"https://github.com/randombit/botan/pull/497#discussion_r65819843"},"pull_request":{"href":"https://api.github.com/repos/randombit/botan/pulls/497"}}},"pull_request":{"url":"https://api.github.com/repos/randombit/botan/pulls/497","id":71299479,"html_url":"https://github.com/randombit/botan/pull/497","diff_url":"https://github.com/randombit/botan/pull/497.diff","patch_url":"https://github.com/randombit/botan/pull/497.patch","issue_url":"https://api.github.com/repos/randombit/botan/issues/497","number":497,"state":"open","locked":false,"title":"Added some features for ChaCha","user":{"login":"SimCog","id":1662433,"avatar_url":"https://avatars.githubusercontent.com/u/1662433?v=3","gravatar_id":"","url":"https://api.github.com/users/SimCog","html_url":"https://github.com/SimCog","followers_url":"https://api.github.com/users/SimCog/followers","following_url":"https://api.github.com/users/SimCog/following{/other_user}","gists_url":"https://api.github.com/users/SimCog/gists{/gist_id}","starred_url":"https://api.github.com/users/SimCog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimCog/subscriptions","organizations_url":"https://api.github.com/users/SimCog/orgs","repos_url":"https://api.github.com/users/SimCog/repos","events_url":"https://api.github.com/users/SimCog/events{/privacy}","received_events_url":"https://api.github.com/users/SimCog/received_events","type":"User","site_admin":false},"body":"# ChaCha additional features\r\n\r\n## ChaCha20/8 8-round stream cipher\r\n\r\nAccording to [1], the designer of ChaCha20 included 3 kinds of round ciphers:\r\n- ChaCha20/20 (The original one)\r\n- ChaCha20/12 (12-round stream cipher)\r\n- ChaCha20/8 (8-round stream cipher)\r\n\r\nSince there were 20 and 12, I added 8 and test it using the original implementation of Daniel J. Bernstein for getting the ciphertext: https://cr.yp.to/chacha.html\r\n\r\n## Getter to the keystream generator\r\n\r\nAccording to [2], more accurately the chapter 6 entitled _Stream Ciphers_, it is specified in the section **Synchronous stream ciphers** a function for generating the set of keystreams used by XORing it with the plaintext for creating the ciphertext. So, I implemented the method and added a m_initial_state. Thus, it is possible to generate a specific length keystream for a specific offset into the keystream.\r\n\r\n# References\r\n\r\n1. Bernstein, Daniel J. \"ChaCha, a variant of Salsa20.\" In Workshop Record of SASC, vol. 8. 2008.\r\n2. Menezes, Alfred J., Paul C. Van Oorschot, and Scott A. Vanstone. Handbook of applied cryptography. CRC press, 1996.","created_at":"2016-05-24T21:53:54Z","updated_at":"2016-06-05T16:00:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e11481734292e8d42db426d48e4fa40d2f57fc61","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/randombit/botan/pulls/497/commits","review_comments_url":"https://api.github.com/repos/randombit/botan/pulls/497/comments","review_comment_url":"https://api.github.com/repos/randombit/botan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/randombit/botan/issues/497/comments","statuses_url":"https://api.github.com/repos/randombit/botan/statuses/73999802065c7e278b637bef31e9c81ef6daae5c","head":{"label":"SimCog:master","ref":"master","sha":"73999802065c7e278b637bef31e9c81ef6daae5c","user":{"login":"SimCog","id":1662433,"avatar_url":"https://avatars.githubusercontent.com/u/1662433?v=3","gravatar_id":"","url":"https://api.github.com/users/SimCog","html_url":"https://github.com/SimCog","followers_url":"https://api.github.com/users/SimCog/followers","following_url":"https://api.github.com/users/SimCog/following{/other_user}","gists_url":"https://api.github.com/users/SimCog/gists{/gist_id}","starred_url":"https://api.github.com/users/SimCog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimCog/subscriptions","organizations_url":"https://api.github.com/users/SimCog/orgs","repos_url":"https://api.github.com/users/SimCog/repos","events_url":"https://api.github.com/users/SimCog/events{/privacy}","received_events_url":"https://api.github.com/users/SimCog/received_events","type":"User","site_admin":false},"repo":{"id":59413367,"name":"botan","full_name":"SimCog/botan","owner":{"login":"SimCog","id":1662433,"avatar_url":"https://avatars.githubusercontent.com/u/1662433?v=3","gravatar_id":"","url":"https://api.github.com/users/SimCog","html_url":"https://github.com/SimCog","followers_url":"https://api.github.com/users/SimCog/followers","following_url":"https://api.github.com/users/SimCog/following{/other_user}","gists_url":"https://api.github.com/users/SimCog/gists{/gist_id}","starred_url":"https://api.github.com/users/SimCog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimCog/subscriptions","organizations_url":"https://api.github.com/users/SimCog/orgs","repos_url":"https://api.github.com/users/SimCog/repos","events_url":"https://api.github.com/users/SimCog/events{/privacy}","received_events_url":"https://api.github.com/users/SimCog/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SimCog/botan","description":"Crypto and TLS for C++11","fork":true,"url":"https://api.github.com/repos/SimCog/botan","forks_url":"https://api.github.com/repos/SimCog/botan/forks","keys_url":"https://api.github.com/repos/SimCog/botan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SimCog/botan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SimCog/botan/teams","hooks_url":"https://api.github.com/repos/SimCog/botan/hooks","issue_events_url":"https://api.github.com/repos/SimCog/botan/issues/events{/number}","events_url":"https://api.github.com/repos/SimCog/botan/events","assignees_url":"https://api.github.com/repos/SimCog/botan/assignees{/user}","branches_url":"https://api.github.com/repos/SimCog/botan/branches{/branch}","tags_url":"https://api.github.com/repos/SimCog/botan/tags","blobs_url":"https://api.github.com/repos/SimCog/botan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SimCog/botan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SimCog/botan/git/refs{/sha}","trees_url":"https://api.github.com/repos/SimCog/botan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SimCog/botan/statuses/{sha}","languages_url":"https://api.github.com/repos/SimCog/botan/languages","stargazers_url":"https://api.github.com/repos/SimCog/botan/stargazers","contributors_url":"https://api.github.com/repos/SimCog/botan/contributors","subscribers_url":"https://api.github.com/repos/SimCog/botan/subscribers","subscription_url":"https://api.github.com/repos/SimCog/botan/subscription","commits_url":"https://api.github.com/repos/SimCog/botan/commits{/sha}","git_commits_url":"https://api.github.com/repos/SimCog/botan/git/commits{/sha}","comments_url":"https://api.github.com/repos/SimCog/botan/comments{/number}","issue_comment_url":"https://api.github.com/repos/SimCog/botan/issues/comments{/number}","contents_url":"https://api.github.com/repos/SimCog/botan/contents/{+path}","compare_url":"https://api.github.com/repos/SimCog/botan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SimCog/botan/merges","archive_url":"https://api.github.com/repos/SimCog/botan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SimCog/botan/downloads","issues_url":"https://api.github.com/repos/SimCog/botan/issues{/number}","pulls_url":"https://api.github.com/repos/SimCog/botan/pulls{/number}","milestones_url":"https://api.github.com/repos/SimCog/botan/milestones{/number}","notifications_url":"https://api.github.com/repos/SimCog/botan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SimCog/botan/labels{/name}","releases_url":"https://api.github.com/repos/SimCog/botan/releases{/id}","deployments_url":"https://api.github.com/repos/SimCog/botan/deployments","created_at":"2016-05-22T13:18:20Z","updated_at":"2016-05-22T13:18:24Z","pushed_at":"2016-06-03T14:13:59Z","git_url":"git://github.com/SimCog/botan.git","ssh_url":"git@github.com:SimCog/botan.git","clone_url":"https://github.com/SimCog/botan.git","svn_url":"https://github.com/SimCog/botan","homepage":"http://botan.randombit.net","size":50990,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"randombit:master","ref":"master","sha":"9eda1f09887b8b1ba5d60e1e432ebf7d828726db","user":{"login":"randombit","id":469092,"avatar_url":"https://avatars.githubusercontent.com/u/469092?v=3","gravatar_id":"","url":"https://api.github.com/users/randombit","html_url":"https://github.com/randombit","followers_url":"https://api.github.com/users/randombit/followers","following_url":"https://api.github.com/users/randombit/following{/other_user}","gists_url":"https://api.github.com/users/randombit/gists{/gist_id}","starred_url":"https://api.github.com/users/randombit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randombit/subscriptions","organizations_url":"https://api.github.com/users/randombit/orgs","repos_url":"https://api.github.com/users/randombit/repos","events_url":"https://api.github.com/users/randombit/events{/privacy}","received_events_url":"https://api.github.com/users/randombit/received_events","type":"User","site_admin":false},"repo":{"id":8608254,"name":"botan","full_name":"randombit/botan","owner":{"login":"randombit","id":469092,"avatar_url":"https://avatars.githubusercontent.com/u/469092?v=3","gravatar_id":"","url":"https://api.github.com/users/randombit","html_url":"https://github.com/randombit","followers_url":"https://api.github.com/users/randombit/followers","following_url":"https://api.github.com/users/randombit/following{/other_user}","gists_url":"https://api.github.com/users/randombit/gists{/gist_id}","starred_url":"https://api.github.com/users/randombit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randombit/subscriptions","organizations_url":"https://api.github.com/users/randombit/orgs","repos_url":"https://api.github.com/users/randombit/repos","events_url":"https://api.github.com/users/randombit/events{/privacy}","received_events_url":"https://api.github.com/users/randombit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/randombit/botan","description":"Crypto and TLS for C++11","fork":false,"url":"https://api.github.com/repos/randombit/botan","forks_url":"https://api.github.com/repos/randombit/botan/forks","keys_url":"https://api.github.com/repos/randombit/botan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/randombit/botan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/randombit/botan/teams","hooks_url":"https://api.github.com/repos/randombit/botan/hooks","issue_events_url":"https://api.github.com/repos/randombit/botan/issues/events{/number}","events_url":"https://api.github.com/repos/randombit/botan/events","assignees_url":"https://api.github.com/repos/randombit/botan/assignees{/user}","branches_url":"https://api.github.com/repos/randombit/botan/branches{/branch}","tags_url":"https://api.github.com/repos/randombit/botan/tags","blobs_url":"https://api.github.com/repos/randombit/botan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/randombit/botan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/randombit/botan/git/refs{/sha}","trees_url":"https://api.github.com/repos/randombit/botan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/randombit/botan/statuses/{sha}","languages_url":"https://api.github.com/repos/randombit/botan/languages","stargazers_url":"https://api.github.com/repos/randombit/botan/stargazers","contributors_url":"https://api.github.com/repos/randombit/botan/contributors","subscribers_url":"https://api.github.com/repos/randombit/botan/subscribers","subscription_url":"https://api.github.com/repos/randombit/botan/subscription","commits_url":"https://api.github.com/repos/randombit/botan/commits{/sha}","git_commits_url":"https://api.github.com/repos/randombit/botan/git/commits{/sha}","comments_url":"https://api.github.com/repos/randombit/botan/comments{/number}","issue_comment_url":"https://api.github.com/repos/randombit/botan/issues/comments{/number}","contents_url":"https://api.github.com/repos/randombit/botan/contents/{+path}","compare_url":"https://api.github.com/repos/randombit/botan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/randombit/botan/merges","archive_url":"https://api.github.com/repos/randombit/botan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/randombit/botan/downloads","issues_url":"https://api.github.com/repos/randombit/botan/issues{/number}","pulls_url":"https://api.github.com/repos/randombit/botan/pulls{/number}","milestones_url":"https://api.github.com/repos/randombit/botan/milestones{/number}","notifications_url":"https://api.github.com/repos/randombit/botan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/randombit/botan/labels{/name}","releases_url":"https://api.github.com/repos/randombit/botan/releases{/id}","deployments_url":"https://api.github.com/repos/randombit/botan/deployments","created_at":"2013-03-06T16:51:39Z","updated_at":"2016-06-03T10:40:35Z","pushed_at":"2016-06-03T14:14:00Z","git_url":"git://github.com/randombit/botan.git","ssh_url":"git@github.com:randombit/botan.git","clone_url":"https://github.com/randombit/botan.git","svn_url":"https://github.com/randombit/botan","homepage":"http://botan.randombit.net","size":62885,"stargazers_count":279,"watchers_count":279,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":86,"mirror_url":null,"open_issues_count":66,"forks":86,"open_issues":66,"watchers":279,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/randombit/botan/pulls/497"},"html":{"href":"https://github.com/randombit/botan/pull/497"},"issue":{"href":"https://api.github.com/repos/randombit/botan/issues/497"},"comments":{"href":"https://api.github.com/repos/randombit/botan/issues/497/comments"},"review_comments":{"href":"https://api.github.com/repos/randombit/botan/pulls/497/comments"},"review_comment":{"href":"https://api.github.com/repos/randombit/botan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/randombit/botan/pulls/497/commits"},"statuses":{"href":"https://api.github.com/repos/randombit/botan/statuses/73999802065c7e278b637bef31e9c81ef6daae5c"}}}}
{"actor":{"display_login":"randombit"}}