ECDH key exchange. More...
#include "ssh/ssh.h"Go to the source code of this file.
| Functions | |
| error_t | sshSendKexEcdhInit (SshConnection *connection) | 
| Send SSH_MSG_KEX_ECDH_INIT message.  More... | |
| error_t | sshSendKexEcdhReply (SshConnection *connection) | 
| Send SSH_MSG_KEX_ECDH_REPLY message.  More... | |
| error_t | sshFormatKexEcdhReply (SshConnection *connection, uint8_t *p, size_t *length) | 
| Format SSH_MSG_KEX_ECDH_REPLY message.  More... | |
| error_t | sshFormatKexEcdhInit (SshConnection *connection, uint8_t *p, size_t *length) | 
| Format SSH_MSG_KEX_ECDH_INIT message.  More... | |
| error_t | sshParseKexEcdhInit (SshConnection *connection, const uint8_t *message, size_t length) | 
| Parse SSH_MSG_KEX_ECDH_INIT message.  More... | |
| error_t | sshParseKexEcdhReply (SshConnection *connection, const uint8_t *message, size_t length) | 
| Parse SSH_MSG_KEX_ECDH_REPLY message.  More... | |
| error_t | sshParseKexEcdhMessage (SshConnection *connection, uint8_t type, const uint8_t *message, size_t length) | 
| Parse ECDH specific messages.  More... | |
| error_t | sshSelectEcdhCurve (SshConnection *connection) | 
| Select ECDH domain parameters.  More... | |
| error_t | sshGenerateEcdhKeyPair (SshConnection *connection) | 
| ECDH key pair generation.  More... | |
| error_t | sshComputeEcdhSharedSecret (SshConnection *connection) | 
| ECDH shared secret calculation.  More... | |
| error_t | sshDigestClientEcdhPublicKey (SshConnection *connection) | 
| Update exchange hash with client's ephemeral public key.  More... | |
Detailed Description
ECDH key exchange.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2019-2025 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneSSH 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.5.4
Definition in file ssh_kex_ecdh.h.
Function Documentation
◆ sshComputeEcdhSharedSecret()
| error_t sshComputeEcdhSharedSecret | ( | SshConnection * | connection | ) | 
ECDH shared secret calculation.
- Parameters
- 
  [in] connection Pointer to the SSH connection 
- Returns
- Error code
Definition at line 734 of file ssh_kex_ecdh.c.
◆ sshDigestClientEcdhPublicKey()
| error_t sshDigestClientEcdhPublicKey | ( | SshConnection * | connection | ) | 
Update exchange hash with client's ephemeral public key.
- Parameters
- 
  [in] connection Pointer to the SSH connection 
- Returns
- Error code
Definition at line 784 of file ssh_kex_ecdh.c.
◆ sshFormatKexEcdhInit()
| error_t sshFormatKexEcdhInit | ( | SshConnection * | connection, | 
| uint8_t * | p, | ||
| size_t * | length | ||
| ) | 
Format SSH_MSG_KEX_ECDH_INIT message.
- Parameters
- 
  [in] connection Pointer to the SSH connection [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes 
- Returns
- Error code
Definition at line 173 of file ssh_kex_ecdh.c.
◆ sshFormatKexEcdhReply()
| error_t sshFormatKexEcdhReply | ( | SshConnection * | connection, | 
| uint8_t * | p, | ||
| size_t * | length | ||
| ) | 
Format SSH_MSG_KEX_ECDH_REPLY message.
- Parameters
- 
  [in] connection Pointer to the SSH connection [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes 
- Returns
- Error code
Definition at line 220 of file ssh_kex_ecdh.c.
◆ sshGenerateEcdhKeyPair()
| error_t sshGenerateEcdhKeyPair | ( | SshConnection * | connection | ) | 
ECDH key pair generation.
- Parameters
- 
  [in] connection Pointer to the SSH connection 
- Returns
- Error code
Definition at line 692 of file ssh_kex_ecdh.c.
◆ sshParseKexEcdhInit()
| error_t sshParseKexEcdhInit | ( | SshConnection * | connection, | 
| const uint8_t * | message, | ||
| size_t | length | ||
| ) | 
Parse SSH_MSG_KEX_ECDH_INIT message.
- Parameters
- 
  [in] connection Pointer to the SSH connection [in] message Pointer to message [in] length Length of the message, in bytes 
- Returns
- Error code
Definition at line 318 of file ssh_kex_ecdh.c.
◆ sshParseKexEcdhMessage()
| error_t sshParseKexEcdhMessage | ( | SshConnection * | connection, | 
| uint8_t | type, | ||
| const uint8_t * | message, | ||
| size_t | length | ||
| ) | 
Parse ECDH specific messages.
- Parameters
- 
  [in] connection Pointer to the SSH connection [in] type SSH message type [in] message Pointer to message [in] length Length of the message, in bytes 
- Returns
- Error code
Definition at line 560 of file ssh_kex_ecdh.c.
◆ sshParseKexEcdhReply()
| error_t sshParseKexEcdhReply | ( | SshConnection * | connection, | 
| const uint8_t * | message, | ||
| size_t | length | ||
| ) | 
Parse SSH_MSG_KEX_ECDH_REPLY message.
- Parameters
- 
  [in] connection Pointer to the SSH connection [in] message Pointer to message [in] length Length of the message, in bytes 
- Returns
- Error code
Definition at line 397 of file ssh_kex_ecdh.c.
◆ sshSelectEcdhCurve()
| error_t sshSelectEcdhCurve | ( | SshConnection * | connection | ) | 
Select ECDH domain parameters.
- Parameters
- 
  [in] connection Pointer to the SSH connection 
- Returns
- Error code
Definition at line 618 of file ssh_kex_ecdh.c.
◆ sshSendKexEcdhInit()
| error_t sshSendKexEcdhInit | ( | SshConnection * | connection | ) | 
Send SSH_MSG_KEX_ECDH_INIT message.
- Parameters
- 
  [in] connection Pointer to the SSH connection 
- Returns
- Error code
Definition at line 58 of file ssh_kex_ecdh.c.
◆ sshSendKexEcdhReply()
| error_t sshSendKexEcdhReply | ( | SshConnection * | connection | ) | 
Send SSH_MSG_KEX_ECDH_REPLY message.
- Parameters
- 
  [in] connection Pointer to the SSH connection 
- Returns
- Error code
Definition at line 118 of file ssh_kex_ecdh.c.
