Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
crys_ecpki_dh.h
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_DH_H 00038 #define CRYS_ECPKI_DH_H 00039 00040 /*! @file 00041 @brief Defines the API that supports EC Diffie-Hellman shared secret value derivation primitives. 00042 @defgroup crys_ecpki_dh CryptoCell ECC Diffie-Hellman APIs 00043 @{ 00044 @ingroup cryptocell_ecpki 00045 */ 00046 00047 00048 #include "crys_ecpki_types.h" 00049 #include "crys_ecpki_error.h" 00050 00051 #ifdef __cplusplus 00052 extern "C" 00053 { 00054 #endif 00055 00056 /*********************************************************************** 00057 * CRYS_ECDH_SVDP_DH function * 00058 ***********************************************************************/ 00059 /*! 00060 @brief Creates the shared secret value according to [IEEE1363, ANS X9.63]: 00061 00062 <ol><li> Checks input-parameter pointers and EC Domain in public and private 00063 keys.</li> 00064 <li> Derives the partner public key and calls the EcWrstDhDeriveSharedSecret 00065 function, which performs EC SVDP operations.</li></ol> 00066 \note The term "User" 00067 refers to any party that calculates a shared secret value using this primitive. 00068 The term "Partner" refers to any other party of shared secret value calculation. 00069 Partner's public key shall be validated before using in this primitive. 00070 00071 @return CRYS_OK on success. 00072 @return A non-zero value on failure as defined crys_ecpki_error.h. 00073 */ 00074 CIMPORT_C CRYSError_t CRYS_ECDH_SVDP_DH( 00075 CRYS_ECPKI_UserPublKey_t *PartnerPublKey_ptr, /*!< [in] Pointer to a partner public key. */ 00076 CRYS_ECPKI_UserPrivKey_t *UserPrivKey_ptr, /*!< [in] Pointer to a user private key. */ 00077 uint8_t *SharedSecretValue_ptr, /*!< [out] Pointer to an output buffer that will contain the shared 00078 secret value. */ 00079 uint32_t *SharedSecrValSize_ptr, /*!< [in/out] Pointer to the size of user-passed buffer (in) and 00080 actual size of output of calculated shared secret value 00081 (out). */ 00082 CRYS_ECDH_TempData_t *TempBuff_ptr /*!< [in] Pointer to a temporary buffer. */); 00083 00084 #ifdef __cplusplus 00085 } 00086 #endif 00087 /** 00088 @} 00089 */ 00090 #endif
Generated on Tue Jul 12 2022 13:54:14 by
