From 40810248c4f2a3028e3d21797d0f62e8d866c9e8 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 17 Jul 2015 07:30:02 -0700 Subject: Introduce the GCMMessageCryptographer class. This class implements the encryption guts of the following drafts: https://tools.ietf.org/html/draft-thomson-webpush-encryption-01 https://tools.ietf.org/html/draft-thomson-http-encryption-01 In short, given an input, key, salt and record size, this class will calculate a content encryption key using the HKDF and apply AEAD_AES_128_GCM over it, using an authentication tag size of 16 octets. Both encrypting and decrypting routines have been implemented. Following draft-thomson-webpush-encryption-01, only messages existing of a single record are supported. The record may be prepended by some padding, a maximum of 255 bytes, to hide the length of the message. The first and primary customer of this will be the Push Messaging feature, which will mandate encryption for payloads associated with received push messages. Chrome will decrypt incoming messages. This patch does not introduce the additional functionalities required for the entire feature - generation and storage of the keys, plumbing required to expose this to JavaScript and infrastructure within the rest of the GCM Driver to discover and use the necessary keys. This CL is dependent on the following ones: https://codereview.chromium.org/1199033006/ https://codereview.chromium.org/1226033002/ BUG=486040 Review URL: https://codereview.chromium.org/1198533003 Cr-Commit-Position: refs/heads/master@{#339250} --- components/components_tests.gyp | 1 + 1 file changed, 1 insertion(+) (limited to 'components/components_tests.gyp') diff --git a/components/components_tests.gyp b/components/components_tests.gyp index 2e7bb3c..509ef5e 100644 --- a/components/components_tests.gyp +++ b/components/components_tests.gyp @@ -232,6 +232,7 @@ ], 'gcm_driver_crypto_unittest_sources': [ 'gcm_driver/crypto/gcm_key_store_unittest.cc', + 'gcm_driver/crypto/gcm_message_cryptographer_unittest.cc', ], 'google_unittest_sources': [ 'google/core/browser/google_url_tracker_unittest.cc', -- cgit v1.1