一、AES加密功能在物联网行业中的应用
AES加密功能在物联网行业中有着广泛的应用。随着物联网技术的不断发展,越来越多的设备连接到互联网上,这也增加了数据泄露和网络攻击的风险。为了保护物联网设备和传输的数据的安全,AES加密技术被广泛应用于以下几个方面:
数据传输加密:物联网设备之间传输的数据可以使用AES加密算法进行加密,确保数据在传输过程中不被窃取或篡改。
身份验证:AES加密技术可以用于物联网设备的身份验证过程,确保只有合法的设备可以接入物联网网络。
安全存储:物联网设备上存储的数据可以使用AES加密算法进行加密,确保数据在设备丢失或被盗时不会被泄露。
总的来说,AES加密技术在物联网行业中的应用可以提高设备和数据的安全性,保护用户的隐私和权益。
二、AES加密功能的行业知识介绍
1.AES加密算法定义
AES加密算法(Advanced Encryption Standard)是一种对称加密算法,也称为高级加密标准。它是由美国国家标准与技术研究院(NIST)于2001年发布,作为DES加密算法的替代方案。AES加密算法使用128位、192位或256位密钥对数据进行加密和解密,具有高强度、高速度和易于实现等优点。
2.AES加密算法的原理是什么?
密钥扩展
根据AES密钥长度进行密钥扩展,生成多个轮密钥。
初始轮
将明文数据分成128位块,并与第一个轮密钥进行异或操作。
多轮加密
重复进行多轮加密操作,每轮操作包括四个步骤:
字节替换:将每个字节映射到另一个字节,使用S-Box进行替换。
行移位:对每个128位块的行进行循环左移,第一行不移动,第二行左移1个字节,第三行左移2个字节,第四行左移3个字节。
列混淆:对每个128位块的列进行混淆,使用固定矩阵进行乘法运算。
轮密钥加:将每个128位块与下一个轮密钥进行异或操作。
最终轮
最后一轮加密后,将128位块与最后一个轮密钥进行异或操作。
输出
输出所有块的加密结果作为密文。
3.AES加密算法的安全性如何?
密钥长度
AES加密算法支持128位、192位和256位密钥长度,密钥长度越长,加密强度越高,可以有效抵御暴力破解和其他攻击。
算法的强度
AES加密算法采用了高度复杂的算法,包括字节替换、行移位、列混淆等多重操作,使得攻击者很难找到有效的攻击路径。
随机性和扩散性
AES加密算法具有良好的随机性和扩散性,能够抵御差分密码分析和其他密码分析攻击。
算法的公开性
AES加密算法是一种公开的加密算法,任何人都可以使用和实现,这也促进了算法的安全性和可信度。
4.AES加密算法的优点是什么?
安全性高
AES加密算法是一种安全性较高的加密算法,能够有效抵御暴力破解和其他攻击。
加密速度快
AES加密算法的加密速度相对较快,尤其是对于128位密钥长度的加密,可以在硬件上实现高速加密。
硬件实现方便
由于AES加密算法采用了固定的算法结构,因此可以在硬件上实现高效加密。
兼容性好
AES加密算法已经被广泛应用,许多软件和硬件设备都支持该算法。
可扩展性强
AES加密算法的密钥长度可选128位、192位和256位,可以根据安全需求选择密钥长度。
开放性好
AES加密算法是一种公开的加密算法,任何人都可以使用和实现。
5.AES加密算法的缺点是什么?
算法复杂度高
AES加密算法的加密过程需要进行多次复杂的操作,包括字节替换、行移位、列混淆等多重操作,因此算法复杂度较高。
密钥管理困难
AES加密算法需要使用较长的密钥长度,密钥管理较为困难,需要特殊的管理措施来保证密钥的安全性。
密文长度固定
AES加密算法的密文长度固定,无法根据明文长度动态调整,可能会对某些应用场景造成限制。
密文块的处理
由于AES加密算法是基于块密码算法,因此对于大文件的加密需要分块处理,可能会导致加密速度变慢。
可重放攻击
在某些情况下,攻击者可以通过重放加密数据来实现攻击,这是AES加密算法的一个安全漏洞。
三、AES加密功能的软件设计方案
1.基于红豆平台AES加密源代码的讲解:
int dtu_aes_cipher_encrypt(AM_AES_CIPHER_T* paes)
加密,加密数据、参数的等内容,在AM_AES_CIPHER_T结构体中。
int am_aes_cipher_encrypt(AM_AES_CIPHER_T* paes)
{
int ret = 0;
mbedtls_cipher_context_t ctx = {0};
const mbedtls_cipher_info_t* info = NULL;
size_t ilen = 0;
size_t olen = 0;
size_t slen = 0;
AM_AES_CIPHER_T* p_aes_cipher = NULL;
p_aes_cipher = paes;
if(NULL == paes->data || NULL == paes->exdata || NULL == paes->key || NULL == paes->iv || 0 == paes->data_len)
{
uprintf("%s[%d] params err", __FUNCTION__, __LINE__);
return -1;
}
mbedtls_cipher_init(&ctx);
info = mbedtls_cipher_info_from_type(p_aes_cipher->type);
ret = mbedtls_cipher_setup(&ctx, info);
if(0 != ret)
{
uprintf("%s[%d] setup err", __FUNCTION__, __LINE__);
goto exit;
}
ret = mbedtls_cipher_set_padding_mode(&ctx, p_aes_cipher->padding);
if(0 != ret)
{
uprintf("%s[%d] padding err", __FUNCTION__, __LINE__);
goto exit;
}
ret = mbedtls_cipher_setkey(&ctx, p_aes_cipher->key, strlen((void*)p_aes_cipher->key) * 8, MBEDTLS_ENCRYPT);
if(0 != ret)
{
uprintf("%s[%d] setkey err", __FUNCTION__, __LINE__);
goto exit;
}
ret = mbedtls_cipher_set_iv(&ctx, p_aes_cipher->iv, strlen((void*)p_aes_cipher->iv));
if(0 != ret)
{
uprintf("%s[%d] setiv err", __FUNCTION__, __LINE__);
goto exit;
}
ilen = p_aes_cipher->data_len;
ret = mbedtls_cipher_update(&ctx, p_aes_cipher->data, ilen, p_aes_cipher->exdata, &olen);
if(0 != ret)
{
uprintf("%s[%d] update err", __FUNCTION__, __LINE__);
goto exit;
}
slen = olen;
ret = mbedtls_cipher_finish(&ctx, (unsigned char*)(p_aes_cipher->exdata + slen), &olen);
if(0 != ret)
{
uprintf("%s[%d] finish err", __FUNCTION__, __LINE__);
goto exit;
}
char* temp = NULL;
UINT16 encrypt_len = 0;
char arr_temp[33] = {0};
UINT32 p_len = 0;
encrypt_len = (data_len / 16 + 1) * 16;
temp = malloc(encrypt_len * 2 + 1);
p_len = encrypt_len / 16;
if(NULL != temp)
{
memset(temp, 0, encrypt_len * 2 + 1);
utils_hex2ascii_str(temp, (UINT8*)exdata, encrypt_len);
uprintf("%s[%d] slen:%d olen:%d after encrypt len:%d", __FUNCTION__, __LINE__, slen, olen, encrypt_len);
memset(arr_temp, 0, 17);
for(UINT32 i = 0; i < p_len;i++)
{
memcpy(arr_temp, temp + 32 * i, 32);
uprintf("%s", arr_temp);
}
free(temp);
}
exit:
mbedtls_cipher_free(&ctx);
return ret;
}
int dtu_aes_cipher_decrypt(AM_AES_CIPHER_T* paes)
解密,解密数据、参数的等内容,在AM_AES_CIPHER_T结构体中。
int am_aes_cipher_decrypt(AM_AES_CIPHER_T* paes)
{
int ret = 0;
mbedtls_cipher_context_t ctx = {0};
const mbedtls_cipher_info_t* info = NULL;
size_t olen = 0;
size_t slen = 0;
AM_AES_CIPHER_T* p_aes_cipher = NULL;
p_aes_cipher = paes;
if(NULL == paes->data || NULL == paes->exdata || NULL == paes->key || NULL == paes->iv || 0 == paes->data_len)
{
uprintf("%s[%d] params err", __FUNCTION__, __LINE__);
return -1;
}
mbedtls_cipher_init(&ctx);
info = mbedtls_cipher_info_from_type(p_aes_cipher->type);
ret = mbedtls_cipher_setup(&ctx, info);
if(0 != ret)
{
uprintf("%s[%d] setup err", __FUNCTION__, __LINE__);
goto exit;
}
ret = mbedtls_cipher_set_padding_mode(&ctx, p_aes_cipher->padding);
if(0 != ret)
{
uprintf("%s[%d] padding err", __FUNCTION__, __LINE__);
goto exit;
}
ret = mbedtls_cipher_setkey(&ctx, p_aes_cipher->key, strlen((void*)p_aes_cipher->key) * 8, MBEDTLS_DECRYPT);
if(0 != ret)
{
uprintf("%s[%d] setkey err", __FUNCTION__, __LINE__);
goto exit;
}
ret = mbedtls_cipher_set_iv(&ctx, p_aes_cipher->iv, strlen((void*)p_aes_cipher->iv));
if(0 != ret)
{
uprintf("%s[%d] setiv err", __FUNCTION__, __LINE__);
goto exit;
}
ret = mbedtls_cipher_update(&ctx, p_aes_cipher->data, p_aes_cipher->data_len, p_aes_cipher->exdata, &olen);
if(0 != ret)
{
uprintf("%s[%d] update err", __FUNCTION__, __LINE__);
goto exit;
}
slen = olen;
ret = mbedtls_cipher_finish(&ctx, (unsigned char*)(p_aes_cipher->exdata + slen), &olen);
if(0 != ret)
{
uprintf("%s[%d] finish err", __FUNCTION__, __LINE__);
goto exit;
}
exit:
mbedtls_cipher_free(&ctx);
return ret;
}
2.基于红豆平台调用AES加密组件的demo示例:
2.1 创建一个Demo
复制20.2_at_xtu示例工程,到同一个文件夹下,修改文件名为22.1_aes_cipher,如图:
2.2 修改makefile
增加文件组件所在目录头文件路径,和源文件路径,以及一些宏定义,如图:
2.3 增加头文件
使用代码编辑器,将新建的工程文件加入代码编辑器中,打开main.c,修改main.c,加入am.h头文件,如图:
2.4 修改代码
示例使用的是板载5x6卡,用户的硬件可能是使用外置卡,或者是三合一全网通卡,因为硬件上三种卡使用的模组SIM卡接口不一样(外置卡SIM1,5x6卡和三合一卡SIM2),所以,需要通过一个全局变量来制定SIM卡硬件接口。
在Phase2Inits_exit 调用文件组件提供的对外API,如图:
修改main函数中,实现加密解密API调用
2.5 编译
在SDK根目录打开命令行,输入命令.\build.bat -l .\amaziot_bloom_os_sdk\sample\libraries\22.1_aes_cipher\
PS F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF
λ .\build.bat -l .\amaziot_bloom_os_sdk\sample\libraries\22.1_aes_cipher\
子目录或文件 out\bin 已经存在。
子目录或文件 build\mbedTLS 已经存在。
子目录或文件 build\obj 已经存在。
gnumake: Entering directory `F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher'
armcc.exe -c --cpu Cortex-R4 --no_unaligned_access -g -O2 --apcs /inter --diag_suppress 2084,1,2,177,188,223,550,1296,2795,6319,9931,9933 --diag_error=warning --gnu --thumb --loose_implicit_cast -DDATA_COLLECTOR_IMPL -DISPT_OVER_SSP -DDIAG_SSP_DOUBLE_BUFFER_USE_DYNAMIC_ALLOCATION -DENV_XSCALE -DL1_DCXO_ENABLED -DLTE_HIGH_MOBILITY_OPTIMIZATION -DRUN_XIP_MODE -DCRANE_Z2 -DCA_LONG_IPC_MSG -DNEZHA3 -DNEZHA3_1826 -DUPGRADE_PLMS -DUPGRADE_PLMS_SR -DLTE_GSMMULTIBCCH -DGPLC_LTE_RSSI_SCAN -DL1V_NEW_RSSI -DUPGRADE_PLMS_3G -DUPGRADE_PLMS_L1 -DUPGRADE_FG_PLMS -DFG_PLMS_URR -DUPGRADE_L1A_FG_PLMS -DUPGRADE_PLMS_STAGE_2 -DUPGRADE_MBCCH -DMULTI_BCCH_READY_IND -DURR_MRAT_ICS_SEARCH -DUPGRADE_ICS -DMRAT_NAS -DUPGRADE_PLMS_SEARCH_API -DICS_MBCCH -DICS_MBCCH_2G_RSSI -DDIAG_NEWPP -DPHS_SW_DEMO -DPHS_SW_DEMO_TTC -DPHS_SW_DEMO_TTC_PM -DFULL_SYSTEM -D_DDR_INIT_ -D_TAVOR_HARBELL_ -DUPGRADE_ARBEL_PLATFORM -D_TAVOR_B0_SILICON_ -DTDL1C_SPY_ENABLE -DDLM_TAVOR -DTAVOR -DFLAVOR_DUALCORE -DDEBUG_D2_MOR_REG_RESEREVED_ENABLE -D_DIAG_USE_COMMSTACK_ -D_TAVOR_DIAG_ -DPM_DEBUG_MODE_ENABLED -DPM_D2FULL_MODE -DPM_EXT_DBG_INT_ARR -DFEATURE_WB_AMR_PS -DMACRO_FOR_LWG -DHL_LWG -DOPTIMIZE_FOR_2G_BCCH -DPLAT_TEST -D_FDI_USE_OSA_ -DPLAT_USE_THREADX -DLWIP_IPNETBUF_SUPPORT -DCRANE_MCU_DONGLE -DAT_OVER_UART -DPHS_SW_DEMO_TTC_PM -DUPGRADE_LTE_ONLY -DEXT_AT_MODEM_SUPPORT -DLTEONLY_THIN_SINGLE_SIM -DLFS_FILE_SYS -DLFS_FILE_SYS_V2 -DPSM_ENABLE -DNO_PAHO_MQTT -DNO_XML -DNO_LWM2M -DREMOVE_MBEDTLS -DNO_AT_NET -DCRANE_SD_NOT_SUPPORT -DNTP -DYMODEM_EEH_DUMP -DENABLE_DM_LTEONLY -DLTEONLY_THIN -DNO_EXTEND_MY_Q_AT -DNOT_SUPPORT_HTTPS -DNOT_SUPPORT_PM813 -DCRANEL_4MRAM -DREMOVE_PB -DUART_NEW_VERSION -DREMOVE_MEP -DREMOVE_SMS -DREMOVE_ENVSIM -DAPN_INCODE -DLTEONLY_THIN_SINGLE_SIM_2MFLASH -DASR160X_OPENCPU_FEATURE -DENABLE_UART3_FEATRUE -DENABLE_UART4_FEATRUE -DYUGE_MBEDTLS_3_2_1 -DENABLE_MAC_TX_DATA_LOGGING -DDISABLE_NVRAM_ACCESS -DINTEL_UPGRADE_EE_HANDLER_SUPPORT -DLTE_W_PS -DL1_DUAL_MODE -DUPGRADE_HERMON_DUAL -DINTEL_UPGRADE_DUAL_RAT -DINTEL_UPGRADE_GPRS_CIPHER_FLUSH -DUPGRADE_ENHANCED_QUAD_BAND -DINTEL_2CHIP_PLAT -DI_2CHIP_PLAT -DUPGRDE_TAVOR_COMMUNICATION -DRUN_WIRELESS_MODEM -DFLAVOR_DDR12MB_GB1MB5 -DFEATURE_SHMEM -DACIPC_ENABLE_NEW_CALLBACK_MECHANISM -DRELIABLE_DATA -DMAP_NSS -DTV_FNAME="\"SW_PLATFORM=PMD2NONE PHS_SW_DEMO PHS_SW_DEMO_PM SRCNUCLEUS FULL_SYSTEM NOACRTC PDFLT PLAT_TEST PV2 DIAGOSHMEM NVM WITHL1V\"" -DTV_FDESC="\"SW_DESCRIPTION=\"" -DENABLE_ACIPC -D_DATAOMSL_ENABLED_ -DUSB_CABLE_DETECTION_VIA_PMIC -DMIPS_TEST -DMIPS_TEST_RAM -DFLAVOR_DIET_RAM -DNVM_INCLUDE -DMSL_INCLUDE -DMSL_POOL_MEM -DNO_AUDIO -DOSA_QUEUE_NAMES -D_DIAG_DISABLE_USB_ -DOSA_NUCLEUS -DOSA_USED -DPM_D2NONE_MODE -DCRANE_SOC_TEMPERATURE_SENSOR -DL1_SW_UPDATE_FOR_DIGRF -DPHS_L1_SW_UPDATE_R7 -DUPGRADE_LTE -DFRBD_CALIB_NVM -DFRBD_AGC_CALIB -DFRBD_FDT_CALIB -DHSPA_MPR -DCAPT_PARAMS_OPTIMIZE -DL1_WB_R99_ONLY -DL1V_WB_R99_ONLY -DINTERGRATED_RF_SUPPORT -DL1_RX_DIV_SUPPORT -DENABLE_OOS_HANDLING -DTAVOR_D2_WB_L1_SUPPORT -DL1_DDR_HIGH_FREQ -DUPGRADE_DIGRF3G_SUPPORT -DW_PS_PLUS_G_PAGING -D"NO_APLP=0" -DINTEL_UPGRADE_UNIFIED_VOICE_TASK -DINTEL_UPGRADE_R99 -DAPLP_SPY_ENABLE -D__TARGET_FEATURE_DOUBLEWORD -DWHOLE_UMTS_STACK -DUSE_TTPCOM_CSR_BLUETOOTH_AUDIO_GAIN_CONTROL -DL1_UPGRADE_R5 -DUPGRADE_EDGE -DUPGRADE_R4_FS1 -DINTEL_UPGRADE_GSM_CRL_IF -DUPGRADE_EGPRS_M -DINTEL_UPGRADE_EGPRS_M -DINTEL_UPGRADE_RF_PARAMS_IN_CF_TDS -DINTEL_UPGRADE_2SAMPLES_PER_SYMBOL -D"GPRS_MULTISLOT_CLASS=12" -D"EGPRS_MULTISLOT_CLASS=12" -DMARVELL_UPGRADE_BSIC_REDESIGN -DMSL_INCLUDE -DINTEL_HERMON_SAC -DCRANE_CUST_BUILD -DL1_SW_UPDATE_FOR_DIGRF -DFLAVOR_COM -DSILICON_PV2 -DSILICON_SEAGULL -DSILICON_TTC_CORE_SEAGULL -DPCAC_INCLUDE -Otime -DBUILD_DATE="\"02 21 2024\"" -DBUILD_TIME="\"18:03:58\"" -Iatcmds\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\yuge\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\UART\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\core\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\PMU\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\GPIO\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\posix\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\diag\diag_logic\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\SysCfg\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\platform\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\env\win32\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\BSP\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\platform\dev_plat\build -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\osa\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\threadx\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\nu_xscale\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\psm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\httpclient\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\diag\diag_logic\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\timer\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\intc\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\PM\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\pm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\TickManager\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\BSP\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\atcmdsrv\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\atparser\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\sdk\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\httpclient\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\ci\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\arch -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\ipv4 -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\ipv6 -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\lwip -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\netif -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\mmi_mat\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\tavor\Arbel\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\tavor\env\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\modem\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\duster\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\fota\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\I2C\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\ACIPC\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fatsys\flash -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\INCLUDE -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\MMU\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\FDI_ADD -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\FM_INC -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fatsys\fs\hdr -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\littlefs\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\tts\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\dial\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\csw_memory\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\utilities\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\commpm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\nvm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\EEhandler\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\EEhandler\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\RTC\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\ci_client\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\BT_device\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\UART\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\mrd\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\dma\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\softutil\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\SPI\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\websocket\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\atnet_srv\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fotacomm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\Audio\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\ACM_COMM\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\audio_stub\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\aam\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\AudioHAL\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\dbgshell\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\opencpu\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\amaziot_bloom_os_sdk\utils -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\asros -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1 -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\include -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\include\mbedtls -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\inc\mbedtls -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\tests\include\test -DSDK_ENABLE_MBEDTLS -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher\am\inc -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher\atcmds\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/libraries\am\xtu -o build\obj/ext_at_cmds.o F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher/atcmds/src/ext_at_cmds.c
armlink.exe build\obj/main.o build\obj/ext_at_cmds.o build\obj/ext_at_controller.o build\obj/am_aes_cipher.o build\obj/utils_string.o build\CSDK_CODE.lib \
-o F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\bin\Arbel_PMD2NONE_40M.axf \
--via F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\prebuilt_1606l\Arbel_PMD2NONE_targ_objliblist.txt \
--elf \
--scatter F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\prebuilt_1606l\Crane_DS_4M_Ram_2M_Flash_XIP_CIPSRAM_Common_SingleSIM.sct \
--predefine="-DLTEONLY_THIN_SINGLE_SIM" --map --symbols --info sizes,totals \
--list F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\bin\Arbel_PMD2NONE_40M.map \
--keep init.o(Header) --keep init.o(Vectors) --diag_suppress 6312,6314,6319,6329 \
--feedback F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\feedbackLinkOptLteonlyThin_SingleSim_NoSMS.txt
F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\tools\buildimage_1606l.bat
SDK_PROD_TYPE : [DM]
SDK_CUST_SKU : [THIN_SINGLE_SIM_NO_SMS]
SDK_PS_MODE : [LTEONLY]
SDK_CHIP_VER : [Z2A0]
SDK_OS_TYPE : [TX]
Platform Convertion Tools v4.01 with PS option extension
Convertion done!
|INPUT |out\bin\cp_1606L.bin
|MARK |NAME |EXEADDR .LOADADDR.LENGTH .CPZLADDR|COMPRESS STASTIC |
|--------|--------|--------.--------.--------.--------|------------------------------|
|This Is LteOnly 4M|
|RW_CPZ_1|DDR_RW_ |7e119000.8006f1ac.0000cde0.80070000|0000cde0->00003000
|This Is LteOnly 4M|
|RW_CPZ_2|PS_NCAH |7e388000.8007bf8c.00001300.80073000|00001300->00001000
|This Is LteOnly 4M|
|RW_CPZ_3|ITCM |7e3dac00.8007d28c.0000f51c.80074000|0000f51c->0000a000
|This Is LteOnly 4M|
|RW_CPZ_4|CODE_PS |7e1aa000.8008c7a8.00030ce4.8007e000|00030ce4->0001e000
|This Is LteOnly 4M|
|RW_CPZ_5|CODEPSB |7e1dc000.800bd48c.000339c0.8009c000|000339c0->0001b000
|This Is LteOnly 4M|
|RW_CPZ_6|CODEPSC |7e213000.800f0e4c.000323ec.800b7000|000323ec->0001b000
|This Is LteOnly 4M|
|RW_CPZ_7|CODEPSD |7e249000.80123238.00028d88.800d2000|00028d88->0001a000
|This Is LteOnly 4M|
|RW_CPZ_8|CODEPSE |7e277000.8014bfc0.0002e310.800ec000|0002e310->0001a000
|This Is LteOnly 4M|
|RW_CPZ_9|CODEPSF |7e2a9000.8017a2d0.0001c948.80106000|0001c948->00011000
|This Is LteOnly 4M|
|RW_CPZ_A|CODE_PL |7e2ca000.80196c18.0002fa44.80117000|0002fa44->0001e000
|This Is LteOnly 4M|
|RW_CPZ_B|CODEPLB |7e2fa000.801c665c.00039058.80135000|00039058->00021000
|This Is LteOnly 4M|
|RW_CPZ_C|CODEPLC |7e337000.801ff6b4.000268d4.80156000|000268d4->00011000
|--------|--------|--------.--------.--------.--------|------------------------------|
| | 0x0020ef88 -> 0x00150000|
| | 2.058(MB) -> 1.313(MB)|
|------------------------------------------------------------------------------------|
cp_1606L.axf
cp_1606L.bin
cp_1606L.map
gnumake: Leaving directory `F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher'
"copy NEZHAC_CP_CNR_MIFI_TX.bin to ./ "
已复制 1 个文件。
2.6 生成固件
参考入门中开发工具,生成工具。
2.7 查看现象
固件下载到模组,设置参数连接服务器,发送透传数据,查看服务器数据是否按照配置上报。
配置为AT+FMCFG=1,上报为十六进制数据。配置AT+FMCFG=2,上报JSON数据(注意配置为2,只支持字符串透传,十六进制尽量配置为1)
四、如何了解更多AES加密功能
本文章源自奇迹物联开源的物联网应用知识库Cellular IoT Wiki,更多技术干货欢迎关注收藏Wiki:Cellular IoT Wiki 知识库https://rckrv97mzx.feishu.cn/wiki/wikcnBvAC9WOkEYG5CLqGwm6PHf
欢迎同学们走进AmazIOT知识库的世界!
这里是为物联网人构建的技术应用百科,以便帮助你更快更简单的开发物联网产品。
文章评论(0条评论)
登录后参与讨论