Mistake on this page?
Report an issue in GitHub or email us
crys_ecpki_dh.h
Go to the documentation of this file.
1 /**************************************************************************************
2 * Copyright (c) 2016-2017, ARM Limited or its affiliates. All rights reserved *
3 * *
4 * This file and the related binary are licensed under the following license: *
5 * *
6 * ARM Object Code and Header Files License, v1.0 Redistribution. *
7 * *
8 * Redistribution and use of object code, header files, and documentation, without *
9 * modification, are permitted provided that the following conditions are met: *
10 * *
11 * 1) Redistributions must reproduce the above copyright notice and the *
12 * following disclaimer in the documentation and/or other materials *
13 * provided with the distribution. *
14 * *
15 * 2) Unless to the extent explicitly permitted by law, no reverse *
16 * engineering, decompilation, or disassembly of is permitted. *
17 * *
18 * 3) Redistribution and use is permitted solely for the purpose of *
19 * developing or executing applications that are targeted for use *
20 * on an ARM-based product. *
21 * *
22 * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
23 * CONTRIBUTORS "AS IS." ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT *
24 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, *
25 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
26 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, *
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED *
28 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
29 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
30 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
33 **************************************************************************************/
34 
35 
36 
37 #ifndef CRYS_ECPKI_DH_H
38 #define CRYS_ECPKI_DH_H
39 
40 /*! @file
41 @brief Defines the API that supports EC Diffie-Hellman shared secret value derivation primitives.
42 @defgroup crys_ecpki_dh CryptoCell ECC Diffie-Hellman APIs
43 @{
44 @ingroup cryptocell_ecpki
45 */
46 
47 
48 #include "crys_ecpki_types.h"
49 #include "crys_ecpki_error.h"
50 
51 #ifdef __cplusplus
52 extern "C"
53 {
54 #endif
55 
56 /***********************************************************************
57  * CRYS_ECDH_SVDP_DH function *
58  ***********************************************************************/
59 /*!
60 @brief Creates the shared secret value according to [IEEE1363, ANS X9.63]:
61 
62 <ol><li> Checks input-parameter pointers and EC Domain in public and private
63 keys.</li>
64 <li> Derives the partner public key and calls the EcWrstDhDeriveSharedSecret
65 function, which performs EC SVDP operations.</li></ol>
66 \note The term "User"
67 refers to any party that calculates a shared secret value using this primitive.
68 The term "Partner" refers to any other party of shared secret value calculation.
69 Partner's public key shall be validated before using in this primitive.
70 
71 @return CRYS_OK on success.
72 @return A non-zero value on failure as defined crys_ecpki_error.h.
73 */
75  CRYS_ECPKI_UserPublKey_t *PartnerPublKey_ptr, /*!< [in] Pointer to a partner public key. */
76  CRYS_ECPKI_UserPrivKey_t *UserPrivKey_ptr, /*!< [in] Pointer to a user private key. */
77  uint8_t *SharedSecretValue_ptr, /*!< [out] Pointer to an output buffer that will contain the shared
78  secret value. */
79  uint32_t *SharedSecrValSize_ptr, /*!< [in/out] Pointer to the size of user-passed buffer (in) and
80  actual size of output of calculated shared secret value
81  (out). */
82  CRYS_ECDH_TempData_t *TempBuff_ptr /*!< [in] Pointer to a temporary buffer. */);
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 /**
88 @}
89  */
90 #endif
CRYSError_t CRYS_ECDH_SVDP_DH(CRYS_ECPKI_UserPublKey_t *PartnerPublKey_ptr, CRYS_ECPKI_UserPrivKey_t *UserPrivKey_ptr, uint8_t *SharedSecretValue_ptr, uint32_t *SharedSecrValSize_ptr, CRYS_ECDH_TempData_t *TempBuff_ptr)
Creates the shared secret value according to [IEEE1363, ANS X9.63]:
Contains all of the enums and definitions that are used for the CRYS ECPKI APIs.
This module contains the definitions of the CRYS ECPKI errors.
uint32_t CRYSError_t
Definition: crys_error.h:253
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.