/* Copyright Statement:
 *
 * This software/firmware and related documentation ("AutoChips Software") are
 * protected under relevant copyright laws. The information contained herein is
 * confidential and proprietary to AutoChips Inc. and/or its licensors. Without
 * the prior written permission of AutoChips inc. and/or its licensors, any
 * reproduction, modification, use or disclosure of AutoChips Software, and
 * information contained herein, in whole or in part, shall be strictly
 * prohibited.
 *
 * AutoChips Inc. (C) 2024. All rights reserved.
 *
 * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
 * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("AUTOCHIPS SOFTWARE")
 * RECEIVED FROM AUTOCHIPS AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
 * ON AN "AS-IS" BASIS ONLY. AUTOCHIPS EXPRESSLY DISCLAIMS ANY AND ALL
 * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
 * NONINFRINGEMENT. NEITHER DOES AUTOCHIPS PROVIDE ANY WARRANTY WHATSOEVER WITH
 * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
 * INCORPORATED IN, OR SUPPLIED WITH THE AUTOCHIPS SOFTWARE, AND RECEIVER AGREES
 * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
 * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
 * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN AUTOCHIPS
 * SOFTWARE. AUTOCHIPS SHALL ALSO NOT BE RESPONSIBLE FOR ANY AUTOCHIPS SOFTWARE
 * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
 * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND AUTOCHIPS'S
 * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE AUTOCHIPS SOFTWARE
 * RELEASED HEREUNDER WILL BE, AT AUTOCHIPS'S OPTION, TO REVISE OR REPLACE THE
 * AUTOCHIPS SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
 * CHARGE PAID BY RECEIVER TO AUTOCHIPS FOR SUCH AUTOCHIPS SOFTWARE AT ISSUE.
 */
/******************************************************************************
 * @version: V3.1.0  AC7840x  Demo
 ******************************************************************************/

#include "cse_keys.h"
#include "stdint.h"

uint8_t BLANK_KEY[16]           = {0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu, 0xFFu};
uint8_t MASTER_ECU_KEY[16]      = {0x0fu, 0x0eu, 0x0du, 0x0cu, 0x0bu, 0x0au, 0x09u, 0x08u, 0x07u, 0x06u, 0x05u, 0x04u, 0x03u, 0x02u, 0x01u, 0x00u};
uint8_t BOOT_MAC_KEY[16]        = {0x78u, 0x56u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x34u, 0x12u};

uint8_t RAM_KEY[16]             = {0x0Fu, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};

uint8_t USER_KEY01[16]          = {0xFFu, 0x44u, 0x55u, 0xAAu, 0x6Au, 0xEDu, 0x28u, 0xF1u, 0x5Cu, 0x56u, 0x89u, 0xBEu, 0xFDu, 0x56u, 0x12u, 0xAFu};
uint8_t USER_KEY02[16]          = {0x3cu, 0x4fu, 0xcfu, 0x09u, 0x88u, 0x15u, 0xf7u, 0xabu, 0xa6u, 0xd2u, 0xaeu, 0x28u, 0x16u, 0x15u, 0x7eu, 0x2bu};
uint8_t USER_KEY03[16]          = {0x0fu, 0x0eu, 0x0du, 0x0cu, 0x0bu, 0x0au, 0x09u, 0x08u, 0x07u, 0x06u, 0x05u, 0x04u, 0x03u, 0x02u, 0x01u, 0x00u};
uint8_t USER_KEY04[16]          = {0x04u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY05[16]          = {0x05u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY06[16]          = {0x06u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY07[16]          = {0x07u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY08[16]          = {0x08u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY09[16]          = {0x09u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY10[16]          = {0x10u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY11[16]          = {0xAFu, 0xA3u, 0xE2u, 0XB0u, 0x8Bu, 0x69u, 0xEFu, 0x05u, 0xAAu, 0xFFu, 0x00u, 0x55u, 0xE6u, 0x8Au, 0xD4u, 0xC5u};
uint8_t USER_KEY12[16]          = {0x12u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY13[16]          = {0x13u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY14[16]          = {0x14u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY15[16]          = {0x15u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY16[16]          = {0x16u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};
uint8_t USER_KEY17[16]          = {0x17u, 0x12u, 0x56u, 0xFDu, 0xBEu, 0x89u, 0x56u, 0x5Cu, 0xF1u, 0x28u, 0xEDu, 0x6Au, 0XAAu, 0x55u, 0x44u, 0xFFu};

uint8_t SPECIAL_USER_KEY1[16]   = {0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u};
uint8_t SPECIAL_USER_KEY2[16]   = {0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu, 0xAAu};
uint8_t SPECIAL_USER_KEY3[16]   = {0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu, 0xCCu};
uint8_t SPECIAL_USER_KEY4[16]   = {0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u, 0xA5u};
uint8_t SPECIAL_USER_KEY5[16]   = {0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au, 0x5Au};

#ifdef AC784X_UCOS_CSE_REVERSE
const uint8_t KEY_UPDATE_ENC_C[16U] = {0x01u, 0x01u, 0x53u, 0x48u, 0x45u, 0x00u, 0x80u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0xB0u};
const uint8_t KEY_UPDATE_MAC_C[16U] = {0x01u, 0x02u, 0x53u, 0x48u, 0x45u, 0x00u, 0x80u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0xB0u};
const uint8_t DEBUG_KEY_C[16]       = {0x01u, 0x03u, 0x53u, 0x48u, 0x45u, 0x00u, 0x80u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0xB0u};
#else
const uint8_t KEY_UPDATE_ENC_C[16]  = {0xB0u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x80u, 0x00u, 0x45u, 0x48u, 0x53u, 0x01u, 0x01u};
const uint8_t KEY_UPDATE_MAC_C[16]  = {0xB0u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x80u, 0x00u, 0x45u, 0x48u, 0x53u, 0x02u, 0x01u};
const uint8_t DEBUG_KEY_C[16]       = {0xB0u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x80u, 0x00u, 0x45u, 0x48u, 0x53u, 0x03u, 0x01u};
#endif
