ike_sign_verify.h File Reference

RSA/DSA/ECDSA/EdDSA signature verification. More...

#include "ike/ike.h"
#include "ike/ike_sign_misc.h"
#include "pkix/x509_common.h"

Go to the source code of this file.

Functions

error_t ikeVerifySignature (IkeSaEntry *sa, const uint8_t *id, size_t idLen, uint8_t authMethod, const X509SubjectPublicKeyInfo *publicKeyInfo, const uint8_t *signature, size_t signatureLen)
 Signature verification. More...
 
error_t ikeVerifyDigitalSignature (IkeSaEntry *sa, const uint8_t *id, size_t idLen, const X509SubjectPublicKeyInfo *publicKeyInfo, const IkeAuthData *authData, size_t authDataLen)
 Digital signature verification. More...
 
error_t ikeVerifyRsaSignature (IkeSaEntry *sa, const uint8_t *id, size_t idLen, const X509SubjectPublicKeyInfo *publicKeyInfo, const HashAlgo *hashAlgo, const uint8_t *signature, size_t signatureLen)
 RSA signature verification. More...
 
error_t ikeVerifyRsaPssSignature (IkeSaEntry *sa, const uint8_t *id, size_t idLen, const X509SubjectPublicKeyInfo *publicKeyInfo, const HashAlgo *hashAlgo, size_t saltLen, const uint8_t *signature, size_t signatureLen)
 RSA-PSS signature verification. More...
 
error_t ikeVerifyDsaSignature (IkeSaEntry *sa, const uint8_t *id, size_t idLen, const X509SubjectPublicKeyInfo *publicKeyInfo, const HashAlgo *hashAlgo, const uint8_t *signature, size_t signatureLen, IkeSignFormat format)
 DSA signature verification. More...
 
error_t ikeVerifyEcdsaSignature (IkeSaEntry *sa, const uint8_t *id, size_t idLen, const X509SubjectPublicKeyInfo *publicKeyInfo, const EcCurveInfo *group, const HashAlgo *hashAlgo, const uint8_t *signature, size_t signatureLen, IkeSignFormat format)
 ECDSA signature verification. More...
 
error_t ikeVerifyEd25519Signature (IkeSaEntry *sa, const uint8_t *id, size_t idLen, const X509SubjectPublicKeyInfo *publicKeyInfo, const uint8_t *signature, size_t signatureLen)
 Ed25519 signature verification. More...
 
error_t ikeVerifyEd448Signature (IkeSaEntry *sa, const uint8_t *id, size_t idLen, const X509SubjectPublicKeyInfo *publicKeyInfo, const uint8_t *signature, size_t signatureLen)
 Ed448 signature verification. More...
 

Detailed Description

RSA/DSA/ECDSA/EdDSA signature verification.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2022-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneIPSEC 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 ike_sign_verify.h.

Function Documentation

◆ ikeVerifyDigitalSignature()

error_t ikeVerifyDigitalSignature ( IkeSaEntry sa,
const uint8_t *  id,
size_t  idLen,
const X509SubjectPublicKeyInfo publicKeyInfo,
const IkeAuthData authData,
size_t  authDataLen 
)

Digital signature verification.

Parameters
[in]saPointer to the IKE SA
[in]idPointer to the identification data
[in]idLenLength of the identification data, in bytes
[in]publicKeyInfoPointer to the subject's public key
[in]authDataPointer to the authentication data
[in]authDataLenLength of the authentication data, in bytes
Returns
Error code

Definition at line 154 of file ike_sign_verify.c.

◆ ikeVerifyDsaSignature()

error_t ikeVerifyDsaSignature ( IkeSaEntry sa,
const uint8_t *  id,
size_t  idLen,
const X509SubjectPublicKeyInfo publicKeyInfo,
const HashAlgo hashAlgo,
const uint8_t *  signature,
size_t  signatureLen,
IkeSignFormat  format 
)

DSA signature verification.

Parameters
[in]saPointer to the IKE SA
[in]idPointer to the identification data
[in]idLenLength of the identification data, in bytes
[in]publicKeyInfoPointer to the subject's public key
[in]hashAlgoHash algorithm
[in]signatureSignature to be verified
[in]signatureLenLength of the signature, in bytes
[in]formatSignature format (raw or ASN.1)
Returns
Error code

Definition at line 461 of file ike_sign_verify.c.

◆ ikeVerifyEcdsaSignature()

error_t ikeVerifyEcdsaSignature ( IkeSaEntry sa,
const uint8_t *  id,
size_t  idLen,
const X509SubjectPublicKeyInfo publicKeyInfo,
const EcCurveInfo group,
const HashAlgo hashAlgo,
const uint8_t *  signature,
size_t  signatureLen,
IkeSignFormat  format 
)

ECDSA signature verification.

Parameters
[in]saPointer to the IKE SA
[in]idPointer to the identification data
[in]idLenLength of the identification data, in bytes
[in]publicKeyInfoPointer to the subject's public key
[in]groupElliptic curve group
[in]hashAlgoHash algorithm
[in]signatureSignature to be verified
[in]signatureLenLength of the signature, in bytes
[in]formatSignature format (raw or ASN.1)
Returns
Error code

Definition at line 556 of file ike_sign_verify.c.

◆ ikeVerifyEd25519Signature()

error_t ikeVerifyEd25519Signature ( IkeSaEntry sa,
const uint8_t *  id,
size_t  idLen,
const X509SubjectPublicKeyInfo publicKeyInfo,
const uint8_t *  signature,
size_t  signatureLen 
)

Ed25519 signature verification.

Parameters
[in]saPointer to the IKE SA
[in]idPointer to the identification data
[in]idLenLength of the identification data, in bytes
[in]publicKeyInfoPointer to the subject's public key
[in]signatureSignature to be verified
[in]signatureLenLength of the signature, in bytes
Returns
Error code

Definition at line 658 of file ike_sign_verify.c.

◆ ikeVerifyEd448Signature()

error_t ikeVerifyEd448Signature ( IkeSaEntry sa,
const uint8_t *  id,
size_t  idLen,
const X509SubjectPublicKeyInfo publicKeyInfo,
const uint8_t *  signature,
size_t  signatureLen 
)

Ed448 signature verification.

Parameters
[in]saPointer to the IKE SA
[in]idPointer to the identification data
[in]idLenLength of the identification data, in bytes
[in]publicKeyInfoPointer to the subject's public key
[in]signatureSignature to be verified
[in]signatureLenLength of the signature, in bytes
Returns
Error code

Definition at line 729 of file ike_sign_verify.c.

◆ ikeVerifyRsaPssSignature()

error_t ikeVerifyRsaPssSignature ( IkeSaEntry sa,
const uint8_t *  id,
size_t  idLen,
const X509SubjectPublicKeyInfo publicKeyInfo,
const HashAlgo hashAlgo,
size_t  saltLen,
const uint8_t *  signature,
size_t  signatureLen 
)

RSA-PSS signature verification.

Parameters
[in]saPointer to the IKE SA
[in]idPointer to the identification data
[in]idLenLength of the identification data, in bytes
[in]publicKeyInfoPointer to the subject's public key
[in]hashAlgoHash algorithm
[in]saltLenLength of the salt, in bytes
[in]signatureSignature to be verified
[in]signatureLenLength of the signature, in bytes
Returns
Error code

Definition at line 373 of file ike_sign_verify.c.

◆ ikeVerifyRsaSignature()

error_t ikeVerifyRsaSignature ( IkeSaEntry sa,
const uint8_t *  id,
size_t  idLen,
const X509SubjectPublicKeyInfo publicKeyInfo,
const HashAlgo hashAlgo,
const uint8_t *  signature,
size_t  signatureLen 
)

RSA signature verification.

Parameters
[in]saPointer to the IKE SA
[in]idPointer to the identification data
[in]idLenLength of the identification data, in bytes
[in]publicKeyInfoPointer to the subject's public key
[in]hashAlgoHash algorithm
[in]signatureSignature to be verified
[in]signatureLenLength of the signature, in bytes
Returns
Error code

Definition at line 292 of file ike_sign_verify.c.

◆ ikeVerifySignature()

error_t ikeVerifySignature ( IkeSaEntry sa,
const uint8_t *  id,
size_t  idLen,
uint8_t  authMethod,
const X509SubjectPublicKeyInfo publicKeyInfo,
const uint8_t *  signature,
size_t  signatureLen 
)

Signature verification.

Parameters
[in]saPointer to the IKE SA
[in]idPointer to the identification data
[in]idLenLength of the identification data, in bytes
[in]authMethodAuthentication method
[in]publicKeyInfoPointer to the subject's public key
[in]signatureSignature to be verified
[in]signatureLenLength of the signature, in bytes
Returns
Error code

Definition at line 58 of file ike_sign_verify.c.