payload: {"action":"created","comment":{"url":"https://api.github.com/repos/RustCrypto/traits/pulls/comments/311748207","pull_request_review_id":272210422,"id":311748207,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMxMTc0ODIwNw==","diff_hunk":"@@ -66,64 +60,48 @@ pub trait Aead {\n /// scheme. This is the standard RFC algorithm.\n pub trait StatelessAead {\n     /// The key size in a new method.\n-    type KeyLength: ArrayLength<u8> + Unsigned;\n-    /// The maximum length a plaintext can be.\n-    type PlaintextMax: ArrayLength<u8> + Unsigned;\n-    /// The maximum length a ciphertext can be.\n-    type CiphertextMax: ArrayLength<u8> + Unsigned;\n-    /// The maximum length of the associated data.\n-    type AssociatedDataMax: ArrayLength<u8> + Unsigned;\n-    /// The minimum length of the nonce.\n-    type NonceMin: ArrayLength<u8> + Unsigned;\n+    type KeySize: ArrayLength<u8> + Unsigned;\n+    /// The length of a nonce.\n+    type NonceSize: ArrayLength<u8> + Unsigned;\n     /// The maximum length of the nonce.\n-    type NonceMax: ArrayLength<u8> + Unsigned;\n-\n-    /// An actual type indicating the nonce\n-    type Nonce;\n-\n-    /// Retrieve the size of the buffer required for plaintext of a given size.\n-    fn ciphertext_len(plaintext_used: usize) -> usize;\n+    type TagSize: ArrayLength<u8> + Unsigned;\n+    /// The amount of suffix padding, in bytes, which needs to be\n+    /// appended to a plaintext to accomodate this cipher's output.\n+    type CiphertextOverhead: ArrayLength<u8> + Unsigned;\n \n     /// Encrypts the given plaintext into a new ciphertext object and the nonce\n     fn encrypt<'in_out, AdItem: AsRef<[u8]>, AdIter: Iterator<Item = AdItem>>(\n-        key: &GenericArray<u8, Self::KeyLength>,\n+        key: &GenericArray<u8, Self::KeySize>,\n         additional_data: AdIter,","path":"aead/src/lib.rs","position":75,"original_position":102,"commit_id":"ee8a730b3f5b0fc1fa39aef54cc5a65090c34f8d","original_commit_id":"9370d14ca477ddbf057708d2927d29dac368bd49","user":{"login":"tarcieri","id":797,"node_id":"MDQ6VXNlcjc5Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/797?v=4","gravatar_id":"","url":"https://api.github.com/users/tarcieri","html_url":"https://github.com/tarcieri","followers_url":"https://api.github.com/users/tarcieri/followers","following_url":"https://api.github.com/users/tarcieri/following{/other_user}","gists_url":"https://api.github.com/users/tarcieri/gists{/gist_id}","starred_url":"https://api.github.com/users/tarcieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarcieri/subscriptions","organizations_url":"https://api.github.com/users/tarcieri/orgs","repos_url":"https://api.github.com/users/tarcieri/repos","events_url":"https://api.github.com/users/tarcieri/events{/privacy}","received_events_url":"https://api.github.com/users/tarcieri/received_events","type":"User","site_admin":false},"body":"I'd suggest using `impl AsRef<[u8]>` here, rather than generic parameters or an iterator.\r\n\r\nI can't think of any constructions that take a vector of associated data besides S2V-based constructions like AES-SIV, and regardless, I think it's needless complexity in a standard AEAD API.","created_at":"2019-08-07T20:27:21Z","updated_at":"2019-08-07T20:27:21Z","html_url":"https://github.com/RustCrypto/traits/pull/40#discussion_r311748207","pull_request_url":"https://api.github.com/repos/RustCrypto/traits/pulls/40","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/RustCrypto/traits/pulls/comments/311748207"},"html":{"href":"https://github.com/RustCrypto/traits/pull/40#discussion_r311748207"},"pull_request":{"href":"https://api.github.com/repos/RustCrypto/traits/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/RustCrypto/traits/pulls/40","id":301704147,"node_id":"MDExOlB1bGxSZXF1ZXN0MzAxNzA0MTQ3","html_url":"https://github.com/RustCrypto/traits/pull/40","diff_url":"https://github.com/RustCrypto/traits/pull/40.diff","patch_url":"https://github.com/RustCrypto/traits/pull/40.patch","issue_url":"https://api.github.com/repos/RustCrypto/traits/issues/40","number":40,"state":"open","locked":false,"title":"AEAD Trait","user":{"login":"jcape","id":35878,"node_id":"MDQ6VXNlcjM1ODc4","avatar_url":"https://avatars1.githubusercontent.com/u/35878?v=4","gravatar_id":"","url":"https://api.github.com/users/jcape","html_url":"https://github.com/jcape","followers_url":"https://api.github.com/users/jcape/followers","following_url":"https://api.github.com/users/jcape/following{/other_user}","gists_url":"https://api.github.com/users/jcape/gists{/gist_id}","starred_url":"https://api.github.com/users/jcape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcape/subscriptions","organizations_url":"https://api.github.com/users/jcape/orgs","repos_url":"https://api.github.com/users/jcape/repos","events_url":"https://api.github.com/users/jcape/events{/privacy}","received_events_url":"https://api.github.com/users/jcape/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nI've previously spoken with @newpavlov via e-mail, and he asked me to create this PR and made some cursory comments on the original, internal-to-MobileCoin, source code for this crate. I've attempted to address the comments and clarify the Nonce object's purpose. My goal here is to get this interface into widespread usage, so I'm amenable to changing whatever needs to be changed to make that a reality.\r\n\r\nThe crate itself is intended to provide a misuse-resistant, rust-ish way to use RFC5116 AEAD ciphers.","created_at":"2019-07-26T22:34:26Z","updated_at":"2019-08-07T20:27:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2d7cdbc3cdb527da2c038976b4786379d18bab7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RustCrypto/traits/pulls/40/commits","review_comments_url":"https://api.github.com/repos/RustCrypto/traits/pulls/40/comments","review_comment_url":"https://api.github.com/repos/RustCrypto/traits/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RustCrypto/traits/issues/40/comments","statuses_url":"https://api.github.com/repos/RustCrypto/traits/statuses/ee8a730b3f5b0fc1fa39aef54cc5a65090c34f8d","head":{"label":"mobilecoinofficial:master","ref":"master","sha":"ee8a730b3f5b0fc1fa39aef54cc5a65090c34f8d","user":{"login":"mobilecoinofficial","id":39175003,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTc1MDAz","avatar_url":"https://avatars2.githubusercontent.com/u/39175003?v=4","gravatar_id":"","url":"https://api.github.com/users/mobilecoinofficial","html_url":"https://github.com/mobilecoinofficial","followers_url":"https://api.github.com/users/mobilecoinofficial/followers","following_url":"https://api.github.com/users/mobilecoinofficial/following{/other_user}","gists_url":"https://api.github.com/users/mobilecoinofficial/gists{/gist_id}","starred_url":"https://api.github.com/users/mobilecoinofficial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobilecoinofficial/subscriptions","organizations_url":"https://api.github.com/users/mobilecoinofficial/orgs","repos_url":"https://api.github.com/users/mobilecoinofficial/repos","events_url":"https://api.github.com/users/mobilecoinofficial/events{/privacy}","received_events_url":"https://api.github.com/users/mobilecoinofficial/received_events","type":"Organization","site_admin":false},"repo":{"id":199086359,"node_id":"MDEwOlJlcG9zaXRvcnkxOTkwODYzNTk=","name":"traits","full_name":"mobilecoinofficial/traits","private":false,"owner":{"login":"mobilecoinofficial","id":39175003,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MTc1MDAz","avatar_url":"https://avatars2.githubusercontent.com/u/39175003?v=4","gravatar_id":"","url":"https://api.github.com/users/mobilecoinofficial","html_url":"https://github.com/mobilecoinofficial","followers_url":"https://api.github.com/users/mobilecoinofficial/followers","following_url":"https://api.github.com/users/mobilecoinofficial/following{/other_user}","gists_url":"https://api.github.com/users/mobilecoinofficial/gists{/gist_id}","starred_url":"https://api.github.com/users/mobilecoinofficial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobilecoinofficial/subscriptions","organizations_url":"https://api.github.com/users/mobilecoinofficial/orgs","repos_url":"https://api.github.com/users/mobilecoinofficial/repos","events_url":"https://api.github.com/users/mobilecoinofficial/events{/privacy}","received_events_url":"https://api.github.com/users/mobilecoinofficial/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mobilecoinofficial/traits","description":"Collection of cryptography related traits","fork":true,"url":"https://api.github.com/repos/mobilecoinofficial/traits","forks_url":"https://api.github.com/repos/mobilecoinofficial/traits/forks","keys_url":"https://api.github.com/repos/mobilecoinofficial/traits/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mobilecoinofficial/traits/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mobilecoinofficial/traits/teams","hooks_url":"https://api.github.com/repos/mobilecoinofficial/traits/hooks","issue_events_url":"https://api.github.com/repos/mobilecoinofficial/traits/issues/events{/number}","events_url":"https://api.github.com/repos/mobilecoinofficial/traits/events","assignees_url":"https://api.github.com/repos/mobilecoinofficial/traits/assignees{/user}","branches_url":"https://api.github.com/repos/mobilecoinofficial/traits/branches{/branch}","tags_url":"https://api.github.com/repos/mobilecoinofficial/traits/tags","blobs_url":"https://api.github.com/repos/mobilecoinofficial/traits/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mobilecoinofficial/traits/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mobilecoinofficial/traits/git/refs{/sha}","trees_url":"https://api.github.com/repos/mobilecoinofficial/traits/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mobilecoinofficial/traits/statuses/{sha}","languages_url":"https://api.github.com/repos/mobilecoinofficial/traits/languages","stargazers_url":"https://api.github.com/repos/mobilecoinofficial/traits/stargazers","contributors_url":"https://api.github.com/repos/mobilecoinofficial/traits/contributors","subscribers_url":"https://api.github.com/repos/mobilecoinofficial/traits/subscribers","subscription_url":"https://api.github.com/repos/mobilecoinofficial/traits/subscription","commits_url":"https://api.github.com/repos/mobilecoinofficial/traits/commits{/sha}","git_commits_url":"https://api.github.com/repos/mobilecoinofficial/traits/git/commits{/sha}","comments_url":"https://api.github.com/repos/mobilecoinofficial/traits/comments{/number}","issue_comment_url":"https://api.github.com/repos/mobilecoinofficial/traits/issues/comments{/number}","contents_url":"https://api.github.com/repos/mobilecoinofficial/traits/contents/{+path}","compare_url":"https://api.github.com/repos/mobilecoinofficial/traits/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mobilecoinofficial/traits/merges","archive_url":"https://api.github.com/repos/mobilecoinofficial/traits/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mobilecoinofficial/traits/downloads","issues_url":"https://api.github.com/repos/mobilecoinofficial/traits/issues{/number}","pulls_url":"https://api.github.com/repos/mobilecoinofficial/traits/pulls{/number}","milestones_url":"https://api.github.com/repos/mobilecoinofficial/traits/milestones{/number}","notifications_url":"https://api.github.com/repos/mobilecoinofficial/traits/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mobilecoinofficial/traits/labels{/name}","releases_url":"https://api.github.com/repos/mobilecoinofficial/traits/releases{/id}","deployments_url":"https://api.github.com/repos/mobilecoinofficial/traits/deployments","created_at":"2019-07-26T22:17:36Z","updated_at":"2019-08-07T20:26:55Z","pushed_at":"2019-08-07T20:26:53Z","git_url":"git://github.com/mobilecoinofficial/traits.git","ssh_url":"git@github.com:mobilecoinofficial/traits.git","clone_url":"https://github.com/mobilecoinofficial/traits.git","svn_url":"https://github.com/mobilecoinofficial/traits","homepage":null,"size":121,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"RustCrypto:master","ref":"master","sha":"530b79544491e401e6bd0da578bfdecd17c34282","user":{"login":"RustCrypto","id":22351541,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzUxNTQx","avatar_url":"https://avatars1.githubusercontent.com/u/22351541?v=4","gravatar_id":"","url":"https://api.github.com/users/RustCrypto","html_url":"https://github.com/RustCrypto","followers_url":"https://api.github.com/users/RustCrypto/followers","following_url":"https://api.github.com/users/RustCrypto/following{/other_user}","gists_url":"https://api.github.com/users/RustCrypto/gists{/gist_id}","starred_url":"https://api.github.com/users/RustCrypto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RustCrypto/subscriptions","organizations_url":"https://api.github.com/users/RustCrypto/orgs","repos_url":"https://api.github.com/users/RustCrypto/repos","events_url":"https://api.github.com/users/RustCrypto/events{/privacy}","received_events_url":"https://api.github.com/users/RustCrypto/received_events","type":"Organization","site_admin":false},"repo":{"id":85605821,"node_id":"MDEwOlJlcG9zaXRvcnk4NTYwNTgyMQ==","name":"traits","full_name":"RustCrypto/traits","private":false,"owner":{"login":"RustCrypto","id":22351541,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzUxNTQx","avatar_url":"https://avatars1.githubusercontent.com/u/22351541?v=4","gravatar_id":"","url":"https://api.github.com/users/RustCrypto","html_url":"https://github.com/RustCrypto","followers_url":"https://api.github.com/users/RustCrypto/followers","following_url":"https://api.github.com/users/RustCrypto/following{/other_user}","gists_url":"https://api.github.com/users/RustCrypto/gists{/gist_id}","starred_url":"https://api.github.com/users/RustCrypto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RustCrypto/subscriptions","organizations_url":"https://api.github.com/users/RustCrypto/orgs","repos_url":"https://api.github.com/users/RustCrypto/repos","events_url":"https://api.github.com/users/RustCrypto/events{/privacy}","received_events_url":"https://api.github.com/users/RustCrypto/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/RustCrypto/traits","description":"Collection of cryptography related traits","fork":false,"url":"https://api.github.com/repos/RustCrypto/traits","forks_url":"https://api.github.com/repos/RustCrypto/traits/forks","keys_url":"https://api.github.com/repos/RustCrypto/traits/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RustCrypto/traits/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RustCrypto/traits/teams","hooks_url":"https://api.github.com/repos/RustCrypto/traits/hooks","issue_events_url":"https://api.github.com/repos/RustCrypto/traits/issues/events{/number}","events_url":"https://api.github.com/repos/RustCrypto/traits/events","assignees_url":"https://api.github.com/repos/RustCrypto/traits/assignees{/user}","branches_url":"https://api.github.com/repos/RustCrypto/traits/branches{/branch}","tags_url":"https://api.github.com/repos/RustCrypto/traits/tags","blobs_url":"https://api.github.com/repos/RustCrypto/traits/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RustCrypto/traits/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RustCrypto/traits/git/refs{/sha}","trees_url":"https://api.github.com/repos/RustCrypto/traits/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RustCrypto/traits/statuses/{sha}","languages_url":"https://api.github.com/repos/RustCrypto/traits/languages","stargazers_url":"https://api.github.com/repos/RustCrypto/traits/stargazers","contributors_url":"https://api.github.com/repos/RustCrypto/traits/contributors","subscribers_url":"https://api.github.com/repos/RustCrypto/traits/subscribers","subscription_url":"https://api.github.com/repos/RustCrypto/traits/subscription","commits_url":"https://api.github.com/repos/RustCrypto/traits/commits{/sha}","git_commits_url":"https://api.github.com/repos/RustCrypto/traits/git/commits{/sha}","comments_url":"https://api.github.com/repos/RustCrypto/traits/comments{/number}","issue_comment_url":"https://api.github.com/repos/RustCrypto/traits/issues/comments{/number}","contents_url":"https://api.github.com/repos/RustCrypto/traits/contents/{+path}","compare_url":"https://api.github.com/repos/RustCrypto/traits/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RustCrypto/traits/merges","archive_url":"https://api.github.com/repos/RustCrypto/traits/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RustCrypto/traits/downloads","issues_url":"https://api.github.com/repos/RustCrypto/traits/issues{/number}","pulls_url":"https://api.github.com/repos/RustCrypto/traits/pulls{/number}","milestones_url":"https://api.github.com/repos/RustCrypto/traits/milestones{/number}","notifications_url":"https://api.github.com/repos/RustCrypto/traits/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RustCrypto/traits/labels{/name}","releases_url":"https://api.github.com/repos/RustCrypto/traits/releases{/id}","deployments_url":"https://api.github.com/repos/RustCrypto/traits/deployments","created_at":"2017-03-20T17:24:37Z","updated_at":"2019-08-02T07:54:36Z","pushed_at":"2019-08-07T20:26:54Z","git_url":"git://github.com/RustCrypto/traits.git","ssh_url":"git@github.com:RustCrypto/traits.git","clone_url":"https://github.com/RustCrypto/traits.git","svn_url":"https://github.com/RustCrypto/traits","homepage":null,"size":110,"stargazers_count":63,"watchers_count":63,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":8,"license":null,"forks":15,"open_issues":8,"watchers":63,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RustCrypto/traits/pulls/40"},"html":{"href":"https://github.com/RustCrypto/traits/pull/40"},"issue":{"href":"https://api.github.com/repos/RustCrypto/traits/issues/40"},"comments":{"href":"https://api.github.com/repos/RustCrypto/traits/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/RustCrypto/traits/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/RustCrypto/traits/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RustCrypto/traits/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/RustCrypto/traits/statuses/ee8a730b3f5b0fc1fa39aef54cc5a65090c34f8d"}},"author_association":"NONE"}}
other: {"actor":{"display_login":"tarcieri"}}