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