RSA/DSA/ECDSA/EdDSA signature generation. More...
#include "ssh/ssh.h"
#include "ssh/ssh_algorithms.h"
#include "ssh/ssh_key_import.h"
#include "ssh/ssh_sign_generate.h"
#include "ssh/ssh_sign_misc.h"
#include "ssh/ssh_misc.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL SSH_TRACE_LEVEL |
Functions | |
error_t | sshGenerateSignature (SshConnection *connection, const char_t *publicKeyAlgo, const SshHostKey *hostKey, const SshBinaryString *sessionId, const SshBinaryString *message, uint8_t *p, size_t *written) |
Signature generation. More... | |
error_t | sshGenerateRsaSignature (SshConnection *connection, const char_t *publicKeyAlgo, const SshHostKey *hostKey, const SshBinaryString *sessionId, const SshBinaryString *message, uint8_t *p, size_t *written) |
RSA signature generation. More... | |
error_t | sshGenerateDsaSignature (SshConnection *connection, const char_t *publicKeyAlgo, const SshHostKey *hostKey, const SshBinaryString *sessionId, const SshBinaryString *message, uint8_t *p, size_t *written) |
DSA signature generation. More... | |
error_t | sshGenerateEcdsaSignature (SshConnection *connection, const char_t *publicKeyAlgo, const SshHostKey *hostKey, const SshBinaryString *sessionId, const SshBinaryString *message, uint8_t *p, size_t *written) |
ECDSA signature generation. More... | |
error_t | sshGenerateEd25519Signature (SshConnection *connection, const char_t *publicKeyAlgo, const SshHostKey *hostKey, const SshBinaryString *sessionId, const SshBinaryString *message, uint8_t *p, size_t *written) |
Ed25519 signature generation. More... | |
error_t | sshGenerateEd448Signature (SshConnection *connection, const char_t *publicKeyAlgo, const SshHostKey *hostKey, const SshBinaryString *sessionId, const SshBinaryString *message, uint8_t *p, size_t *written) |
Ed448 signature generation. More... | |
Detailed Description
RSA/DSA/ECDSA/EdDSA signature generation.
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_sign_generate.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL SSH_TRACE_LEVEL |
Definition at line 32 of file ssh_sign_generate.c.
Function Documentation
◆ sshGenerateDsaSignature()
error_t sshGenerateDsaSignature | ( | SshConnection * | connection, |
const char_t * | publicKeyAlgo, | ||
const SshHostKey * | hostKey, | ||
const SshBinaryString * | sessionId, | ||
const SshBinaryString * | message, | ||
uint8_t * | p, | ||
size_t * | written | ||
) |
DSA signature generation.
- Parameters
-
[in] connection Pointer to the SSH connection [in] publicKeyAlgo Public key algorithm [in] hostKey Pointer to the signer's host key [in] sessionId Session identifier (optional parameter) [in] message Pointer to the message to be signed [out] p Output stream where to write the signature [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 330 of file ssh_sign_generate.c.
◆ sshGenerateEcdsaSignature()
error_t sshGenerateEcdsaSignature | ( | SshConnection * | connection, |
const char_t * | publicKeyAlgo, | ||
const SshHostKey * | hostKey, | ||
const SshBinaryString * | sessionId, | ||
const SshBinaryString * | message, | ||
uint8_t * | p, | ||
size_t * | written | ||
) |
ECDSA signature generation.
- Parameters
-
[in] connection Pointer to the SSH connection [in] publicKeyAlgo Public key algorithm [in] hostKey Pointer to the signer's host key [in] sessionId Session identifier (optional parameter) [in] message Pointer to the message to be signed [out] p Output stream where to write the signature [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 440 of file ssh_sign_generate.c.
◆ sshGenerateEd25519Signature()
error_t sshGenerateEd25519Signature | ( | SshConnection * | connection, |
const char_t * | publicKeyAlgo, | ||
const SshHostKey * | hostKey, | ||
const SshBinaryString * | sessionId, | ||
const SshBinaryString * | message, | ||
uint8_t * | p, | ||
size_t * | written | ||
) |
Ed25519 signature generation.
- Parameters
-
[in] connection Pointer to the SSH connection [in] publicKeyAlgo Public key algorithm [in] hostKey Pointer to the signer's host key [in] sessionId Session identifier (optional parameter) [in] message Pointer to the message to be signed [out] p Output stream where to write the signature [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 605 of file ssh_sign_generate.c.
◆ sshGenerateEd448Signature()
error_t sshGenerateEd448Signature | ( | SshConnection * | connection, |
const char_t * | publicKeyAlgo, | ||
const SshHostKey * | hostKey, | ||
const SshBinaryString * | sessionId, | ||
const SshBinaryString * | message, | ||
uint8_t * | p, | ||
size_t * | written | ||
) |
Ed448 signature generation.
- Parameters
-
[in] connection Pointer to the SSH connection [in] publicKeyAlgo Public key algorithm [in] hostKey Pointer to the signer's host key [in] sessionId Session identifier (optional parameter) [in] message Pointer to the message to be signed [out] p Output stream where to write the signature [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 704 of file ssh_sign_generate.c.
◆ sshGenerateRsaSignature()
error_t sshGenerateRsaSignature | ( | SshConnection * | connection, |
const char_t * | publicKeyAlgo, | ||
const SshHostKey * | hostKey, | ||
const SshBinaryString * | sessionId, | ||
const SshBinaryString * | message, | ||
uint8_t * | p, | ||
size_t * | written | ||
) |
RSA signature generation.
- Parameters
-
[in] connection Pointer to the SSH connection [in] publicKeyAlgo Public key algorithm [in] hostKey Pointer to the signer's host key [in] sessionId Session identifier (optional parameter) [in] message Pointer to the message to be signed [out] p Output stream where to write the signature [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 205 of file ssh_sign_generate.c.
◆ sshGenerateSignature()
error_t sshGenerateSignature | ( | SshConnection * | connection, |
const char_t * | publicKeyAlgo, | ||
const SshHostKey * | hostKey, | ||
const SshBinaryString * | sessionId, | ||
const SshBinaryString * | message, | ||
uint8_t * | p, | ||
size_t * | written | ||
) |
Signature generation.
- Parameters
-
[in] connection Pointer to the SSH connection [in] publicKeyAlgo Public key algorithm [in] hostKey Pointer to the signer's host key [in] sessionId Session identifier (optional parameter) [in] message Pointer to the message to be signed [out] p Output stream where to write the signature [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 59 of file ssh_sign_generate.c.