|
1 /* |
|
2 * ============================================================================ |
|
3 * Name : ./accesssec/eapol/eapol_framework/wapi_common/include/ec_algorithms.h |
|
4 * Part of : WAPI / WAPI *** Info from the SWAD |
|
5 * Description : WAPI authentication |
|
6 * Version : %version: 10 % << Don't touch! Updated by Synergy at check-out. |
|
7 * |
|
8 * Copyright © 2001-2009 Nokia. All rights reserved. |
|
9 * This material, including documentation and any related computer |
|
10 * programs, is protected by copyright controlled by Nokia. All |
|
11 * rights are reserved. Copying, including reproducing, storing, |
|
12 * adapting or translating, any or all of this material requires the |
|
13 * prior written consent of Nokia. This material also contains |
|
14 * confidential information which may not be disclosed to others |
|
15 * without the prior written consent of Nokia. |
|
16 * ============================================================================ |
|
17 * Template version: 4.2 |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #if !defined(_EC_AM_ALGORITHMS_DIRECT_NRC_H_) |
|
23 #define _EC_AM_ALGORITHMS_DIRECT_NRC_H_ |
|
24 |
|
25 #if defined(USE_WAPI_CORE) |
|
26 |
|
27 #include "eap_am_export.h" |
|
28 #include "eap_tools.h" |
|
29 #include "ec_cs_types.h" |
|
30 #include "ec_am_base_algorithms.h" |
|
31 |
|
32 /** @file */ |
|
33 |
|
34 //---------------------------------------------------------------------------- |
|
35 |
|
36 class abs_eap_am_tools_c; |
|
37 class eap_configuration_field_c; |
|
38 class abs_ec_am_algorithms_c; |
|
39 |
|
40 |
|
41 class EAP_EXPORT ec_am_algorithms_direct_nrc_c |
|
42 : public ec_am_base_algorithms_c |
|
43 { |
|
44 private: |
|
45 //-------------------------------------------------- |
|
46 |
|
47 /// This is pointer to the tools class. |
|
48 abs_eap_am_tools_c * const m_am_tools; |
|
49 |
|
50 abs_ec_am_algorithms_c * const m_partner; |
|
51 |
|
52 eap_variable_data_c m_e_curve; |
|
53 |
|
54 eap_variable_data_c m_nc_rand_state; |
|
55 |
|
56 bool m_is_client; |
|
57 |
|
58 bool m_is_valid; |
|
59 |
|
60 |
|
61 eap_status_e initialize_curve(); |
|
62 |
|
63 //-------------------------------------------------- |
|
64 public: |
|
65 //-------------------------------------------------- |
|
66 |
|
67 /** |
|
68 * The destructor of the ec_am_algorithms_direct_nrc_c class does nothing special. |
|
69 */ |
|
70 EAP_FUNC_IMPORT virtual ~ec_am_algorithms_direct_nrc_c(); |
|
71 |
|
72 EAP_FUNC_IMPORT ec_am_algorithms_direct_nrc_c( |
|
73 abs_eap_am_tools_c * const tools, |
|
74 abs_ec_am_algorithms_c * const partner, |
|
75 const bool is_client_when_true); |
|
76 |
|
77 EAP_FUNC_IMPORT eap_status_e configure(); |
|
78 |
|
79 EAP_FUNC_IMPORT bool get_is_valid() const; |
|
80 |
|
81 EAP_FUNC_IMPORT eap_status_e create_signature_with_private_key( |
|
82 const eap_variable_data_c * const hash_of_message, |
|
83 const eap_variable_data_c * const private_key); |
|
84 |
|
85 EAP_FUNC_IMPORT eap_status_e verify_signature_with_public_key( |
|
86 const eap_variable_data_c * const public_key, |
|
87 const eap_variable_data_c * const hash_of_message, |
|
88 const eap_variable_data_c * const signature); |
|
89 |
|
90 EAP_FUNC_IMPORT eap_status_e create_ecdh_temporary_keys(); |
|
91 |
|
92 EAP_FUNC_IMPORT eap_status_e create_ecdh( |
|
93 const eap_variable_data_c * const own_private_key_d, |
|
94 const eap_variable_data_c * const peer_public_key_x, |
|
95 const eap_variable_data_c * const peer_public_key_y); |
|
96 |
|
97 //-------------------------------------------------- |
|
98 }; // ec_am_algorithms_direct_nrc_c |
|
99 |
|
100 //---------------------------------------------------------------------------- |
|
101 |
|
102 #endif //#if defined(USE_WAPI_CORE) |
|
103 |
|
104 #endif //#if !defined(_EC_AM_ALGORITHMS_DIRECT_NRC_H_) |
|
105 |
|
106 |
|
107 // End. |