Knight KE / Mbed OS Game_Master
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers crys_ecpki_kg.h Source File

crys_ecpki_kg.h

Go to the documentation of this file.
00001 /**************************************************************************************
00002 * Copyright (c) 2016-2017, ARM Limited or its affiliates. All rights reserved         *
00003 *                                                                                     *
00004 * This file and the related binary are licensed under the following license:          *
00005 *                                                                                     *
00006 * ARM Object Code and Header Files License, v1.0 Redistribution.                      *
00007 *                                                                                     *
00008 * Redistribution and use of object code, header files, and documentation, without     *
00009 * modification, are permitted provided that the following conditions are met:         *
00010 *                                                                                     *
00011 * 1) Redistributions must reproduce the above copyright notice and the                *
00012 *    following disclaimer in the documentation and/or other materials                 *
00013 *    provided with the distribution.                                                  *
00014 *                                                                                     *
00015 * 2) Unless to the extent explicitly permitted by law, no reverse                     *
00016 *    engineering, decompilation, or disassembly of is permitted.                      *
00017 *                                                                                     *
00018 * 3) Redistribution and use is permitted solely for the purpose of                    *
00019 *    developing or executing applications that are targeted for use                   *
00020 *    on an ARM-based product.                                                         *
00021 *                                                                                     *
00022 * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND                  *
00023 * CONTRIBUTORS "AS IS." ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT             *
00024 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT,        *
00025 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE          *
00026 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   *
00027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED            *
00028 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR              *
00029 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF              *
00030 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING                *
00031 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS                  *
00032 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                        *
00033 **************************************************************************************/
00034 
00035 
00036 
00037 #ifndef CRYS_ECPKI_KG_H
00038 #define CRYS_ECPKI_KG_H
00039 
00040 /*! @file
00041 @brief Defines the API for generation of ECC private and public keys.
00042 @defgroup crys_ecpki_kg CryptoCell ECC Key Generation APIs
00043 @{
00044 @ingroup cryptocell_ecpki
00045 */
00046 
00047 
00048 #include "crys_error.h"
00049 #include "crys_rnd.h"
00050 #include "crys_ecpki_types.h"
00051 
00052 #ifdef __cplusplus
00053 extern "C"
00054 {
00055 #endif
00056 
00057 /*****************  CRYS_ECPKI_GenKeyPair function   **********************/
00058 /*!
00059 @brief Generates a pair of private and public keys in internal representation according to [ANS X9.62].
00060 
00061 @return CRYS_OK on success.
00062 @return A non-zero value on failure as defined crys_ecpki_error.h or crys_rnd_error.h
00063 */
00064 CIMPORT_C CRYSError_t  CRYS_ECPKI_GenKeyPair(
00065             void       *rndState_ptr,     /*!< [in/out] Pointer to the RND state structure. */
00066             SaSiRndGenerateVectWorkFunc_t  rndGenerateVectFunc,   /*!< [in] Pointer to the random vector generation function.  */
00067                         const CRYS_ECPKI_Domain_t   *pDomain,          /*!< [in]  Pointer to EC domain (curve). */
00068                         CRYS_ECPKI_UserPrivKey_t    *pUserPrivKey,     /*!< [out] Pointer to the private key structure. This structure is used as input to the
00069                                          ECPKI cryptographic primitives. */
00070                         CRYS_ECPKI_UserPublKey_t    *pUserPublKey,     /*!< [out] Pointer to the public key structure. This structure is used as input to the
00071                                          ECPKI cryptographic primitives. */
00072             CRYS_ECPKI_KG_TempData_t    *pTempData,        /*!< [in] Temporary buffers for internal use, defined in ::CRYS_ECPKI_KG_TempData_t. */
00073                         CRYS_ECPKI_KG_FipsContext_t    *pFipsCtx       /*!< [in] Pointer to temporary buffer used in case FIPS certification if required. */
00074 );
00075 
00076 
00077 
00078 #ifdef __cplusplus
00079 }
00080 #endif
00081 /**
00082 @}
00083  */
00084 #endif
00085 
00086 
00087 
00088