RSA/DSA/ECDSA/EdDSA signature verification. More...
#include "core/crypto.h"
#include "pkix/x509_key_parse.h"
#include "pkix/x509_sign_verify.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Functions | |
error_t | x509RegisterSignVerifyCallback (X509SignVerifyCallback callback) |
Register signature verification callback function. More... | |
error_t | x509VerifySignature (const X509OctetString *tbsData, const X509SignAlgoId *signAlgoId, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature) |
Certificate signature verification. More... | |
error_t | x509VerifyRsaSignature (const X509OctetString *tbsData, const HashAlgo *hashAlgo, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature) |
RSA signature verification. More... | |
error_t | x509VerifyRsaPssSignature (const X509OctetString *tbsData, const HashAlgo *hashAlgo, size_t saltLen, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature) |
RSA-PSS signature verification. More... | |
error_t | x509VerifyDsaSignature (const X509OctetString *tbsData, const HashAlgo *hashAlgo, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature) |
DSA signature verification. More... | |
error_t | x509VerifyEcdsaSignature (const X509OctetString *tbsData, const HashAlgo *hashAlgo, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature) |
ECDSA signature verification. More... | |
error_t | x509VerifySm2Signature (const X509OctetString *tbsData, const HashAlgo *hashAlgo, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature) |
SM2 signature verification. More... | |
error_t | x509VerifyEd25519Signature (const X509OctetString *tbsData, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature) |
Ed25519 signature verification. More... | |
error_t | x509VerifyEd448Signature (const X509OctetString *tbsData, const X509SubjectPublicKeyInfo *publicKeyInfo, const X509OctetString *signature) |
Ed448 signature verification. More... | |
Detailed Description
RSA/DSA/ECDSA/EdDSA signature verification.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO 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 x509_sign_verify.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Definition at line 32 of file x509_sign_verify.c.
Function Documentation
◆ x509RegisterSignVerifyCallback()
error_t x509RegisterSignVerifyCallback | ( | X509SignVerifyCallback | callback | ) |
Register signature verification callback function.
- Parameters
-
[in] callback Signature verification callback function
- Returns
- Error code
Definition at line 55 of file x509_sign_verify.c.
◆ x509VerifyDsaSignature()
error_t x509VerifyDsaSignature | ( | const X509OctetString * | tbsData, |
const HashAlgo * | hashAlgo, | ||
const X509SubjectPublicKeyInfo * | publicKeyInfo, | ||
const X509OctetString * | signature | ||
) |
DSA signature verification.
- Parameters
-
[in] tbsData Data whose signature is to be verified [in] hashAlgo Underlying hash function [in] publicKeyInfo Issuer's public key [in] signature Signature to be verified
- Returns
- Error code
Definition at line 337 of file x509_sign_verify.c.
◆ x509VerifyEcdsaSignature()
error_t x509VerifyEcdsaSignature | ( | const X509OctetString * | tbsData, |
const HashAlgo * | hashAlgo, | ||
const X509SubjectPublicKeyInfo * | publicKeyInfo, | ||
const X509OctetString * | signature | ||
) |
ECDSA signature verification.
- Parameters
-
[in] tbsData Data whose signature is to be verified [in] hashAlgo Underlying hash function [in] publicKeyInfo Issuer's public key [in] signature Signature to be verified
- Returns
- Error code
Definition at line 415 of file x509_sign_verify.c.
◆ x509VerifyEd25519Signature()
error_t x509VerifyEd25519Signature | ( | const X509OctetString * | tbsData, |
const X509SubjectPublicKeyInfo * | publicKeyInfo, | ||
const X509OctetString * | signature | ||
) |
Ed25519 signature verification.
- Parameters
-
[in] tbsData Data whose signature is to be verified [in] publicKeyInfo Issuer's public key [in] signature Signature to be verified
- Returns
- Error code
Definition at line 573 of file x509_sign_verify.c.
◆ x509VerifyEd448Signature()
error_t x509VerifyEd448Signature | ( | const X509OctetString * | tbsData, |
const X509SubjectPublicKeyInfo * | publicKeyInfo, | ||
const X509OctetString * | signature | ||
) |
Ed448 signature verification.
- Parameters
-
[in] tbsData Data whose signature is to be verified [in] publicKeyInfo Issuer's public key [in] signature Signature to be verified
- Returns
- Error code
Definition at line 619 of file x509_sign_verify.c.
◆ x509VerifyRsaPssSignature()
error_t x509VerifyRsaPssSignature | ( | const X509OctetString * | tbsData, |
const HashAlgo * | hashAlgo, | ||
size_t | saltLen, | ||
const X509SubjectPublicKeyInfo * | publicKeyInfo, | ||
const X509OctetString * | signature | ||
) |
RSA-PSS signature verification.
- Parameters
-
[in] tbsData Data whose signature is to be verified [in] hashAlgo Underlying hash function [in] saltLen Length of the salt, in bytes [in] publicKeyInfo Issuer's public key [in] signature Signature to be verified
- Returns
- Error code
Definition at line 270 of file x509_sign_verify.c.
◆ x509VerifyRsaSignature()
error_t x509VerifyRsaSignature | ( | const X509OctetString * | tbsData, |
const HashAlgo * | hashAlgo, | ||
const X509SubjectPublicKeyInfo * | publicKeyInfo, | ||
const X509OctetString * | signature | ||
) |
RSA signature verification.
- Parameters
-
[in] tbsData Data whose signature is to be verified [in] hashAlgo Underlying hash function [in] publicKeyInfo Issuer's public key [in] signature Signature to be verified
- Returns
- Error code
Definition at line 203 of file x509_sign_verify.c.
◆ x509VerifySignature()
error_t x509VerifySignature | ( | const X509OctetString * | tbsData, |
const X509SignAlgoId * | signAlgoId, | ||
const X509SubjectPublicKeyInfo * | publicKeyInfo, | ||
const X509OctetString * | signature | ||
) |
Certificate signature verification.
- Parameters
-
[in] tbsData Data whose signature is to be verified [in] signAlgoId Signature algorithm identifier [in] publicKeyInfo Issuer's public key [in] signature Signature to be verified
- Returns
- Error code
Definition at line 78 of file x509_sign_verify.c.
◆ x509VerifySm2Signature()
error_t x509VerifySm2Signature | ( | const X509OctetString * | tbsData, |
const HashAlgo * | hashAlgo, | ||
const X509SubjectPublicKeyInfo * | publicKeyInfo, | ||
const X509OctetString * | signature | ||
) |
SM2 signature verification.
- Parameters
-
[in] tbsData Data whose signature is to be verified [in] hashAlgo Underlying hash function [in] publicKeyInfo Issuer's public key [in] signature Signature to be verified
- Returns
- Error code
Definition at line 505 of file x509_sign_verify.c.