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 | sshLoadKexEcdhParams (EcDomainParameters *params, const char_t *kexAlgo) |
Load the EC parameters that match specified key exchange algorithm. 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-2024 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.4.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 751 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 801 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 174 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 221 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 709 of file ssh_kex_ecdh.c.
◆ sshLoadKexEcdhParams()
error_t sshLoadKexEcdhParams | ( | EcDomainParameters * | params, |
const char_t * | kexAlgo | ||
) |
Load the EC parameters that match specified key exchange algorithm.
- Parameters
-
[in,out] params Elliptic curve domain parameters [in] kexAlgo Key exchange algorithm name
- Returns
- Error code
Definition at line 635 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 319 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 576 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 406 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 119 of file ssh_kex_ecdh.c.