This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28P650DK: Performance numbers on running software based ECC crypto on an image (SHA2 + ECC).

Part Number: TMS320F28P650DK

Tool/software:

Team,

Do we have any performance numbers on running software based ECC crypto on an image (SHA2 + ECC).

Our customer is very interested to know the time it takes to verify a 1MB signed image for example.

Any input welcomed.

TY,

CY

  • Hi Chris,

    Below are the benchmark details for the ECC384 verify function for a signature. Note the timing is shown for only verifying the signature.

    Algorithm Memory Allocation (Code + Data + Const) Total Size (RAM + FLASH) (Bytes) Cycle Count Time in Secs (128KB of Flash)
    F28003x, 120 MHz
    Est. Time in Secs (256KB of Flash)
    F28P55x, 150 MHz
    Est. Time in Secs (256KB of Flash)
    F28P65x, 200 MHz
    ECDSA384_verify Only Optimized functions mADD_L8, mMULT in RAM, rest in FLASH 19243 47,652,329 0.397103 0.317682 0.238262
    All code in Flash 18747 87,336,890 0.727807 0.582246 0.436684

    Regards,

    Ozino

  • Thank you Ozino, much obliged!
    I've asked the customer to review this for any additional feedback/questions.

    let's keep it open for now - we'll close it shortly.

    TY,

    Chris

  • Hi. I am the customer Slight smile

    We are using the P650 and can run @ 200MHz.

    So if we do the signature verify on the full 1.28MB of flash memory, we are looking at probably ~2.5 seconds ?

    Also, I do not believe we would be using ECC384, but ECC256. I am assuming an ECC256 verify would be even faster ?

    Thanks

  • Yes the timing with the ECC256 version is faster. should be about 2.5-4x times faster.

    Please note in this implementation the signature verification is done on a signed hash (SHA256) of fixed length. So the memory of the app is not a constraint when verifying the signature.

    However, the hash calculation will be impacted if that also needs to be done at run-time as that will require more cycles to run a hash over a larger areas of flash.

    Regards,

    Ozino

  • I am interested in performance numbers for the entire operation (SHA2 hash + ECC verify) as requested in the OP. You are indicating that the numbers given are only for the ECC verify part. Do we have any performance numbers for the SHA2 hash of 1MB of memory ?

    We are investigating the viability of performing an ECC signature verification on boot in a secure boot scenario. The chip boots and verifies the validity of an application image of 1MB. Pretty standard stuff. I don't believe just knowing the performance numbers of the ECC verify operation is very useful if the entire operation (SHA2 + ECC verify) is what will determine our bootup time. The ECC verify numbers are palatable; however, if we are saying that a SHA2 of 1MB takes 10 seconds.. that's 10 seconds added to our boot time, which is not very useful at that point..

    Thanks

  • Hi Colton, 

    Sure, below is a table for the bytewise and wordwise SHA256 implementations. Please note that the timings provided are estimated based on profiling done on the F28003x devices.

    Algorithm Memory Allocation (Code + Data + Const) Cycle Count Time in Secs
    (128KB of Flash)
    F28003x,
    120 MHz
    Est Time in Secs
    (256KB of Flash)
    F28P55x,
    150 MHz
    Est Time in Secs
    (256KB of Flash)
    F28P65x,
    200 MHz
    SHA256_ByteWise Only Optimized functions and SHA Const in RAM 30126 0.25105 0.40168 0.30126
    All code in Flash 33165 0.276375 0.4422 0.33165
    SHA256_WordWise Only Optimized functions and SHA Const in RAM 25467 0.212225 0.33956 0.25467
    All code in Flash 27347 0.227891667 0.364626667 0.27347
    Algorithm Memory Allocation (Code + Data + Const) Cycle Count

    Time in Secs (128KB of Flash)
    F28003x,

    120 MHz

    Est. Time in Secs (256KB of Flash)
    F28P55x,

    150 MHz

    Est. Time in Secs (256KB of Flash)
    F28P65x,

    200 MHz

    ECDSA256_verify Only Optimized functions mADD_L8, mMULT in RAM, rest in FLASH 30,280,046 0.25233372 0.201867 0.1514

    Based on your request to generate a hash of 1 MB of memory, you would be looking at timings of about ~1.1s (SHA 256 hash of 1MB) + 0.16s (ECC256 verify of hash) for a total time to hash data and verify signature of roughly about 1.26 seconds (on F28P65x for 256-bit) for the entire operation stated.

    And about ~2.5s on F28P65x for 384-bit  implementation for these algorithms.

    I've used the underlined numbers in the table to estimate the timing. Please note we have plans to release examples that demonstrate secure boot using these algorithms later this year.

    Let me know if that is the information you are looking for.

    Regards,

    Ozino

  • Yes, this is the information I was looking for. Thanks!

  • Great! Thank you for the feedback.