{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/1043","repository_url":"https://api.github.com/repos/aws/aws-sdk-ruby","labels_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/1043/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/1043/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/1043/events","html_url":"https://github.com/aws/aws-sdk-ruby/pull/1043","id":124392865,"number":1043,"title":"Adding support for AES/GCM/NoPadding","user":{"login":"DanielRedOak","id":5090638,"avatar_url":"https://avatars.githubusercontent.com/u/5090638?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielRedOak","html_url":"https://github.com/DanielRedOak","followers_url":"https://api.github.com/users/DanielRedOak/followers","following_url":"https://api.github.com/users/DanielRedOak/following{/other_user}","gists_url":"https://api.github.com/users/DanielRedOak/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRedOak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRedOak/subscriptions","organizations_url":"https://api.github.com/users/DanielRedOak/orgs","repos_url":"https://api.github.com/users/DanielRedOak/repos","events_url":"https://api.github.com/users/DanielRedOak/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRedOak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/labels/Version%202","name":"Version 2","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"trevorrowe","id":27863,"avatar_url":"https://avatars.githubusercontent.com/u/27863?v=3","gravatar_id":"","url":"https://api.github.com/users/trevorrowe","html_url":"https://github.com/trevorrowe","followers_url":"https://api.github.com/users/trevorrowe/followers","following_url":"https://api.github.com/users/trevorrowe/following{/other_user}","gists_url":"https://api.github.com/users/trevorrowe/gists{/gist_id}","starred_url":"https://api.github.com/users/trevorrowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trevorrowe/subscriptions","organizations_url":"https://api.github.com/users/trevorrowe/orgs","repos_url":"https://api.github.com/users/trevorrowe/repos","events_url":"https://api.github.com/users/trevorrowe/events{/privacy}","received_events_url":"https://api.github.com/users/trevorrowe/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-12-30T19:55:35Z","updated_at":"2016-03-04T00:24:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/pulls/1043","html_url":"https://github.com/aws/aws-sdk-ruby/pull/1043","diff_url":"https://github.com/aws/aws-sdk-ruby/pull/1043.diff","patch_url":"https://github.com/aws/aws-sdk-ruby/pull/1043.patch"},"body":"Adds support for AES/GCM/NoPadding and uses the auth_tag from the end of the ciphertext to authenticate the complete ciphertext when `cipher.final` is called in the code.  Should also add additional flexibility to add further formats in the future if necessary.\r\n\r\nPresence of an auth tag is detected via `x-amz-meta-x-amz-tag-len` being present in the response headers.  Unencrypted data is then written to the IO Object (vs unencrypting on .write without auth tag) to obtain the auth tag from the last `x-amz-meta-x-amz-tag-len` bits of the ciphertext. The IO Object is then truncated to remove the auth tag and then re-processed and decrypted after setting the `cipher.auth_tag` and `cipher.auth_data=''` on the cipher (order of operations is critical).  When `cipher.final` is called, OpenSSL authenticates the ciphertext and returns.\r\n\r\nCurrently lacks tests, but was locally tested with and without a target_response to test the different IO classes that are used.  Would like to get tests written, but wanted to get this in front of people first.\r\n\r\n**Simple Example Usage**\r\n```ruby\r\n# pass in the kms_key_id, bucket, object_key, and target\r\ns3encrypt = Aws::S3::Encryption::Client.new(kms_key_id: kms_key_id)\r\ns3encrypt.get_object(bucket:bucket, key:object_key, response_target: target)\r\n```"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/comments/192034201","html_url":"https://github.com/aws/aws-sdk-ruby/pull/1043#issuecomment-192034201","issue_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/1043","id":192034201,"user":{"login":"DanielRedOak","id":5090638,"avatar_url":"https://avatars.githubusercontent.com/u/5090638?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielRedOak","html_url":"https://github.com/DanielRedOak","followers_url":"https://api.github.com/users/DanielRedOak/followers","following_url":"https://api.github.com/users/DanielRedOak/following{/other_user}","gists_url":"https://api.github.com/users/DanielRedOak/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRedOak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRedOak/subscriptions","organizations_url":"https://api.github.com/users/DanielRedOak/orgs","repos_url":"https://api.github.com/users/DanielRedOak/repos","events_url":"https://api.github.com/users/DanielRedOak/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRedOak/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T00:24:02Z","updated_at":"2016-03-04T00:24:02Z","body":"@awood45 any update?"}}