1.1 Speed Test
Introduction
Extensible crypto module speed test framework.
Description
This demonstration exercises several cryptographic functions, including TDES, DES, SHA 128-512, AES, and RSA, to verify that the software or hardware is performing correctly and to determine the speed of each function for various data sizes. Data is taken from Microchip example code, NSA test vectors, and other sources.
Building the Application
To build the application, the project corresponding to the test hardware must be opened in MPLAB X IDE. The following table lists projects and supported configurations. The parent folder for these projects is crypto_apps_speed_test\apps\speed_tests\firmware.
MPLAB X IDE Projects
| Project Name | BSP Used | Description |
|---|---|---|
| sam_e54_xplained_pro_hw.X | sam_e54_xplained_pro | SpeedTest project using the SAME54 and hardware cryptography |
| sam_e54_xplained_pro_hwsw.X | sam_e54_xplained_pro | SpeedTest project using the SAME54 and software cryptography |
| sam_e70_xplained_ultra_hw.X | sam_e70_xplained_ultra | SpeedTest project using the SAME70 and hardware cryptography |
| sam_e70_xplained_ultra_sw.X | sam_e70_xplained_ultra | SpeedTest project using the SAME70 and software cryptography |
| sam_l11_xplained_pro_hw.X | sam_l11_xplained_pro | SpeedTest project using the SAML11 and hardware cryptography |
| sam_l11_xplained_pro_hwsw.X | sam_l11_xplained_pro | SpeedTest project using the SAML11 and software cryptography |
| sam_l21_xplained_pro_hw.X | sam_l21_xpro | SpeedTest project using the SAML21 and hardware cryptography |
| sam_l21_xplained_pro_sw.X | sam_l21_xpro | SpeedTest project using the SAML21 and software cryptography |
| pic32mz_wifi_curiosity_hw.X | pic32mz_wifi_curiosity | SpeedTest project using the PIC32MZ-W1 and hardware cryptography |
| pic32mz_wifi_curiosity_sw.X | pic32mz_wifi_curiosity | SpeedTest project using the PIC32MZ-W1 and software cryptography |
| sam_9x60_ek_hw.X | sam_9x60_ek | SpeedTest project using the SAM9X60 and hardware cryptography |
| sam_9x60_ek_sw.X | sam_9x60_ek | SpeedTest project using the SAM9X60 and software cryptography |
| sam_a5d2_wlsom1_ek1_hw.X | sam_a5d2_wlsom1_ek1 | SpeedTest project using the ATSAMA5D27-WLSOM1 and hardware cryptography |
| sam_a5d2_wlsom1_ek1_sw.X | sam_a5d2_wlsom1_ek1 | SpeedTest project using the ATSAMA5D27-WLSOM1 and software cryptography |
| sam_a5d2_xplained_ultra_hw.X | sam_a5d2_xplained_ultra | SpeedTest project using the ATSAMA5D2C-XULT and hardware cryptography |
| sam_a5d2_xplained_ultra_sw.X | sam_a5d2_xplained_ultra | SpeedTest project using the ATSAMA5D2C-XULT and software cryptography |
| sam_rh71_ek_hw.X | sam_rh71_ek | SpeedTest project using the SAMRH71F20-EK and hardware cryptography |
| sam_rh71_ek_sw.X | sam_rh71_ek | SpeedTest project using the SAMRH71F20-EK and software cryptography |
Each application is built by using the standard MPLAB X IDE buttons.
Configuring the Hardware
Running the Demonstration
- Connect the board to the PC as described in the Configuring the Hardware section.
- Configure a terminal application
(e.g., Tera Term) to access the newly attached serial port:
- 115,200 bps
- 8 data bits
- No parity
- 1 stop bit
- No flow control
- Compile the demonstration using
MPLAB X:
- Use the standard MPLAB X IDE buttons
Note: The application for the PIC32MZ Wi-Fi Curiosity Board can be built using MPLAB X IDE v6.35. However, the on-board programmer for this board is not detected with this IDE version. To program the board successfully, users must use MPLAB X IDE v6.20 or MPLAB IPE v6.20. - Observe or capture the output from the serial console.
Application Output
The demonstration runs in two phases. In the first phase, each data set is exercised and the results are checked against known-good cipher text (when available). Encryption drivers also decrypt the cipher and verify against the original plain text. These calculations are not timed.
The second phase repeats each data set multiple times to get a statistical average of run-time, but does not check the results. Most functions are repeated 1000 times, but long-running operations, such as RSA, may have as few as 5 or 10 repetitions.
Test results output lines begin with ">>". The second phase output is in CSV file format and can be imported to Excel, including any error or warning messages. Each project will have different timing results.
Example console output is shown in SAML21 Example Output.
