tls13_sign_verify.c File Reference

RSA/DSA/ECDSA/SM2/EdDSA signature verification (TLS 1.3) More...

#include "tls.h"
#include "tls_sign_verify.h"
#include "tls_sign_misc.h"
#include "tls_transcript_hash.h"
#include "tls_misc.h"
#include "tls13_sign_verify.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   TLS_TRACE_LEVEL
 

Functions

error_t tls13VerifySignature (TlsContext *context, const uint8_t *p, size_t length)
 Digital signature verification (TLS 1.3) More...
 
error_t tls13VerifyRsaPssSignature (TlsContext *context, const uint8_t *message, size_t length, const Tls13DigitalSignature *signature)
 RSA-PSS signature verification (TLS 1.3) More...
 
error_t tls13VerifyEcdsaSignature (TlsContext *context, const uint8_t *message, size_t length, const Tls13DigitalSignature *signature)
 ECDSA signature verification (TLS 1.3) More...
 
error_t tls13VerifySm2Signature (TlsContext *context, const uint8_t *message, size_t length, const Tls13DigitalSignature *signature)
 SM2 signature verification (TLS 1.3) More...
 
error_t tls13VerifyEd25519Signature (TlsContext *context, const uint8_t *message, size_t length, const Tls13DigitalSignature *signature)
 Ed25519 signature verification (TLS 1.3) More...
 
error_t tls13VerifyEd448Signature (TlsContext *context, const uint8_t *message, size_t length, const Tls13DigitalSignature *signature)
 Ed448 signature verification (TLS 1.3) More...
 

Detailed Description

RSA/DSA/ECDSA/SM2/EdDSA signature verification (TLS 1.3)

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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file tls13_sign_verify.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   TLS_TRACE_LEVEL

Definition at line 32 of file tls13_sign_verify.c.

Function Documentation

◆ tls13VerifyEcdsaSignature()

error_t tls13VerifyEcdsaSignature ( TlsContext context,
const uint8_t *  message,
size_t  length,
const Tls13DigitalSignature signature 
)

ECDSA signature verification (TLS 1.3)

Parameters
[in]contextPointer to the TLS context
[in]messageMessage whose signature is to be verified
[in]lengthLength of the message, in bytes
[in]signaturePointer to the digital signature to be verified
Returns
Error code

Definition at line 311 of file tls13_sign_verify.c.

◆ tls13VerifyEd25519Signature()

error_t tls13VerifyEd25519Signature ( TlsContext context,
const uint8_t *  message,
size_t  length,
const Tls13DigitalSignature signature 
)

Ed25519 signature verification (TLS 1.3)

Parameters
[in]contextPointer to the TLS context
[in]messageMessage whose signature is to be verified
[in]lengthLength of the message, in bytes
[in]signaturePointer to the digital signature to be verified
Returns
Error code

Definition at line 470 of file tls13_sign_verify.c.

◆ tls13VerifyEd448Signature()

error_t tls13VerifyEd448Signature ( TlsContext context,
const uint8_t *  message,
size_t  length,
const Tls13DigitalSignature signature 
)

Ed448 signature verification (TLS 1.3)

Parameters
[in]contextPointer to the TLS context
[in]messageMessage whose signature is to be verified
[in]lengthLength of the message, in bytes
[in]signaturePointer to the digital signature to be verified
Returns
Error code

Definition at line 515 of file tls13_sign_verify.c.

◆ tls13VerifyRsaPssSignature()

error_t tls13VerifyRsaPssSignature ( TlsContext context,
const uint8_t *  message,
size_t  length,
const Tls13DigitalSignature signature 
)

RSA-PSS signature verification (TLS 1.3)

Parameters
[in]contextPointer to the TLS context
[in]messageMessage whose signature is to be verified
[in]lengthLength of the message, in bytes
[in]signaturePointer to the digital signature to be verified
Returns
Error code

Definition at line 207 of file tls13_sign_verify.c.

◆ tls13VerifySignature()

error_t tls13VerifySignature ( TlsContext context,
const uint8_t *  p,
size_t  length 
)

Digital signature verification (TLS 1.3)

Parameters
[in]contextPointer to the TLS context
[in]pPointer to the digitally-signed element to be verified
[in]lengthLength of the digitally-signed element
Returns
Error code

Definition at line 55 of file tls13_sign_verify.c.

◆ tls13VerifySm2Signature()

error_t tls13VerifySm2Signature ( TlsContext context,
const uint8_t *  message,
size_t  length,
const Tls13DigitalSignature signature 
)

SM2 signature verification (TLS 1.3)

Parameters
[in]contextPointer to the TLS context
[in]messageMessage whose signature is to be verified
[in]lengthLength of the message, in bytes
[in]signaturePointer to the digital signature to be verified
Returns
Error code

Definition at line 416 of file tls13_sign_verify.c.