| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_IMPL_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_IMPL_H |
| 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_IMPL_H | 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_IMPL_H |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "components/cryptauth/cryptauth_enroller.h" | 13 #include "components/cryptauth/cryptauth_enroller.h" |
| 14 #include "components/cryptauth/proto/cryptauth_api.pb.h" | 14 #include "components/cryptauth/proto/cryptauth_api.pb.h" |
| 15 | 15 |
| 16 namespace cryptauth { | 16 namespace cryptauth { |
| 17 | 17 |
| 18 class CryptAuthClient; | 18 class CryptAuthClient; |
| 19 class CryptAuthClientFactory; | 19 class CryptAuthClientFactory; |
| 20 class CryptAuthClientFactoryImpl; | |
| 21 class SecureMessageDelegate; | 20 class SecureMessageDelegate; |
| 22 | 21 |
| 23 // Implementation of CryptAuthEnroller to perform enrollment in two steps: | 22 // Implementation of CryptAuthEnroller to perform enrollment in two steps: |
| 24 // 1. SetupEnrollment: | 23 // 1. SetupEnrollment: |
| 25 // Obtain a session public key from CryptAuth used to encrypt enrollment | 24 // Obtain a session public key from CryptAuth used to encrypt enrollment |
| 26 // data. Generate an ephemeral public key and derive a session symmetric | 25 // data. Generate an ephemeral public key and derive a session symmetric |
| 27 // key. | 26 // key. |
| 28 // 2. FinishEnrollment: | 27 // 2. FinishEnrollment: |
| 29 // Encrypt the enrollment data with the session symmetric key, and send the | 28 // Encrypt the enrollment data with the session symmetric key, and send the |
| 30 // payload and device's public key to CryptAuth. | 29 // payload and device's public key to CryptAuth. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 std::string symmetric_key_; | 94 std::string symmetric_key_; |
| 96 | 95 |
| 97 base::WeakPtrFactory<CryptAuthEnrollerImpl> weak_ptr_factory_; | 96 base::WeakPtrFactory<CryptAuthEnrollerImpl> weak_ptr_factory_; |
| 98 | 97 |
| 99 DISALLOW_COPY_AND_ASSIGN(CryptAuthEnrollerImpl); | 98 DISALLOW_COPY_AND_ASSIGN(CryptAuthEnrollerImpl); |
| 100 }; | 99 }; |
| 101 | 100 |
| 102 } // namespace cryptauth | 101 } // namespace cryptauth |
| 103 | 102 |
| 104 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_IMPL_H | 103 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_IMPL_H |
| OLD | NEW |