www.beck-ipc.com

@CHIP-RTOS - Cryptographic API Benchmark Timing


Cryptographic Functions Benchmark Timing

These timing measurements allow a comparison of the various cryptographic functions offered by the @CHIP-RTOS-x86 API.

Encryption / Decryption API Measurements

Here are the execution times to encrypt or decrypt 1024 bytes.

Method Key Size Key in normal RAM Key in fast RAM
AES 128 bits 8947 usec (8178 usec) 8600 usec (7891 usec)
AES 192 bits 10538 usec (9766 usec) 10111 usec (9421 usec)
AES 256 bits 12145 usec (11349 usec) 11634 usec (10950 usec)
Blowfish variable (up to 448 bits) 3999 usec 2936 usec
DES 56 bits 7791 usec 7529 usec
3DES 168 bits 22078 usec 21292 usec

Notes:
  1. The listed times are the number of microseconds required to either encrypt or decrypt 1024 bytes of data using the respective cipher method.   (The symmetric algorithms require the same amount of time in either direction.)

  2. The slightly lower times for AES that are stated within the parenthesis are for execution with the dynamic link variant of the API used when the TCPIP_DYN_LINK macro is defined.

  3. The tests were executed from a task with a high task priority from within a loop over the specified number of bytes.

  4. The BLOWFISH cipher times are not a function of key size.   The timing values will not increase when a longer key size is used.

  5. As can be seen by comparing the table's two timing columns, the cipher performance can be improved by allocating the respective key schedule data or context object from the system's fast RAM heap area. (For the internal use of these cipher methods by IPsec, only the BLOWFISH cipher key schedule data is allocated from fast RAM, assuming this heap memory space was available. IPsec allocates all other cipher key schedule objects from normal RAM.)

Hash Function API Measurements

Here are the execution times to run the respective hash method over a 1024 byte block of data.   Two columns of timing data are provided, one with the hash context object (Crypt_MD5_Context or Crypt_SHA1_Context) allocated from normal RAM and the second column for when allocated from fast RAM.   (Note: For the internal use of these hash methods by IPsec, all hash context objects are allocated from normal RAM.)

The slightly lower times that are stated within the parenthesis are for execution with the dynamic link variant of the API used when the TCPIP_DYN_LINK macro is defined prior to the clib.h header file (recommended).

This first table excludes the time required for the hash initialization and finish API.

Method Context in normal RAM Context in fast RAM
MD5 2913 usec (2872 usec) 2738 usec (2697 usec)
SHA1 4649 usec (4663 usec) 4331 usec (4319 usec)


In this table, the time required for the hash initialization and finish calls is included in the 1024 byte hash timing measurement.

Method Context in normal RAM Context in fast RAM
MD5 3127 usec (3042 usec) 2941 usec (2884 usec)
SHA1 4955 usec (4927 usec) 4625 usec (4591 usec)

Related Topics

IPsec benchmark tests

Top of list
Index page


End of document