{"action":"created","issue":{"url":"https://api.github.com/repos/pyca/cryptography/issues/2769","repository_url":"https://api.github.com/repos/pyca/cryptography","labels_url":"https://api.github.com/repos/pyca/cryptography/issues/2769/labels{/name}","comments_url":"https://api.github.com/repos/pyca/cryptography/issues/2769/comments","events_url":"https://api.github.com/repos/pyca/cryptography/issues/2769/events","html_url":"https://github.com/pyca/cryptography/pull/2769","id":138862416,"number":2769,"title":"require mode nonce/iv/tag data to be bytes","user":{"login":"reaperhulk","id":161495,"avatar_url":"https://avatars.githubusercontent.com/u/161495?v=3","gravatar_id":"","url":"https://api.github.com/users/reaperhulk","html_url":"https://github.com/reaperhulk","followers_url":"https://api.github.com/users/reaperhulk/followers","following_url":"https://api.github.com/users/reaperhulk/following{/other_user}","gists_url":"https://api.github.com/users/reaperhulk/gists{/gist_id}","starred_url":"https://api.github.com/users/reaperhulk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reaperhulk/subscriptions","organizations_url":"https://api.github.com/users/reaperhulk/orgs","repos_url":"https://api.github.com/users/reaperhulk/repos","events_url":"https://api.github.com/users/reaperhulk/events{/privacy}","received_events_url":"https://api.github.com/users/reaperhulk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-07T01:47:14Z","updated_at":"2016-03-07T02:55:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pyca/cryptography/pulls/2769","html_url":"https://github.com/pyca/cryptography/pull/2769","diff_url":"https://github.com/pyca/cryptography/pull/2769.diff","patch_url":"https://github.com/pyca/cryptography/pull/2769.patch"},"body":"partially resolves #2720 \r\n\r\nDoing this for key material is trickier because projects like https://github.com/reaperhulk/cryptography-pkcs11 rely on being able to pass a key handle object there."},"comment":{"url":"https://api.github.com/repos/pyca/cryptography/issues/comments/193066972","html_url":"https://github.com/pyca/cryptography/pull/2769#issuecomment-193066972","issue_url":"https://api.github.com/repos/pyca/cryptography/issues/2769","id":193066972,"user":{"login":"alex","id":772,"avatar_url":"https://avatars.githubusercontent.com/u/772?v=3","gravatar_id":"","url":"https://api.github.com/users/alex","html_url":"https://github.com/alex","followers_url":"https://api.github.com/users/alex/followers","following_url":"https://api.github.com/users/alex/following{/other_user}","gists_url":"https://api.github.com/users/alex/gists{/gist_id}","starred_url":"https://api.github.com/users/alex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex/subscriptions","organizations_url":"https://api.github.com/users/alex/orgs","repos_url":"https://api.github.com/users/alex/repos","events_url":"https://api.github.com/users/alex/events{/privacy}","received_events_url":"https://api.github.com/users/alex/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T02:55:31Z","updated_at":"2016-03-07T02:55:31Z","body":"Turns out we have a whole bunch of tests that pass the wrong type. yay. here's a list of places:\r\n\r\n```\r\ntests/hazmat/primitives/test_3des.py\r\n25:        algorithms.TripleDES(\"\\x00\" * 8), modes.CBC(\"\\x00\" * 8)\r\n62:        algorithms.TripleDES(\"\\x00\" * 8), modes.OFB(\"\\x00\" * 8)\r\n99:        algorithms.TripleDES(\"\\x00\" * 8), modes.CFB(\"\\x00\" * 8)\r\n136:        algorithms.TripleDES(\"\\x00\" * 8), modes.CFB8(\"\\x00\" * 8)\r\n173:        algorithms.TripleDES(\"\\x00\" * 8), modes.ECB()\r\n\r\ntests/hazmat/primitives/test_arc4.py\r\n21:        algorithms.ARC4(\"\\x00\" * 16), None\r\n\r\ntests/hazmat/primitives/test_aes.py\r\n21:        algorithms.AES(\"\\x00\" * 16), modes.CBC(\"\\x00\" * 16)\r\n54:        algorithms.AES(\"\\x00\" * 16), modes.ECB()\r\n87:        algorithms.AES(\"\\x00\" * 16), modes.OFB(\"\\x00\" * 16)\r\n120:        algorithms.AES(\"\\x00\" * 16), modes.CFB(\"\\x00\" * 16)\r\n153:        algorithms.AES(\"\\x00\" * 16), modes.CFB8(\"\\x00\" * 16)\r\n186:        algorithms.AES(\"\\x00\" * 16), modes.CTR(\"\\x00\" * 16)\r\n203:        algorithms.AES(\"\\x00\" * 16), modes.GCM(\"\\x00\" * 12)\r\n\r\ntests/hazmat/primitives/test_block.py\r\n123:        algorithms.AES(\"\\x00\" * 16), modes.GCM(\"\\x00\" * 12)\r\n\r\ntests/hazmat/primitives/test_blowfish.py\r\n21:        algorithms.Blowfish(\"\\x00\" * 56), modes.ECB()\r\n38:        algorithms.Blowfish(\"\\x00\" * 56), modes.CBC(\"\\x00\" * 8)\r\n55:        algorithms.Blowfish(\"\\x00\" * 56), modes.OFB(\"\\x00\" * 8)\r\n72:        algorithms.Blowfish(\"\\x00\" * 56), modes.CFB(\"\\x00\" * 8)\r\n\r\ntests/hazmat/primitives/test_camellia.py\r\n23:        algorithms.Camellia(\"\\x00\" * 16), modes.ECB()\r\n44:        algorithms.Camellia(\"\\x00\" * 16), modes.CBC(\"\\x00\" * 16)\r\n61:        algorithms.Camellia(\"\\x00\" * 16), modes.OFB(\"\\x00\" * 16)\r\n78:        algorithms.Camellia(\"\\x00\" * 16), modes.CFB(\"\\x00\" * 16)\r\n\r\ntests/hazmat/primitives/test_cast5.py\r\n21:        algorithms.CAST5(\"\\x00\" * 16), modes.ECB()\r\n38:        algorithms.CAST5(\"\\x00\" * 16), modes.CBC(\"\\x00\" * 8)\r\n55:        algorithms.CAST5(\"\\x00\" * 16), modes.OFB(\"\\x00\" * 8)\r\n72:        algorithms.CAST5(\"\\x00\" * 16), modes.CFB(\"\\x00\" * 8)\r\n89:        algorithms.CAST5(\"\\x00\" * 16), modes.CTR(\"\\x00\" * 8)\r\n\r\ntests/hazmat/primitives/test_idea.py\r\n21:        algorithms.IDEA(\"\\x00\" * 16), modes.ECB()\r\n38:        algorithms.IDEA(\"\\x00\" * 16), modes.CBC(\"\\x00\" * 8)\r\n55:        algorithms.IDEA(\"\\x00\" * 16), modes.OFB(\"\\x00\" * 8)\r\n72:        algorithms.IDEA(\"\\x00\" * 16), modes.CFB(\"\\x00\" * 8)\r\n\r\ntests/hazmat/primitives/test_keywrap.py\r\n32:            algorithms.AES(\"\\x00\" * 16), modes.ECB()\r\n53:            algorithms.AES(\"\\x00\" * 16), modes.ECB()\r\n72:            algorithms.AES(\"\\x00\" * 16), modes.ECB()\r\n84:            algorithms.AES(\"\\x00\" * 16), modes.ECB()\r\n95:            algorithms.AES(\"\\x00\" * 16), modes.ECB()\r\n\r\ntests/hazmat/primitives/test_seed.py\r\n21:        algorithms.SEED(\"\\x00\" * 16), modes.ECB()\r\n38:        algorithms.SEED(\"\\x00\" * 16), modes.CBC(\"\\x00\" * 16)\r\n55:        algorithms.SEED(\"\\x00\" * 16), modes.OFB(\"\\x00\" * 16)\r\n72:        algorithms.SEED(\"\\x00\" * 16), modes.CFB(\"\\x00\" * 16)\r\n\r\ntests/test_fernet.py\r\n48:        algorithms.AES(\"\\x00\" * 32), modes.CBC(\"\\x00\" * 16)\r\n129:        algorithms.AES(\"\\x00\" * 32), modes.CBC(\"\\x00\" * 16)\r\n```\r\n\r\nFix should go in a separate PR please."}}