| // Copyright 2015 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto2"; |
| |
| option optimize_for = LITE_RUNTIME; |
| |
| package gcm; |
| |
| // Stores a public/private key-pair. |
| // Next tag: 5 |
| message KeyPair { |
| // The type of key used for key agreement. Currently only the ECDH key |
| // agreement scheme is supported, using NIST P-256. |
| enum KeyType { |
| ECDH_P256 = 0; |
| } |
| |
| required KeyType type = 1; |
| |
| // The private key matching the size requirements of |type|. |
| optional bytes private_key = 2; |
| |
| // The public key as an X.509 SubjectPublicKeyInfo block. |
| optional bytes public_key_x509 = 3; |
| |
| // The public key as an uncompressed EC point according to SEC 2.3.3. |
| optional bytes public_key = 4; |
| } |
| |
| // Stores a vector of public/private key-pairs associated with an app id. |
| // |
| // In the current implementation, each app id will have a single encryption key- |
| // pair associated with it at most. The message allows for multiple key pairs |
| // in case we need to force-cycle all keys, allowing the old keys to remain |
| // valid for a period of time enabling the web app to update. |
| // |
| // Next tag: 4 |
| message EncryptionData { |
| // The app id to whom this encryption data belongs. |
| required string app_id = 1; |
| |
| // The actual public/private key-pairs. |
| repeated KeyPair keys = 2; |
| |
| // The authentication secret associated with the subscription. Must be a |
| // cryptographically secure number of at least 12 bytes. |
| optional bytes auth_secret = 3; |
| } |