{"action":"created","comment":{"url":"https://api.github.com/repos/tlswg/tls13-spec/pulls/comments/44363915","id":44363915,"diff_hunk":"@@ -3025,17 +2937,263 @@ processing the server's Certificate, CertificateVerify, and\n Finished. If there is a failure in processing those messages, the\n client MUST discard the ServerConfiguration.\n \n+### Authentication Messages\n+\n+As discussed in {{handshake-protocol-overview}}, TLS uses a common\n+set of messages for authentication, key confirmation, and handshake\n+integrity: Certificate, CertificateVerify, and Finished. These\n+messages are always sent as the last messages in their handshake\n+flight. The Certificate and CertificateVerify messages are only\n+sent under certain circumstances, as defined below. The Finished\n+message is always sent as part of the Authentication block.\n+\n+The computations for the Authentication messages all uniformly\n+take the following inputs:\n+\n+- The certificate and signing key to be used.\n+- A Handshake Context based on the handshake hash (see {{the-handshake-hash}}).\n+- A base key to be used to compute a MAC key.\n+\n+Based on these inputs, the messages then contain:\n+\n+Certificate\n+: The certificate to be used for authentication and any\n+supporting certificates in the chain.\n+\n+CertificateVerify\n+: A signature over Handshake Context + Certificate.\n+\n+Finished\n+: A MAC over Handshake Context + Certificate + CertificateVerify using\n+  a MAC key derived from the base key.\n+{:br}\n+\n+Because the CertificateVerify signs the Handshake Context +\n+Certificate and the Finished MACs the Handshake Context + Certificate\n++ CertificateVerify, this is mostly equivalent keeping a running hash\n+of the handshake messages (exactly so in the pure 1-RTT cases). Note,\n+however, the subsequent post-handshake authentications do not include\n+each other, just the messages through the end of the main handshake.\n+\n+The following table defines the Handshake Context and MAC Key\n+for each scenario:\n+\n+~~~~\n+Mode             Handshake Context                        Base Key\n+----             -----------------                        --------\n+0-RTT            ClientHello + ServerConfiguration        xSS\n+                             + Server Certificate\n+                             + CertificateRequest","path":"draft-ietf-tls-tls13.md","position":854,"original_position":854,"commit_id":"20435b06df5e9f7f796aaca53fcc7fcd10ee4d52","original_commit_id":"20435b06df5e9f7f796aaca53fcc7fcd10ee4d52","user":{"login":"martinthomson","id":67641,"avatar_url":"https://avatars.githubusercontent.com/u/67641?v=3","gravatar_id":"","url":"https://api.github.com/users/martinthomson","html_url":"https://github.com/martinthomson","followers_url":"https://api.github.com/users/martinthomson/followers","following_url":"https://api.github.com/users/martinthomson/following{/other_user}","gists_url":"https://api.github.com/users/martinthomson/gists{/gist_id}","starred_url":"https://api.github.com/users/martinthomson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinthomson/subscriptions","organizations_url":"https://api.github.com/users/martinthomson/orgs","repos_url":"https://api.github.com/users/martinthomson/repos","events_url":"https://api.github.com/users/martinthomson/events{/privacy}","received_events_url":"https://api.github.com/users/martinthomson/received_events","type":"User","site_admin":false},"body":"It would be easier on clients if this were `H(ClientHello) || H(CertificateRequest || ServerConfiguration) || H(ServerCertificate)` or maybe `H(ClientHello) || H(CertificateRequest) || H(ServerConfiguration) || H(ServerCertificate)` I think.  There are things from each of those messages that they need to save, but a lot of that can be reduced if you can just store a hash.","created_at":"2015-11-10T02:31:08Z","updated_at":"2015-11-10T02:31:08Z","html_url":"https://github.com/tlswg/tls13-spec/pull/342#discussion_r44363915","pull_request_url":"https://api.github.com/repos/tlswg/tls13-spec/pulls/342","_links":{"self":{"href":"https://api.github.com/repos/tlswg/tls13-spec/pulls/comments/44363915"},"html":{"href":"https://github.com/tlswg/tls13-spec/pull/342#discussion_r44363915"},"pull_request":{"href":"https://api.github.com/repos/tlswg/tls13-spec/pulls/342"}}},"pull_request":{"url":"https://api.github.com/repos/tlswg/tls13-spec/pulls/342","id":50194463,"html_url":"https://github.com/tlswg/tls13-spec/pull/342","diff_url":"https://github.com/tlswg/tls13-spec/pull/342.diff","patch_url":"https://github.com/tlswg/tls13-spec/pull/342.patch","issue_url":"https://api.github.com/repos/tlswg/tls13-spec/issues/342","number":342,"state":"open","locked":false,"title":"Issue311 295 content types","user":{"login":"ekr","id":1111457,"avatar_url":"https://avatars.githubusercontent.com/u/1111457?v=3","gravatar_id":"","url":"https://api.github.com/users/ekr","html_url":"https://github.com/ekr","followers_url":"https://api.github.com/users/ekr/followers","following_url":"https://api.github.com/users/ekr/following{/other_user}","gists_url":"https://api.github.com/users/ekr/gists{/gist_id}","starred_url":"https://api.github.com/users/ekr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekr/subscriptions","organizations_url":"https://api.github.com/users/ekr/orgs","repos_url":"https://api.github.com/users/ekr/repos","events_url":"https://api.github.com/users/ekr/events{/privacy}","received_events_url":"https://api.github.com/users/ekr/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-09T23:36:22Z","updated_at":"2015-11-10T02:31:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3e6f2b20956d3dfbc59564a6f16dab275a1e04f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tlswg/tls13-spec/pulls/342/commits","review_comments_url":"https://api.github.com/repos/tlswg/tls13-spec/pulls/342/comments","review_comment_url":"https://api.github.com/repos/tlswg/tls13-spec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tlswg/tls13-spec/issues/342/comments","statuses_url":"https://api.github.com/repos/tlswg/tls13-spec/statuses/20435b06df5e9f7f796aaca53fcc7fcd10ee4d52","head":{"label":"ekr:issue311_295_content_types","ref":"issue311_295_content_types","sha":"20435b06df5e9f7f796aaca53fcc7fcd10ee4d52","user":{"login":"ekr","id":1111457,"avatar_url":"https://avatars.githubusercontent.com/u/1111457?v=3","gravatar_id":"","url":"https://api.github.com/users/ekr","html_url":"https://github.com/ekr","followers_url":"https://api.github.com/users/ekr/followers","following_url":"https://api.github.com/users/ekr/following{/other_user}","gists_url":"https://api.github.com/users/ekr/gists{/gist_id}","starred_url":"https://api.github.com/users/ekr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekr/subscriptions","organizations_url":"https://api.github.com/users/ekr/orgs","repos_url":"https://api.github.com/users/ekr/repos","events_url":"https://api.github.com/users/ekr/events{/privacy}","received_events_url":"https://api.github.com/users/ekr/received_events","type":"User","site_admin":false},"repo":{"id":19185500,"name":"tls13-spec","full_name":"ekr/tls13-spec","owner":{"login":"ekr","id":1111457,"avatar_url":"https://avatars.githubusercontent.com/u/1111457?v=3","gravatar_id":"","url":"https://api.github.com/users/ekr","html_url":"https://github.com/ekr","followers_url":"https://api.github.com/users/ekr/followers","following_url":"https://api.github.com/users/ekr/following{/other_user}","gists_url":"https://api.github.com/users/ekr/gists{/gist_id}","starred_url":"https://api.github.com/users/ekr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekr/subscriptions","organizations_url":"https://api.github.com/users/ekr/orgs","repos_url":"https://api.github.com/users/ekr/repos","events_url":"https://api.github.com/users/ekr/events{/privacy}","received_events_url":"https://api.github.com/users/ekr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ekr/tls13-spec","description":"TLS 1.3 Specification","fork":true,"url":"https://api.github.com/repos/ekr/tls13-spec","forks_url":"https://api.github.com/repos/ekr/tls13-spec/forks","keys_url":"https://api.github.com/repos/ekr/tls13-spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ekr/tls13-spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ekr/tls13-spec/teams","hooks_url":"https://api.github.com/repos/ekr/tls13-spec/hooks","issue_events_url":"https://api.github.com/repos/ekr/tls13-spec/issues/events{/number}","events_url":"https://api.github.com/repos/ekr/tls13-spec/events","assignees_url":"https://api.github.com/repos/ekr/tls13-spec/assignees{/user}","branches_url":"https://api.github.com/repos/ekr/tls13-spec/branches{/branch}","tags_url":"https://api.github.com/repos/ekr/tls13-spec/tags","blobs_url":"https://api.github.com/repos/ekr/tls13-spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ekr/tls13-spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ekr/tls13-spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/ekr/tls13-spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ekr/tls13-spec/statuses/{sha}","languages_url":"https://api.github.com/repos/ekr/tls13-spec/languages","stargazers_url":"https://api.github.com/repos/ekr/tls13-spec/stargazers","contributors_url":"https://api.github.com/repos/ekr/tls13-spec/contributors","subscribers_url":"https://api.github.com/repos/ekr/tls13-spec/subscribers","subscription_url":"https://api.github.com/repos/ekr/tls13-spec/subscription","commits_url":"https://api.github.com/repos/ekr/tls13-spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/ekr/tls13-spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/ekr/tls13-spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/ekr/tls13-spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/ekr/tls13-spec/contents/{+path}","compare_url":"https://api.github.com/repos/ekr/tls13-spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ekr/tls13-spec/merges","archive_url":"https://api.github.com/repos/ekr/tls13-spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ekr/tls13-spec/downloads","issues_url":"https://api.github.com/repos/ekr/tls13-spec/issues{/number}","pulls_url":"https://api.github.com/repos/ekr/tls13-spec/pulls{/number}","milestones_url":"https://api.github.com/repos/ekr/tls13-spec/milestones{/number}","notifications_url":"https://api.github.com/repos/ekr/tls13-spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ekr/tls13-spec/labels{/name}","releases_url":"https://api.github.com/repos/ekr/tls13-spec/releases{/id}","created_at":"2014-04-26T18:47:51Z","updated_at":"2014-07-07T21:30:20Z","pushed_at":"2015-11-10T00:34:31Z","git_url":"git://github.com/ekr/tls13-spec.git","ssh_url":"git@github.com:ekr/tls13-spec.git","clone_url":"https://github.com/ekr/tls13-spec.git","svn_url":"https://github.com/ekr/tls13-spec","homepage":null,"size":2720,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"tlswg:master","ref":"master","sha":"be016fd35830872f228f7843440f591d5e5a4669","user":{"login":"tlswg","id":6699659,"avatar_url":"https://avatars.githubusercontent.com/u/6699659?v=3","gravatar_id":"","url":"https://api.github.com/users/tlswg","html_url":"https://github.com/tlswg","followers_url":"https://api.github.com/users/tlswg/followers","following_url":"https://api.github.com/users/tlswg/following{/other_user}","gists_url":"https://api.github.com/users/tlswg/gists{/gist_id}","starred_url":"https://api.github.com/users/tlswg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlswg/subscriptions","organizations_url":"https://api.github.com/users/tlswg/orgs","repos_url":"https://api.github.com/users/tlswg/repos","events_url":"https://api.github.com/users/tlswg/events{/privacy}","received_events_url":"https://api.github.com/users/tlswg/received_events","type":"Organization","site_admin":false},"repo":{"id":18887842,"name":"tls13-spec","full_name":"tlswg/tls13-spec","owner":{"login":"tlswg","id":6699659,"avatar_url":"https://avatars.githubusercontent.com/u/6699659?v=3","gravatar_id":"","url":"https://api.github.com/users/tlswg","html_url":"https://github.com/tlswg","followers_url":"https://api.github.com/users/tlswg/followers","following_url":"https://api.github.com/users/tlswg/following{/other_user}","gists_url":"https://api.github.com/users/tlswg/gists{/gist_id}","starred_url":"https://api.github.com/users/tlswg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlswg/subscriptions","organizations_url":"https://api.github.com/users/tlswg/orgs","repos_url":"https://api.github.com/users/tlswg/repos","events_url":"https://api.github.com/users/tlswg/events{/privacy}","received_events_url":"https://api.github.com/users/tlswg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tlswg/tls13-spec","description":"TLS 1.3 Specification","fork":false,"url":"https://api.github.com/repos/tlswg/tls13-spec","forks_url":"https://api.github.com/repos/tlswg/tls13-spec/forks","keys_url":"https://api.github.com/repos/tlswg/tls13-spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tlswg/tls13-spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tlswg/tls13-spec/teams","hooks_url":"https://api.github.com/repos/tlswg/tls13-spec/hooks","issue_events_url":"https://api.github.com/repos/tlswg/tls13-spec/issues/events{/number}","events_url":"https://api.github.com/repos/tlswg/tls13-spec/events","assignees_url":"https://api.github.com/repos/tlswg/tls13-spec/assignees{/user}","branches_url":"https://api.github.com/repos/tlswg/tls13-spec/branches{/branch}","tags_url":"https://api.github.com/repos/tlswg/tls13-spec/tags","blobs_url":"https://api.github.com/repos/tlswg/tls13-spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tlswg/tls13-spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tlswg/tls13-spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/tlswg/tls13-spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tlswg/tls13-spec/statuses/{sha}","languages_url":"https://api.github.com/repos/tlswg/tls13-spec/languages","stargazers_url":"https://api.github.com/repos/tlswg/tls13-spec/stargazers","contributors_url":"https://api.github.com/repos/tlswg/tls13-spec/contributors","subscribers_url":"https://api.github.com/repos/tlswg/tls13-spec/subscribers","subscription_url":"https://api.github.com/repos/tlswg/tls13-spec/subscription","commits_url":"https://api.github.com/repos/tlswg/tls13-spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/tlswg/tls13-spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/tlswg/tls13-spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/tlswg/tls13-spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/tlswg/tls13-spec/contents/{+path}","compare_url":"https://api.github.com/repos/tlswg/tls13-spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tlswg/tls13-spec/merges","archive_url":"https://api.github.com/repos/tlswg/tls13-spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tlswg/tls13-spec/downloads","issues_url":"https://api.github.com/repos/tlswg/tls13-spec/issues{/number}","pulls_url":"https://api.github.com/repos/tlswg/tls13-spec/pulls{/number}","milestones_url":"https://api.github.com/repos/tlswg/tls13-spec/milestones{/number}","notifications_url":"https://api.github.com/repos/tlswg/tls13-spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tlswg/tls13-spec/labels{/name}","releases_url":"https://api.github.com/repos/tlswg/tls13-spec/releases{/id}","created_at":"2014-04-17T17:52:32Z","updated_at":"2015-11-08T15:07:43Z","pushed_at":"2015-11-10T01:27:07Z","git_url":"git://github.com/tlswg/tls13-spec.git","ssh_url":"git@github.com:tlswg/tls13-spec.git","clone_url":"https://github.com/tlswg/tls13-spec.git","svn_url":"https://github.com/tlswg/tls13-spec","homepage":null,"size":4517,"stargazers_count":91,"watchers_count":91,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":38,"mirror_url":null,"open_issues_count":44,"forks":38,"open_issues":44,"watchers":91,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tlswg/tls13-spec/pulls/342"},"html":{"href":"https://github.com/tlswg/tls13-spec/pull/342"},"issue":{"href":"https://api.github.com/repos/tlswg/tls13-spec/issues/342"},"comments":{"href":"https://api.github.com/repos/tlswg/tls13-spec/issues/342/comments"},"review_comments":{"href":"https://api.github.com/repos/tlswg/tls13-spec/pulls/342/comments"},"review_comment":{"href":"https://api.github.com/repos/tlswg/tls13-spec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tlswg/tls13-spec/pulls/342/commits"},"statuses":{"href":"https://api.github.com/repos/tlswg/tls13-spec/statuses/20435b06df5e9f7f796aaca53fcc7fcd10ee4d52"}}}}