s32k314 安装SMR失败

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k314 安装SMR失败

Jump to solution
759 Views
eason_zhou
Contributor I

Hi, NXP 专家:

RTD版本:2.0.0

我在使用k314芯片做安全启动的功能,采用EDDSA_25519签名算法,出现了SMR安装失败的问题:我将一段数据放到了flash中,起始地址__BOOT_START, 大小为:__BOOT_SIZE,使用外部工具算的签名值R的起始地址为__BOOT_END,S的起始地址为__BOOT_END2。SMR配置如下:

const __attribute__((section(".key_flash"))) hseSmrEntry_t SMR_0 = {
.pSmrSrc = (uint32_t)__BOOT_START,
.smrSize = (uint32_t)__BOOT_SIZE,
.configFlags = HSE_SMR_CFG_FLAG_INSTALL_AUTH,
.pSmrDest = 0,
.checkPeriod = 0,
.authKeyHandle = ECC_KEY_PUB_Handle,
.authScheme.sigScheme.signSch = HSE_SIGN_EDDSA,
.authScheme.sigScheme.sch.eddsa.bHashEddsa = FALSE,
.authScheme.sigScheme.sch.eddsa.contextLength = 0,
.authScheme.sigScheme.sch.eddsa.pContext = NULL,
.pInstAuthTag[0] = (uint32_t)__BOOT_END,
.pInstAuthTag[1] = (uint32_t)(__BOOT_END2)
};

我使用:EddsaVerify(ECC_KEY_PUB_Handle,FALSE ,(uint32_t)SMR_0.smrSize,

            (uint8_t *)(SMR_0.pSmrSrc),FALSE,0, NULL , &signRLen, (const uint8_t *)SMR_0.pInstAuthTag[0], &signSLen, (const uint8_t *)SMR_0.pInstAuthTag[1]);
去验证的时候可以验证成功。
 
但是我在安装SMR时,返回值为
HSE_SRV_RSP_INVALID_PARAM(0x55A5A399)无效参数。
(与HSE交互的变量SMR0放在了flash区域。)
请NXP的专家帮忙解答一下,谢谢。
 
Eason
 
 
 
 

 

 

0 Kudos
Reply
1 Solution
714 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @eason_zhou 

could you tell me what are the key flags of used key?

Regards,

Lukas

View solution in original post

0 Kudos
Reply
2 Replies
715 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @eason_zhou 

could you tell me what are the key flags of used key?

Regards,

Lukas

0 Kudos
Reply
704 Views
eason_zhou
Contributor I

你好,我已经解决了,谢谢您。

0 Kudos
Reply