RSA/DSA/ECDSA/EdDSA signature generation. More...
#include "tls.h"
Go to the source code of this file.
Functions | |
error_t | tlsGenerateSignature (TlsContext *context, uint8_t *p, size_t *length) |
Digital signature generation (TLS 1.0 or TLS 1.1) More... | |
error_t | tls12GenerateSignature (TlsContext *context, uint8_t *p, size_t *length) |
Digital signature generation (TLS 1.2) More... | |
error_t | tlsGenerateRsaSignature (const RsaPrivateKey *key, const uint8_t *digest, uint8_t *signature, size_t *signatureLen) |
Generate RSA signature (TLS 1.0 and TLS 1.1) More... | |
error_t | tlsGenerateRsaPkcs1Signature (TlsContext *context, const HashAlgo *hashAlgo, const uint8_t *digest, uint8_t *signature, size_t *signatureLen) |
Generate RSA signature (TLS 1.2) More... | |
error_t | tlsGenerateRsaPssSignature (TlsContext *context, const HashAlgo *hashAlgo, const uint8_t *digest, uint8_t *signature, size_t *signatureLen) |
Generate RSA-PSS signature. More... | |
error_t | tlsGenerateDsaSignature (TlsContext *context, const uint8_t *digest, size_t digestLen, uint8_t *signature, size_t *signatureLen) |
Generate DSA signature. More... | |
error_t | tlsGenerateEcdsaSignature (TlsContext *context, const uint8_t *digest, size_t digestLen, uint8_t *signature, size_t *signatureLen) |
Generate ECDSA signature. More... | |
error_t | tlsGenerateEd25519Signature (TlsContext *context, const DataChunk *messageChunks, uint8_t *signature, size_t *signatureLen) |
Generate Ed25519 signature. More... | |
error_t | tlsGenerateEd448Signature (TlsContext *context, const DataChunk *messageChunks, uint8_t *signature, size_t *signatureLen) |
Generate Ed448 signature. More... | |
Detailed Description
RSA/DSA/ECDSA/EdDSA signature generation.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneSSL 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 tls_sign_generate.h.
Function Documentation
◆ tls12GenerateSignature()
error_t tls12GenerateSignature | ( | TlsContext * | context, |
uint8_t * | p, | ||
size_t * | length | ||
) |
Digital signature generation (TLS 1.2)
- Parameters
-
[in] context Pointer to the TLS context [out] p Buffer where to store the digitally-signed element [out] length Length of the digitally-signed element
- Returns
- Error code
Definition at line 183 of file tls_sign_generate.c.
◆ tlsGenerateDsaSignature()
error_t tlsGenerateDsaSignature | ( | TlsContext * | context, |
const uint8_t * | digest, | ||
size_t | digestLen, | ||
uint8_t * | signature, | ||
size_t * | signatureLen | ||
) |
Generate DSA signature.
- Parameters
-
[in] context Pointer to the TLS context [in] digest Digest of the message to be signed [in] digestLen Length in octets of the digest [out] signature Resulting signature [out] signatureLen Length of the resulting signature
- Returns
- Error code
Definition at line 542 of file tls_sign_generate.c.
◆ tlsGenerateEcdsaSignature()
error_t tlsGenerateEcdsaSignature | ( | TlsContext * | context, |
const uint8_t * | digest, | ||
size_t | digestLen, | ||
uint8_t * | signature, | ||
size_t * | signatureLen | ||
) |
Generate ECDSA signature.
- Parameters
-
[in] context Pointer to the TLS context [in] digest Digest of the message to be signed [in] digestLen Length in octets of the digest [out] signature Resulting signature [out] signatureLen Length of the resulting signature
- Returns
- Error code
Definition at line 597 of file tls_sign_generate.c.
◆ tlsGenerateEd25519Signature()
error_t tlsGenerateEd25519Signature | ( | TlsContext * | context, |
const DataChunk * | messageChunks, | ||
uint8_t * | signature, | ||
size_t * | signatureLen | ||
) |
Generate Ed25519 signature.
- Parameters
-
[in] context Pointer to the TLS context [in] messageChunks Array of data chunks representing the message to be signed [out] signature Resulting signature [out] signatureLen Length of the resulting signature
- Returns
- Error code
Definition at line 679 of file tls_sign_generate.c.
◆ tlsGenerateEd448Signature()
error_t tlsGenerateEd448Signature | ( | TlsContext * | context, |
const DataChunk * | messageChunks, | ||
uint8_t * | signature, | ||
size_t * | signatureLen | ||
) |
Generate Ed448 signature.
- Parameters
-
[in] context Pointer to the TLS context [in] messageChunks Array of data chunks representing the message to be signed [out] signature Resulting signature [out] signatureLen Length of the resulting signature
- Returns
- Error code
Definition at line 741 of file tls_sign_generate.c.
◆ tlsGenerateRsaPkcs1Signature()
error_t tlsGenerateRsaPkcs1Signature | ( | TlsContext * | context, |
const HashAlgo * | hashAlgo, | ||
const uint8_t * | digest, | ||
uint8_t * | signature, | ||
size_t * | signatureLen | ||
) |
Generate RSA signature (TLS 1.2)
- Parameters
-
[in] context Pointer to the TLS context [in] hashAlgo Hash function used to digest the message [in] digest Digest of the message to be signed [out] signature Resulting signature [out] signatureLen Length of the resulting signature
- Returns
- Error code
Definition at line 451 of file tls_sign_generate.c.
◆ tlsGenerateRsaPssSignature()
error_t tlsGenerateRsaPssSignature | ( | TlsContext * | context, |
const HashAlgo * | hashAlgo, | ||
const uint8_t * | digest, | ||
uint8_t * | signature, | ||
size_t * | signatureLen | ||
) |
Generate RSA-PSS signature.
- Parameters
-
[in] context Pointer to the TLS context [in] hashAlgo Hash function used to digest the message [in] digest Digest of the message to be signed [out] signature Resulting signature [out] signatureLen Length of the resulting signature
- Returns
- Error code
Definition at line 496 of file tls_sign_generate.c.
◆ tlsGenerateRsaSignature()
error_t tlsGenerateRsaSignature | ( | const RsaPrivateKey * | key, |
const uint8_t * | digest, | ||
uint8_t * | signature, | ||
size_t * | signatureLen | ||
) |
Generate RSA signature (TLS 1.0 and TLS 1.1)
- Parameters
-
[in] key Signer's RSA private key [in] digest Digest of the message to be signed [out] signature Resulting signature [out] signatureLen Length of the resulting signature
- Returns
- Error code
Definition at line 330 of file tls_sign_generate.c.
◆ tlsGenerateSignature()
error_t tlsGenerateSignature | ( | TlsContext * | context, |
uint8_t * | p, | ||
size_t * | length | ||
) |
Digital signature generation (TLS 1.0 or TLS 1.1)
- Parameters
-
[in] context Pointer to the TLS context [out] p Buffer where to store the digitally-signed element [out] length Length of the digitally-signed element
- Returns
- Error code
Definition at line 59 of file tls_sign_generate.c.