Key material generation. More...
#include "ssh/ssh.h"Go to the source code of this file.
| Functions | |
| error_t | sshInitEncryptionEngine (SshConnection *connection, SshEncryptionEngine *encryptionEngine, const char_t *encAlgo, const char_t *macAlgo, uint8_t x) | 
| Initialize encryption engine.  More... | |
| void | sshFreeEncryptionEngine (SshEncryptionEngine *encryptionEngine) | 
| Release encryption engine.  More... | |
| error_t | sshSelectCipherAlgo (SshEncryptionEngine *encryptionEngine, const char_t *encAlgo) | 
| Select the relevant cipher algorithm.  More... | |
| error_t | sshSelectHashAlgo (SshEncryptionEngine *encryptionEngine, const char_t *encAlgo, const char_t *macAlgo) | 
| Select the relevant hash algorithm.  More... | |
| error_t | sshDeriveKey (SshConnection *connection, uint8_t x, uint8_t *output, size_t outputLen) | 
| Key derivation function.  More... | |
| void | sshDumpKey (SshConnection *connection, const char_t *label, const uint8_t *key, size_t keyLen) | 
| Dump secret key (for debugging purpose only)  More... | |
Detailed Description
Key material generation.
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_key_material.h.
Function Documentation
◆ sshDeriveKey()
| error_t sshDeriveKey | ( | SshConnection * | connection, | 
| uint8_t | x, | ||
| uint8_t * | output, | ||
| size_t | outputLen | ||
| ) | 
Key derivation function.
- Parameters
- 
  [in] connection Pointer to the SSH connection [in] x A single character [out] output Pointer to the output [in] outputLen Desired output length 
- Returns
- Error code
Definition at line 1047 of file ssh_key_material.c.
◆ sshDumpKey()
| void sshDumpKey | ( | SshConnection * | connection, | 
| const char_t * | label, | ||
| const uint8_t * | key, | ||
| size_t | keyLen | ||
| ) | 
Dump secret key (for debugging purpose only)
- Parameters
- 
  [in] connection Pointer to the SSH connection [in] label Identifying label (NULL-terminated string) [in] key Pointer to the secret key [in] keyLen Length of the secret key, in bytes 
Definition at line 1135 of file ssh_key_material.c.
◆ sshFreeEncryptionEngine()
| void sshFreeEncryptionEngine | ( | SshEncryptionEngine * | encryptionEngine | ) | 
Release encryption engine.
- Parameters
- 
  [in] encryptionEngine Pointer to the encryption/decryption engine 
Definition at line 218 of file ssh_key_material.c.
◆ sshInitEncryptionEngine()
| error_t sshInitEncryptionEngine | ( | SshConnection * | connection, | 
| SshEncryptionEngine * | encryptionEngine, | ||
| const char_t * | encAlgo, | ||
| const char_t * | macAlgo, | ||
| uint8_t | x | ||
| ) | 
Initialize encryption engine.
- Parameters
- 
  [in] connection Pointer to the SSH connection [in] encryptionEngine Pointer to the encryption/decryption engine to be initialized [in] encAlgo Selected encryption algorithm (NULL-terminated string) [in] macAlgo Selected integrity algorithm (NULL-terminated string) [in] x A single character used to derive keys 
- Returns
- Error code
Definition at line 55 of file ssh_key_material.c.
◆ sshSelectCipherAlgo()
| error_t sshSelectCipherAlgo | ( | SshEncryptionEngine * | encryptionEngine, | 
| const char_t * | encAlgo | ||
| ) | 
Select the relevant cipher algorithm.
- Parameters
- 
  [in] encryptionEngine Pointer to the encryption/decryption engine to be initialized [in] encAlgo Encryption algorithm name 
- Returns
- Error code
Definition at line 260 of file ssh_key_material.c.
◆ sshSelectHashAlgo()
| error_t sshSelectHashAlgo | ( | SshEncryptionEngine * | encryptionEngine, | 
| const char_t * | encAlgo, | ||
| const char_t * | macAlgo | ||
| ) | 
Select the relevant hash algorithm.
- Parameters
- 
  [in] encryptionEngine Pointer to the encryption/decryption engine to be initialized [in] encAlgo Encryption algorithm name [in] macAlgo Integrity algorithm name 
- Returns
- Error code
Definition at line 777 of file ssh_key_material.c.
