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

Side by Side Diff: remoting/protocol/negotiating_authenticator_base.h

Issue 1800823002: Add Curve25519 version of pairing authenticators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | remoting/protocol/negotiating_authenticator_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ 5 #ifndef REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_
6 #define REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ 6 #define REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // SPAKE2 with P224 using access code in plain-text. Used for It2Me. 70 // SPAKE2 with P224 using access code in plain-text. Used for It2Me.
71 // TODO(sergeyu): Remove and use SHARED_SECRET_SPAKE2_CURVE25519. 71 // TODO(sergeyu): Remove and use SHARED_SECRET_SPAKE2_CURVE25519.
72 SHARED_SECRET_PLAIN_SPAKE2_P224, 72 SHARED_SECRET_PLAIN_SPAKE2_P224,
73 73
74 // SPAKE2 PIN or access code hashed with host_id using HMAC-SHA256. 74 // SPAKE2 PIN or access code hashed with host_id using HMAC-SHA256.
75 SHARED_SECRET_SPAKE2_P224, 75 SHARED_SECRET_SPAKE2_P224,
76 SHARED_SECRET_SPAKE2_CURVE25519, 76 SHARED_SECRET_SPAKE2_CURVE25519,
77 77
78 // SPAKE2 using shared pairing secret. Falls back to PIN-based 78 // SPAKE2 using shared pairing secret. Falls back to PIN-based
79 // authentication when pairing fails. 79 // authentication when pairing fails.
80 // TODO(sergeyu): Add CURVE25519 variant. crbug.com/593123
81 PAIRED_SPAKE2_P224, 80 PAIRED_SPAKE2_P224,
81 PAIRED_SPAKE2_CURVE25519,
82 82
83 // Authentication using third-party authentication server. 83 // Authentication using third-party authentication server.
84 // SPAKE2 with P224 using shared pairing secret. Falls back to PIN-based 84 // SPAKE2 with P224 using shared pairing secret. Falls back to PIN-based
85 // authentication when it fails to authenticate using paired secret. 85 // authentication when it fails to authenticate using paired secret.
86 THIRD_PARTY_SPAKE2_P224, 86 THIRD_PARTY_SPAKE2_P224,
87 THIRD_PARTY_SPAKE2_CURVE25519, 87 THIRD_PARTY_SPAKE2_CURVE25519,
88 }; 88 };
89 89
90 ~NegotiatingAuthenticatorBase() override; 90 ~NegotiatingAuthenticatorBase() override;
91 91
92 // Authenticator interface. 92 // Authenticator interface.
93 State state() const override; 93 State state() const override;
94 bool started() const override; 94 bool started() const override;
95 RejectionReason rejection_reason() const override; 95 RejectionReason rejection_reason() const override;
96 const std::string& GetAuthKey() const override; 96 const std::string& GetAuthKey() const override;
97 scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override; 97 scoped_ptr<ChannelAuthenticator> CreateChannelAuthenticator() const override;
98 98
99 // Calls |current_authenticator_| to process |message|, passing the supplied 99 // Calls |current_authenticator_| to process |message|, passing the supplied
100 // |resume_callback|. 100 // |resume_callback|.
101 void ProcessMessageInternal(const buzz::XmlElement* message, 101 void ProcessMessageInternal(const buzz::XmlElement* message,
102 const base::Closure& resume_callback); 102 const base::Closure& resume_callback);
103 103
104 protected: 104 protected:
105 friend class NegotiatingAuthenticatorTest; 105 friend class NegotiatingAuthenticatorTest;
106 FRIEND_TEST_ALL_PREFIXES(NegotiatingAuthenticatorTest, IncompatibleMethods);
107 106
108 static const buzz::StaticQName kMethodAttributeQName; 107 static const buzz::StaticQName kMethodAttributeQName;
109 static const buzz::StaticQName kSupportedMethodsAttributeQName; 108 static const buzz::StaticQName kSupportedMethodsAttributeQName;
110 static const char kSupportedMethodsSeparator; 109 static const char kSupportedMethodsSeparator;
111 110
112 static const buzz::StaticQName kPairingInfoTag; 111 static const buzz::StaticQName kPairingInfoTag;
113 static const buzz::StaticQName kClientIdAttribute; 112 static const buzz::StaticQName kClientIdAttribute;
114 113
115 // Parses a string that defines an authentication method. Returns 114 // Parses a string that defines an authentication method. Returns
116 // Method::INVALID if the string is invalid. 115 // Method::INVALID if the string is invalid.
(...skipping 21 matching lines...) Expand all
138 RejectionReason rejection_reason_ = INVALID_CREDENTIALS; 137 RejectionReason rejection_reason_ = INVALID_CREDENTIALS;
139 138
140 private: 139 private:
141 DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticatorBase); 140 DISALLOW_COPY_AND_ASSIGN(NegotiatingAuthenticatorBase);
142 }; 141 };
143 142
144 } // namespace protocol 143 } // namespace protocol
145 } // namespace remoting 144 } // namespace remoting
146 145
147 #endif // REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_ 146 #endif // REMOTING_PROTOCOL_NEGOTIATING_AUTHENTICATOR_BASE_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/negotiating_authenticator_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698