Webserver+3d print
dh.c File Reference
Diffie-Hellman key exchange. More...
Go to the source code of this file.
Functions | |
void | dhInit (DhContext *context) |
Initialize Diffie-Hellman context. | |
void | dhFree (DhContext *context) |
Release Diffie-Hellman context. | |
error_t | dhGenerateKeyPair (DhContext *context, const PrngAlgo *prngAlgo, void *prngContext) |
Diffie-Hellman key pair generation. | |
error_t | dhCheckPublicKey (DhParameters *params, const Mpi *publicKey) |
Check Diffie-Hellman public value. | |
error_t | dhComputeSharedSecret (DhContext *context, uint8_t *output, size_t outputSize, size_t *outputLength) |
Compute Diffie-Hellman shared secret. |
Detailed Description
Diffie-Hellman key exchange.
License
Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCrypto Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Description
The Diffie-Hellman key agreement protocol allows two users to exchange a secret key over an insecure medium without any prior secrets. Refer to PKCS #3 (Diffie-Hellman Key-Agreement Standard)
- Version:
- 1.7.6
Definition in file dh.c.
Function Documentation
error_t dhCheckPublicKey | ( | DhParameters * | params, |
const Mpi * | publicKey | ||
) |
error_t dhComputeSharedSecret | ( | DhContext * | context, |
uint8_t * | output, | ||
size_t | outputSize, | ||
size_t * | outputLength | ||
) |
Compute Diffie-Hellman shared secret.
- Parameters:
-
[in] context Pointer to the Diffie-Hellman context [out] output Buffer where to store the shared secret [in] outputSize Size of the buffer in bytes [out] outputLength Length of the resulting shared secret
- Returns:
- Error code
void dhFree | ( | DhContext * | context ) |
Generated on Tue Jul 12 2022 17:10:19 by
