SHA-256 calculation problem on large buffer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SHA-256 calculation problem on large buffer

2,457件の閲覧回数
davidrozenski
Contributor I

Dear,

I am using fsl_dcp.c driver to calculate SHA-256 and found strange problem, calling functions like :

status = DCP_HASH(DCP, &m_handle, kDCP_Sha256, (void*)0x60010000, 1000000, output, &outLength);

Never return it will be locked in this loop :

while ((base->STAT & (uint32_t)handle->channel) == handle->channel)
{
}

located in fsl_dcp.c function : DCP_WaitForChannelComplete

By removing this waiting loop it works and calculation are correct.

If length of buffer is less than 26000 (or close to this) it works.

Please advise.

Best Regards

David

ラベル(1)
タグ(2)
0 件の賞賛
返信
2 返答(返信)

2,286件の閲覧回数
jorge_a_vazquez
NXP Employee
NXP Employee

Hi David Rozenski

Sorry for the late reply, unfortunately, I'm not able to reproduce the issue that you are seeing. I imported the example code of the SDK 2.6.1 DCP, I comment all other tests and I used the same address and size of your code ((void*)0x60010000, 1000000, output, &outLength);. The DCP didn't lock in any part of the SHA256 process, can you try this and tell me if it works on your side.

Best regards

0 件の賞賛
返信

2,286件の閲覧回数
davidrozenski
Contributor I

Dear Jorge,

I upgraded SDK and thi sis ok Now.

Thanks and Regards

0 件の賞賛
返信