This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

About the processing time of "nrf_crypto" API

SDK: 15.3.0
Sample: aes_ctr, ecdh
Device: EYSHJNZWZ (nRF52832)

I'm considering using the "Cryptography library - nrf_crypto".
Therefore, I am looking at the above sample.
These samples use the following API as an example.

[Sample : aes_ctr]
・nrf_crypto_aes_update
・nrf_crypto_aes_finalize
・nrf_crypto_aes_crypt

[Sample : ecdh]
・nrf_crypto_ecc_public_key_from_raw
・nrf_crypto_ecc_private_key_from_raw
・nrf_crypto_ecdh_compute
・nrf_crypto_ecc_private_key_free
・nrf_crypto_ecc_public_key_free
・nrf_crypto_ecc_key_pair_generate

I want to know the processing time of these "nrf_crypto" APIs.
I assume that it will take time to process because it performs complicated operations such as encryption and decryption.
I don't know if it's in seconds or not.
The above is an example, but the same is true for other APIs.
Is there a document that describes the processing time of each API?
Please tell me.

Parents
  • Hi,

    We do not have official documentation with processing times. That depends on a number of factors, so the best is to test yourself. Then you can use the nrf_crypto examples in the SDK, and modify the parameters to your specific needs, and measure for instance by toggling a GPIO connected to a logic analyzer or measure execution time in another way.

    For most of the functions you listed these factors will significantly impact the numbers you get:

    To give you a feeling, here is a few relevant numbers:

    • mbedtls', 'AES CTR 128 Encrypt message_len=250', 'armgcc') OK - Execution Time: 0.4730ms
    • mbedtls', 'AES CTR 128 Encrypt message_len=16 1', 'armgcc') OK - Execution Time: 0.0566ms
    • mbedtls', 'AES CTR 128 Encrypt message_len=0', 'armgcc') OK - Execution Time: 0.0265ms

    Where obviously the message length has a great impact.

Reply
  • Hi,

    We do not have official documentation with processing times. That depends on a number of factors, so the best is to test yourself. Then you can use the nrf_crypto examples in the SDK, and modify the parameters to your specific needs, and measure for instance by toggling a GPIO connected to a logic analyzer or measure execution time in another way.

    For most of the functions you listed these factors will significantly impact the numbers you get:

    To give you a feeling, here is a few relevant numbers:

    • mbedtls', 'AES CTR 128 Encrypt message_len=250', 'armgcc') OK - Execution Time: 0.4730ms
    • mbedtls', 'AES CTR 128 Encrypt message_len=16 1', 'armgcc') OK - Execution Time: 0.0566ms
    • mbedtls', 'AES CTR 128 Encrypt message_len=0', 'armgcc') OK - Execution Time: 0.0265ms

    Where obviously the message length has a great impact.

Children
No Data
Related