2021-08-01 19:00:22 +02:00
|
|
|
/* wolfcaam_ecdsa.h
|
|
|
|
*
|
2023-01-01 18:00:36 +01:00
|
|
|
* Copyright (C) 2006-2022 wolfSSL Inc.
|
2021-08-01 19:00:22 +02:00
|
|
|
*
|
|
|
|
* This file is part of wolfSSL.
|
|
|
|
*
|
|
|
|
* wolfSSL 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.
|
|
|
|
*
|
|
|
|
* wolfSSL 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-1335, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <libs/libwolfssl/wolfcrypt/settings.h>
|
|
|
|
|
|
|
|
#ifndef WOLFCAAM_ECDSA_H
|
|
|
|
#define WOLFCAAM_ECDSA_H
|
|
|
|
|
2023-01-01 18:00:36 +01:00
|
|
|
#if defined(HAVE_ECC) && defined(WOLFSSL_CAAM)
|
2021-08-01 19:00:22 +02:00
|
|
|
|
|
|
|
#include <libs/libwolfssl/wolfcrypt/ecc.h>
|
|
|
|
|
|
|
|
WOLFSSL_LOCAL int wc_CAAM_EccSign(const byte* in, int inlen, byte* out,
|
2023-01-01 18:00:36 +01:00
|
|
|
word32* outlen, WC_RNG *rng, ecc_key *key, int devId);
|
2021-08-01 19:00:22 +02:00
|
|
|
WOLFSSL_LOCAL int wc_CAAM_EccVerify(const byte* sig, word32 siglen,
|
2023-01-01 18:00:36 +01:00
|
|
|
const byte* hash, word32 hashlen, int* res, ecc_key* key, int devId);
|
2021-08-01 19:00:22 +02:00
|
|
|
WOLFSSL_LOCAL int wc_CAAM_Ecdh(ecc_key* private_key, ecc_key* public_key,
|
2023-01-01 18:00:36 +01:00
|
|
|
byte* out, word32* outlen, int devId);
|
2021-08-01 19:00:22 +02:00
|
|
|
WOLFSSL_LOCAL int wc_CAAM_MakeEccKey(WC_RNG* rng, int keySize, ecc_key* key,
|
2023-01-01 18:00:36 +01:00
|
|
|
int curveId, int devId);
|
2021-08-01 19:00:22 +02:00
|
|
|
WOLFSSL_LOCAL int wc_CAAM_EccCheckPrivKey(ecc_key* key, const byte* pubKey,
|
|
|
|
word32 pubKeySz);
|
|
|
|
#endif /* HAVE_ECC && WOLFSSL_QNX_CAAM */
|
|
|
|
#endif /* WOLFCAAM_ECDSA_H */
|