Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Side by Side Diff: components/cryptauth/session_keys.h

Issue 2899863002: Updating D2D protocol to v1 to support separate sequence numbers. (Closed)
Patch Set: Addressing comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/cryptauth/proto/securemessage.proto ('k') | components/cryptauth/session_keys.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_CRYPTAUTH_SESSION_KEYS_H_
6 #define COMPONENTS_CRYPTAUTH_SESSION_KEYS_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11
12 namespace cryptauth {
13
14 // This class contains the secure channel (secure context) session keys. This
15 // class derives (from the master symmetric key) different keys for encryption
16 // and decryption. The protocol initiator (i.e. the Chromebook) should use
17 // |initiator_encode_key()| to encrypt the messages, and the responder should
18 // use |responder_encode_key()|. This is reversed for decryption.
19 class SessionKeys {
20 public:
21 // Create session keys derived from the |master_symmetric_key|.
22 explicit SessionKeys(const std::string& master_symmetric_key);
23
24 SessionKeys();
25
26 virtual ~SessionKeys();
27
28 virtual std::string initiator_encode_key() const;
29 virtual std::string responder_encode_key() const;
30
31 private:
32 // The initiator encoding key.
33 std::string initiator_encode_key_;
34
35 // The responder encoding key.
36 std::string responder_encode_key_;
37 };
38
39 } // namespace cryptauth
40
41 #endif // COMPONENTS_CRYPTAUTH_SESSION_KEYS_H_
OLDNEW
« no previous file with comments | « components/cryptauth/proto/securemessage.proto ('k') | components/cryptauth/session_keys.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698