Unable to verify some MP messages

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Unable to verify some MP messages

跳至解决方案
1,643 次查看
jaymonkman
Contributor III

This is on an i.MX7D, related to manufacturing protection

I have a message that when I sign it, I'm unable to verify it. The message is 220 bytes long. If I truncate it to 219 bytes or extend it to 221 bytes and sign it, I can verify the signature. If I try a different 220 byte message, that works also. The behavior I'm seeing seems to related to the particular data I'm trying to sign.

For signing, I'm using u-boot's mfgprot command. For verification, I'm using a tool I wrote. If you need the source, I can provide it.

I've include the output of signing the message as 219, 220, and 221 bytes long. I've also included the output of my verification tool. As you can see, the hashes reported by u-boot match the ones I calculated during verification.

 

Edited to add:

It's giving me some invalid HTML error, so I'm just attaching the data as a text file.

 

 

 

0 项奖励
回复
1 解答
1,532 次查看
Yuri
NXP Employee
NXP Employee

@jaymonkman 
Hello,

  I received the information, that the issue was solved.

The problem was an issue with the verification tool where strlen() was being misused.

Regards,
Yuri.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,630 次查看
jaymonkman
Contributor III

We're seeing about 20-25% of the messages that we sign fail to verify.

On one of the messages, I've tried truncating to different sizes and some pass, some fail. The original message is 165 bytes long, I tried every size down to 1 byte and 17 of the messages fail verification. It's consistent - if a particular message fails to verify and I sign it again, the new signature will also fail to verify.

 

0 项奖励
回复
1,533 次查看
Yuri
NXP Employee
NXP Employee

@jaymonkman 
Hello,

  I received the information, that the issue was solved.

The problem was an issue with the verification tool where strlen() was being misused.

Regards,
Yuri.

0 项奖励
回复