NXP MCX E247 hardware cryptographic accelerator (ELA_CSEC) More...
#include "core/crypto.h"
Go to the source code of this file.
Macros | |
#define | CSEC_CMD_ENC_ECB 0x01000000 |
#define | CSEC_CMD_ENC_CBC 0x02000000 |
#define | CSEC_CMD_DEC_ECB 0x03000000 |
#define | CSEC_CMD_DEC_CBC 0x04000000 |
#define | CSEC_CMD_GENERATE_MAC 0x05000000 |
#define | CSEC_CMD_VERIFY_MAC 0x06000000 |
#define | CSEC_CMD_LOAD_KEY 0x07000000 |
#define | CSEC_CMD_LOAD_PLAIN_KEY 0x08000000 |
#define | CSEC_CMD_EXPORT_RAM_KEY 0x09000000 |
#define | CSEC_CMD_INIT_RNG 0x0A000000 |
#define | CSEC_CMD_EXTEND_SEED 0x0B000000 |
#define | CSEC_CMD_RND 0x0C000000 |
#define | CSEC_CMD_BOOT_FAILURE 0x0E000000 |
#define | CSEC_CMD_BOOT_OK 0x0F000000 |
#define | CSEC_CMD_GET_ID 0x10000000 |
#define | CSEC_CMD_BOOT_DEFINE 0x11000000 |
#define | CSEC_CMD_DBG_CHAL 0x12000000 |
#define | CSEC_CMD_DBG_AUTH 0x13000000 |
#define | CSEC_CMD_MP_COMPRESS 0x16000000 |
#define | CSEC_FORMAT_COPY 0x00000000 |
#define | CSEC_FORMAT_POINTER 0x00010000 |
#define | CSEC_CALL_SEQ_FIRST 0x00000000 |
#define | CSEC_CALL_SEQ_SUBSEQUENT 0x00000100 |
#define | CSEC_SECRET_KEY 0x00000000 |
#define | CSEC_MASTER_ECU_KEY 0x00000001 |
#define | CSEC_BOOT_MAC_KEY 0x00000002 |
#define | CSEC_BOOT_MAC 0x00000003 |
#define | CSEC_KEY_1 0x00000004 |
#define | CSEC_KEY_2 0x00000005 |
#define | CSEC_KEY_3 0x00000006 |
#define | CSEC_KEY_4 0x00000007 |
#define | CSEC_KEY_5 0x00000008 |
#define | CSEC_KEY_6 0x00000009 |
#define | CSEC_KEY_7 0x0000000A |
#define | CSEC_KEY_8 0x0000000B |
#define | CSEC_KEY_9 0x0000000C |
#define | CSEC_KEY_10 0x0000000D |
#define | CSEC_RAM_KEY 0x0000000F |
#define | CSEC_KEY_11 0x00000014 |
#define | CSEC_KEY_12 0x00000015 |
#define | CSEC_KEY_13 0x00000016 |
#define | CSEC_KEY_14 0x00000017 |
#define | CSEC_KEY_15 0x00000018 |
#define | CSEC_KEY_16 0x00000019 |
#define | CSEC_KEY_17 0x0000001A |
#define | CSEC_KEY_18 0x0000001B |
#define | CSEC_KEY_19 0x0000001C |
#define | CSEC_KEY_20 0x0000001D |
#define | CSEC_KEY_21 0x0000001E |
#define | CSEC_ERC_NO_ERROR 0x0001 |
#define | CSEC_ERC_SEQUENCE_ERROR 0x0002 |
#define | CSEC_ERC_KEY_NOT_AVAILABLE 0x0004 |
#define | CSEC_ERC_KEY_INVALID 0x0008 |
#define | CSEC_ERC_KEY_EMPTY 0x0010 |
#define | CSEC_ERC_NO_SECURE_BOOT 0x0020 |
#define | CSEC_ERC_KEY_WRITE_PROTECTED 0x0040 |
#define | CSEC_ERC_KEY_UPDATE_ERROR 0x0080 |
#define | CSEC_ERC_RNG_SEED 0x0100 |
#define | CSEC_ERC_NO_DEBUGGING 0x0200 |
#define | CSEC_ERC_MEMORY_FAILURE 0x0400 |
#define | CSEC_ERC_GENERAL_ERROR 0x0800 |
Functions | |
error_t | mcxe247CryptoInit (void) |
Initialize hardware cryptographic accelerator. More... | |
Variables | |
OsMutex | mcxe247CryptoMutex |
Detailed Description
NXP MCX E247 hardware cryptographic accelerator (ELA_CSEC)
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.
- Version
- 2.5.4
Definition in file mcxe247_crypto.h.
Macro Definition Documentation
◆ CSEC_BOOT_MAC
#define CSEC_BOOT_MAC 0x00000003 |
Definition at line 70 of file mcxe247_crypto.h.
◆ CSEC_BOOT_MAC_KEY
#define CSEC_BOOT_MAC_KEY 0x00000002 |
Definition at line 69 of file mcxe247_crypto.h.
◆ CSEC_CALL_SEQ_FIRST
#define CSEC_CALL_SEQ_FIRST 0x00000000 |
Definition at line 63 of file mcxe247_crypto.h.
◆ CSEC_CALL_SEQ_SUBSEQUENT
#define CSEC_CALL_SEQ_SUBSEQUENT 0x00000100 |
Definition at line 64 of file mcxe247_crypto.h.
◆ CSEC_CMD_BOOT_DEFINE
#define CSEC_CMD_BOOT_DEFINE 0x11000000 |
Definition at line 53 of file mcxe247_crypto.h.
◆ CSEC_CMD_BOOT_FAILURE
#define CSEC_CMD_BOOT_FAILURE 0x0E000000 |
Definition at line 50 of file mcxe247_crypto.h.
◆ CSEC_CMD_BOOT_OK
#define CSEC_CMD_BOOT_OK 0x0F000000 |
Definition at line 51 of file mcxe247_crypto.h.
◆ CSEC_CMD_DBG_AUTH
#define CSEC_CMD_DBG_AUTH 0x13000000 |
Definition at line 55 of file mcxe247_crypto.h.
◆ CSEC_CMD_DBG_CHAL
#define CSEC_CMD_DBG_CHAL 0x12000000 |
Definition at line 54 of file mcxe247_crypto.h.
◆ CSEC_CMD_DEC_CBC
#define CSEC_CMD_DEC_CBC 0x04000000 |
Definition at line 41 of file mcxe247_crypto.h.
◆ CSEC_CMD_DEC_ECB
#define CSEC_CMD_DEC_ECB 0x03000000 |
Definition at line 40 of file mcxe247_crypto.h.
◆ CSEC_CMD_ENC_CBC
#define CSEC_CMD_ENC_CBC 0x02000000 |
Definition at line 39 of file mcxe247_crypto.h.
◆ CSEC_CMD_ENC_ECB
#define CSEC_CMD_ENC_ECB 0x01000000 |
Definition at line 38 of file mcxe247_crypto.h.
◆ CSEC_CMD_EXPORT_RAM_KEY
#define CSEC_CMD_EXPORT_RAM_KEY 0x09000000 |
Definition at line 46 of file mcxe247_crypto.h.
◆ CSEC_CMD_EXTEND_SEED
#define CSEC_CMD_EXTEND_SEED 0x0B000000 |
Definition at line 48 of file mcxe247_crypto.h.
◆ CSEC_CMD_GENERATE_MAC
#define CSEC_CMD_GENERATE_MAC 0x05000000 |
Definition at line 42 of file mcxe247_crypto.h.
◆ CSEC_CMD_GET_ID
#define CSEC_CMD_GET_ID 0x10000000 |
Definition at line 52 of file mcxe247_crypto.h.
◆ CSEC_CMD_INIT_RNG
#define CSEC_CMD_INIT_RNG 0x0A000000 |
Definition at line 47 of file mcxe247_crypto.h.
◆ CSEC_CMD_LOAD_KEY
#define CSEC_CMD_LOAD_KEY 0x07000000 |
Definition at line 44 of file mcxe247_crypto.h.
◆ CSEC_CMD_LOAD_PLAIN_KEY
#define CSEC_CMD_LOAD_PLAIN_KEY 0x08000000 |
Definition at line 45 of file mcxe247_crypto.h.
◆ CSEC_CMD_MP_COMPRESS
#define CSEC_CMD_MP_COMPRESS 0x16000000 |
Definition at line 56 of file mcxe247_crypto.h.
◆ CSEC_CMD_RND
#define CSEC_CMD_RND 0x0C000000 |
Definition at line 49 of file mcxe247_crypto.h.
◆ CSEC_CMD_VERIFY_MAC
#define CSEC_CMD_VERIFY_MAC 0x06000000 |
Definition at line 43 of file mcxe247_crypto.h.
◆ CSEC_ERC_GENERAL_ERROR
#define CSEC_ERC_GENERAL_ERROR 0x0800 |
Definition at line 106 of file mcxe247_crypto.h.
◆ CSEC_ERC_KEY_EMPTY
#define CSEC_ERC_KEY_EMPTY 0x0010 |
Definition at line 99 of file mcxe247_crypto.h.
◆ CSEC_ERC_KEY_INVALID
#define CSEC_ERC_KEY_INVALID 0x0008 |
Definition at line 98 of file mcxe247_crypto.h.
◆ CSEC_ERC_KEY_NOT_AVAILABLE
#define CSEC_ERC_KEY_NOT_AVAILABLE 0x0004 |
Definition at line 97 of file mcxe247_crypto.h.
◆ CSEC_ERC_KEY_UPDATE_ERROR
#define CSEC_ERC_KEY_UPDATE_ERROR 0x0080 |
Definition at line 102 of file mcxe247_crypto.h.
◆ CSEC_ERC_KEY_WRITE_PROTECTED
#define CSEC_ERC_KEY_WRITE_PROTECTED 0x0040 |
Definition at line 101 of file mcxe247_crypto.h.
◆ CSEC_ERC_MEMORY_FAILURE
#define CSEC_ERC_MEMORY_FAILURE 0x0400 |
Definition at line 105 of file mcxe247_crypto.h.
◆ CSEC_ERC_NO_DEBUGGING
#define CSEC_ERC_NO_DEBUGGING 0x0200 |
Definition at line 104 of file mcxe247_crypto.h.
◆ CSEC_ERC_NO_ERROR
#define CSEC_ERC_NO_ERROR 0x0001 |
Definition at line 95 of file mcxe247_crypto.h.
◆ CSEC_ERC_NO_SECURE_BOOT
#define CSEC_ERC_NO_SECURE_BOOT 0x0020 |
Definition at line 100 of file mcxe247_crypto.h.
◆ CSEC_ERC_RNG_SEED
#define CSEC_ERC_RNG_SEED 0x0100 |
Definition at line 103 of file mcxe247_crypto.h.
◆ CSEC_ERC_SEQUENCE_ERROR
#define CSEC_ERC_SEQUENCE_ERROR 0x0002 |
Definition at line 96 of file mcxe247_crypto.h.
◆ CSEC_FORMAT_COPY
#define CSEC_FORMAT_COPY 0x00000000 |
Definition at line 59 of file mcxe247_crypto.h.
◆ CSEC_FORMAT_POINTER
#define CSEC_FORMAT_POINTER 0x00010000 |
Definition at line 60 of file mcxe247_crypto.h.
◆ CSEC_KEY_1
#define CSEC_KEY_1 0x00000004 |
Definition at line 71 of file mcxe247_crypto.h.
◆ CSEC_KEY_10
#define CSEC_KEY_10 0x0000000D |
Definition at line 80 of file mcxe247_crypto.h.
◆ CSEC_KEY_11
#define CSEC_KEY_11 0x00000014 |
Definition at line 82 of file mcxe247_crypto.h.
◆ CSEC_KEY_12
#define CSEC_KEY_12 0x00000015 |
Definition at line 83 of file mcxe247_crypto.h.
◆ CSEC_KEY_13
#define CSEC_KEY_13 0x00000016 |
Definition at line 84 of file mcxe247_crypto.h.
◆ CSEC_KEY_14
#define CSEC_KEY_14 0x00000017 |
Definition at line 85 of file mcxe247_crypto.h.
◆ CSEC_KEY_15
#define CSEC_KEY_15 0x00000018 |
Definition at line 86 of file mcxe247_crypto.h.
◆ CSEC_KEY_16
#define CSEC_KEY_16 0x00000019 |
Definition at line 87 of file mcxe247_crypto.h.
◆ CSEC_KEY_17
#define CSEC_KEY_17 0x0000001A |
Definition at line 88 of file mcxe247_crypto.h.
◆ CSEC_KEY_18
#define CSEC_KEY_18 0x0000001B |
Definition at line 89 of file mcxe247_crypto.h.
◆ CSEC_KEY_19
#define CSEC_KEY_19 0x0000001C |
Definition at line 90 of file mcxe247_crypto.h.
◆ CSEC_KEY_2
#define CSEC_KEY_2 0x00000005 |
Definition at line 72 of file mcxe247_crypto.h.
◆ CSEC_KEY_20
#define CSEC_KEY_20 0x0000001D |
Definition at line 91 of file mcxe247_crypto.h.
◆ CSEC_KEY_21
#define CSEC_KEY_21 0x0000001E |
Definition at line 92 of file mcxe247_crypto.h.
◆ CSEC_KEY_3
#define CSEC_KEY_3 0x00000006 |
Definition at line 73 of file mcxe247_crypto.h.
◆ CSEC_KEY_4
#define CSEC_KEY_4 0x00000007 |
Definition at line 74 of file mcxe247_crypto.h.
◆ CSEC_KEY_5
#define CSEC_KEY_5 0x00000008 |
Definition at line 75 of file mcxe247_crypto.h.
◆ CSEC_KEY_6
#define CSEC_KEY_6 0x00000009 |
Definition at line 76 of file mcxe247_crypto.h.
◆ CSEC_KEY_7
#define CSEC_KEY_7 0x0000000A |
Definition at line 77 of file mcxe247_crypto.h.
◆ CSEC_KEY_8
#define CSEC_KEY_8 0x0000000B |
Definition at line 78 of file mcxe247_crypto.h.
◆ CSEC_KEY_9
#define CSEC_KEY_9 0x0000000C |
Definition at line 79 of file mcxe247_crypto.h.
◆ CSEC_MASTER_ECU_KEY
#define CSEC_MASTER_ECU_KEY 0x00000001 |
Definition at line 68 of file mcxe247_crypto.h.
◆ CSEC_RAM_KEY
#define CSEC_RAM_KEY 0x0000000F |
Definition at line 81 of file mcxe247_crypto.h.
◆ CSEC_SECRET_KEY
#define CSEC_SECRET_KEY 0x00000000 |
Definition at line 67 of file mcxe247_crypto.h.
Function Documentation
◆ mcxe247CryptoInit()
error_t mcxe247CryptoInit | ( | void | ) |
Initialize hardware cryptographic accelerator.
- Returns
- Error code
Definition at line 49 of file mcxe247_crypto.c.
Variable Documentation
◆ mcxe247CryptoMutex
|
extern |
Definition at line 41 of file mcxe247_crypto.c.