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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cryptauth/proto/securemessage.proto ('k') | components/cryptauth/session_keys.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cryptauth/session_keys.h
diff --git a/components/cryptauth/session_keys.h b/components/cryptauth/session_keys.h
new file mode 100644
index 0000000000000000000000000000000000000000..c9d0e394de76a2e7145ac8c53f3ba64dc0412021
--- /dev/null
+++ b/components/cryptauth/session_keys.h
@@ -0,0 +1,41 @@
+// Copyright 2014 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.
+
+#ifndef COMPONENTS_CRYPTAUTH_SESSION_KEYS_H_
+#define COMPONENTS_CRYPTAUTH_SESSION_KEYS_H_
+
+#include <string>
+
+#include "base/macros.h"
+
+namespace cryptauth {
+
+// This class contains the secure channel (secure context) session keys. This
+// class derives (from the master symmetric key) different keys for encryption
+// and decryption. The protocol initiator (i.e. the Chromebook) should use
+// |initiator_encode_key()| to encrypt the messages, and the responder should
+// use |responder_encode_key()|. This is reversed for decryption.
+class SessionKeys {
+ public:
+ // Create session keys derived from the |master_symmetric_key|.
+ explicit SessionKeys(const std::string& master_symmetric_key);
+
+ SessionKeys();
+
+ virtual ~SessionKeys();
+
+ virtual std::string initiator_encode_key() const;
+ virtual std::string responder_encode_key() const;
+
+ private:
+ // The initiator encoding key.
+ std::string initiator_encode_key_;
+
+ // The responder encoding key.
+ std::string responder_encode_key_;
+};
+
+} // namespace cryptauth
+
+#endif // COMPONENTS_CRYPTAUTH_SESSION_KEYS_H_
« 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