Diffie-Hellman key exchange. More...
#include "ike/ike.h"
Go to the source code of this file.
Functions | |
void | ikeInitDhContext (IkeSaEntry *sa) |
Initialize Diffie-Hellman context. More... | |
void | ikeFreeDhContext (IkeSaEntry *sa) |
Release Diffie-Hellman context. More... | |
error_t | ikeGenerateDhKeyPair (IkeSaEntry *sa) |
Diffie-Hellman key pair generation. More... | |
error_t | ikeComputeDhSharedSecret (IkeSaEntry *sa) |
Compute Diffie-Hellman shared secret. More... | |
error_t | ikeFormatDhPublicKey (IkeSaEntry *sa, uint8_t *p, size_t *written) |
Format Diffie-Hellman public key. More... | |
error_t | ikeParseDhPublicKey (IkeSaEntry *sa, const uint8_t *p, size_t length) |
Parse peer's Diffie-Hellman public key. More... | |
Detailed Description
Diffie-Hellman key exchange.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2022-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneIPSEC 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.
- Version
- 2.4.4
Definition in file ike_key_exchange.h.
Function Documentation
◆ ikeComputeDhSharedSecret()
error_t ikeComputeDhSharedSecret | ( | IkeSaEntry * | sa | ) |
Compute Diffie-Hellman shared secret.
- Parameters
-
[in] sa Pointer to the IKE SA
- Returns
- Error code
Definition at line 151 of file ike_key_exchange.c.
◆ ikeFormatDhPublicKey()
error_t ikeFormatDhPublicKey | ( | IkeSaEntry * | sa, |
uint8_t * | p, | ||
size_t * | written | ||
) |
Format Diffie-Hellman public key.
- Parameters
-
[in] sa Pointer to the IKE SA [out] p Buffer where to format the Diffie-Hellman public key [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 199 of file ike_key_exchange.c.
◆ ikeFreeDhContext()
void ikeFreeDhContext | ( | IkeSaEntry * | sa | ) |
Release Diffie-Hellman context.
- Parameters
-
[in] sa Pointer to the IKE SA
Definition at line 69 of file ike_key_exchange.c.
◆ ikeGenerateDhKeyPair()
error_t ikeGenerateDhKeyPair | ( | IkeSaEntry * | sa | ) |
Diffie-Hellman key pair generation.
- Parameters
-
[in] sa Pointer to the IKE SA
- Returns
- Error code
Definition at line 89 of file ike_key_exchange.c.
◆ ikeInitDhContext()
void ikeInitDhContext | ( | IkeSaEntry * | sa | ) |
Initialize Diffie-Hellman context.
- Parameters
-
[in] sa Pointer to the IKE SA
Definition at line 50 of file ike_key_exchange.c.
◆ ikeParseDhPublicKey()
error_t ikeParseDhPublicKey | ( | IkeSaEntry * | sa, |
const uint8_t * | p, | ||
size_t | length | ||
) |
Parse peer's Diffie-Hellman public key.
- Parameters
-
[in] sa Pointer to the IKE SA [out] p Pointer the Diffie-Hellman public key [out] length Length of the Diffie-Hellman public key, in bytes
- Returns
- Error code
Definition at line 318 of file ike_key_exchange.c.