2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FSec_GenerateParameters.h
19 * @brief This file contains implementation of Generating Key Exchange Parameters p and g using ANSFS X9.31 Standard.
21 #ifndef _FSEC_INTERNAL_GENERATE_PARAMETERS_H_
22 #define _FSEC_INTERNAL_GENERATE_PARAMETERS_H_
25 namespace Tizen { namespace Security
29 * @class _GenerateParameters
30 * @brief This class generates a pseudo random number as per X9.31 specification using algorithm passed as input.
33 * This file contains implementation of Generating Key Exchange Parameters p and g using ANSFS X9.31 Standard.
36 class _GenerateParameters
41 * Generate key Exchange Parameters as per X9.31 specification using algorithm passed as input.
44 * @return Returns 0 in case of error otherwise success.
45 * @param[out] pDh Pointer to output DH structure which includes the generated parameters p and g.
46 * @param[in] primeNumberLength Length of the prime that is to be generated.
47 * @param[in] generatorLength Length of the generator that is to be generated.
48 * @param[in] seedLengthInBytes Length of the seed that is required to Generate Key Exchange Parameters p and g.
51 static result GenerateParametersX186(void* pDh, long primeNumberLength, long generatorLength, long seedLengthInBytes);
54 _GenerateParameters(void);
55 _GenerateParameters(const _GenerateParameters& rhs);
56 _GenerateParameters& operator =(const _GenerateParameters& rhs);
57 ~_GenerateParameters(void);
59 }; //_GenerateParameters
61 } } // Tizen::Security
63 #endif //_FSEC_INTERNAL_GENERATE_PARAMETERS_H_