BF512 vs Lockbox

Hello,

I'm work with lockbox on custom board with ADSP-BF512 and have problem that can't enter in secure mode.

I tryed own code and WassimB's example. I tryed generate sign by different methods (including AD example's ecsign.exe). No any result.

After SESR exit i have 0x00D0 (AFEXIT = 1; SECSTAT = 6) in SECURE_STATUS register and 0xFFF4 (SECFW_ERROR_AUTH_FAILED) as SESR error code.

You'll find my code in attach (some modified WassimB's code).

Can anybody help me?  Where is my problem?

PS: today i'm checked my key pair and signature generation with ecsver2 example program from miracle library. It was verified successfully.

Thanks in advance,

Peter

Message was edited by: Peter Eliseev

lockbox.zip