mcxn547_crypto.c File Reference

NXP MCX N547 hardware cryptographic accelerator. More...

#include <ip_platform.h>
#include <mcuxClEls.h>
#include <mcuxClSession.h>
#include <mcuxClRandom.h>
#include <mcuxClRandomModes.h>
#include <mcuxClRsa.h>
#include <mcuxClEcc.h>
#include "core/crypto.h"
#include "hardware/mcxn547/mcxn547_crypto.h"
#include "hardware/mcxn547/mcxn547_crypto_trng.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL
 
#define MAX_CPUWA_SIZE
 
#define MAX_PKCWA_SIZE
 

Functions

error_t mcxn547CryptoInit (void)
 Initialize hardware cryptographic accelerator. More...
 

Variables

OsMutex mcxn547CryptoMutex
 
mcuxClSession_Descriptor_t elsSession
 

Detailed Description

NXP MCX N547 hardware cryptographic accelerator.

License

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

Copyright (C) 2010-2025 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.

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

Definition in file mcxn547_crypto.c.

Macro Definition Documentation

◆ MAX_CPUWA_SIZE

#define MAX_CPUWA_SIZE
Value:
MCUXCLCORE_MAX(MCUXCLRANDOMMODES_NCINIT_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLRANDOMMODES_INIT_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLRSA_VERIFY_NOVERIFY_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLRSA_SIGN_PLAIN_NOENCODE_4096_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLRSA_SIGN_CRT_NOENCODE_4096_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_POINTMULT_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_SIGN_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_VERIFY_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_MONTDH_KEYAGREEMENT_CURVE25519_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_MONTDH_KEYAGREEMENT_CURVE448_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_EDDSA_GENERATEKEYPAIR_ED25519_WACPU_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_EDDSA_GENERATESIGNATURE_ED25519_WACPU_SIZE, \
MCUXCLECC_EDDSA_VERIFYSIGNATURE_ED25519_WACPU_SIZE))))))))))))

Definition at line 48 of file mcxn547_crypto.c.

◆ MAX_PKCWA_SIZE

#define MAX_PKCWA_SIZE
Value:
MCUXCLCORE_MAX(MCUXCLRSA_VERIFY_4096_WAPKC_SIZE, \
MCUXCLCORE_MAX(MCUXCLRSA_SIGN_PLAIN_4096_WAPKC_SIZE, \
MCUXCLCORE_MAX(MCUXCLRSA_SIGN_CRT_4096_WAPKC_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_POINTMULT_WAPKC_SIZE_640, \
MCUXCLCORE_MAX(MCUXCLECC_SIGN_WAPKC_SIZE_640, \
MCUXCLCORE_MAX(MCUXCLECC_VERIFY_WAPKC_SIZE_640, \
MCUXCLCORE_MAX(MCUXCLECC_MONTDH_KEYAGREEMENT_CURVE25519_WAPKC_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_MONTDH_KEYAGREEMENT_CURVE448_WAPKC_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_EDDSA_GENERATEKEYPAIR_ED25519_WAPKC_SIZE, \
MCUXCLCORE_MAX(MCUXCLECC_EDDSA_GENERATESIGNATURE_ED25519_WAPKC_SIZE, \
MCUXCLECC_EDDSA_VERIFYSIGNATURE_ED25519_WAPKC_SIZE))))))))))

Definition at line 63 of file mcxn547_crypto.c.

◆ TRACE_LEVEL

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL

Definition at line 32 of file mcxn547_crypto.c.

Function Documentation

◆ mcxn547CryptoInit()

error_t mcxn547CryptoInit ( void  )

Initialize hardware cryptographic accelerator.

Returns
Error code

Definition at line 88 of file mcxn547_crypto.c.

Variable Documentation

◆ elsSession

mcuxClSession_Descriptor_t elsSession

Definition at line 77 of file mcxn547_crypto.c.

◆ mcxn547CryptoMutex

OsMutex mcxn547CryptoMutex

Definition at line 76 of file mcxn547_crypto.c.