|
| 1 | +# wolfSSL Benchmark Example |
| 2 | + |
| 3 | +This ESP32 example uses the [wolfSSL wolfcrypt Benchmark Application](https://github.com/wolfSSL/wolfssl/tree/master/wolfcrypt/benchmark). |
| 4 | + |
| 5 | +Other target boards _should_ work, but have not yet been tested. |
| 6 | + |
| 7 | +For general information on [wolfSSL examples for Espressif](../README.md), see the |
| 8 | +[README](https://github.com/wolfSSL/wolfssl/blob/master/IDE/Espressif/ESP-IDF/README.md) file. |
| 9 | + |
| 10 | +## Example Output |
| 11 | + |
| 12 | +Note the default wolfSSL `user_settings.h` is configured by default to be the most |
| 13 | +compatible across the widest ranges of targets. Contact wolfSSL at [email protected] |
| 14 | +for help in optimizing for your particular application, or see the |
| 15 | +[docs](https://www.wolfssl.com/documentation/manuals/wolfssl/index.html). |
| 16 | + |
| 17 | +Compiled and flashed with `idf.py build flash -p /dev/ttyS7 -b 115200 monitor`: |
| 18 | + |
| 19 | +``` |
| 20 | +--- idf_monitor on /dev/ttyS7 115200 --- |
| 21 | +--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- |
| 22 | + (377) cpu_start: Starting scheduler ets Jun 8 2016 00:22:57 |
| 23 | +
|
| 24 | +rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) |
| 25 | +configsip: 0, SPIWP:0xee |
| 26 | +clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 |
| 27 | +mode:DIO, clock div:2 |
| 28 | +load:0x3fff0030,len:6664 |
| 29 | +load:0x40078000,len:14848 |
| 30 | +load:0x40080400,len:3792 |
| 31 | +0x40080400: _init at ??:? |
| 32 | +
|
| 33 | +entry 0x40080694 |
| 34 | +I (27) boot: ESP-IDF v4.4.2-dirty 2nd stage bootloader |
| 35 | +I (27) boot: compile time 13:41:41 |
| 36 | +I (27) boot: chip revision: 1 |
| 37 | +I (30) boot_comm: chip revision: 1, min. bootloader chip revision: 0 |
| 38 | +I (37) boot.esp32: SPI Speed : 40MHz |
| 39 | +I (42) boot.esp32: SPI Mode : DIO |
| 40 | +I (46) boot.esp32: SPI Flash Size : 2MB |
| 41 | +I (51) boot: Enabling RNG early entropy source... |
| 42 | +I (56) boot: Partition Table: |
| 43 | +I (60) boot: ## Label Usage Type ST Offset Length |
| 44 | +I (67) boot: 0 nvs WiFi data 01 02 00009000 00006000 |
| 45 | +I (75) boot: 1 phy_init RF data 01 01 0000f000 00001000 |
| 46 | +I (82) boot: 2 factory factory app 00 00 00010000 00100000 |
| 47 | +I (90) boot: End of partition table |
| 48 | +I (94) boot_comm: chip revision: 1, min. application chip revision: 0 |
| 49 | +I (101) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=12bf4h ( 76788) map |
| 50 | +I (137) esp_image: segment 1: paddr=00022c1c vaddr=3ffb0000 size=02420h ( 9248) load |
| 51 | +I (141) esp_image: segment 2: paddr=00025044 vaddr=40080000 size=0afd4h ( 45012) load |
| 52 | +I (161) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=33148h (209224) map |
| 53 | +I (237) esp_image: segment 4: paddr=00063170 vaddr=4008afd4 size=00550h ( 1360) load |
| 54 | +I (238) esp_image: segment 5: paddr=000636c8 vaddr=50000000 size=00010h ( 16) load |
| 55 | +I (249) boot: Loaded app from partition at offset 0x10000 |
| 56 | +I (249) boot: Disabling RNG early entropy source... |
| 57 | +I (266) cpu_start: Pro cpu up. |
| 58 | +I (266) cpu_start: Starting app cpu, entry point is 0x40081098 |
| 59 | +0x40081098: call_start_cpu1 at /mnt/c/SysGCC/esp32/esp-idf/v4.4.2/components/esp_system/port/cpu_start.c:160 |
| 60 | +
|
| 61 | +I (0) cpu_start: App cpu up. |
| 62 | +I (280) cpu_start: Pro cpu start user code |
| 63 | +I (280) cpu_start: cpu freq: 240000000 |
| 64 | +I (280) cpu_start: Application information: |
| 65 | +I (285) cpu_start: Project name: wolfssl_benchmark |
| 66 | +I (291) cpu_start: App version: v5.5.3-stable-108-gbd7b442df-di |
| 67 | +I (298) cpu_start: Compile time: Nov 17 2022 14:10:03 |
| 68 | +I (304) cpu_start: ELF file SHA256: fbb520f5bbf963a0... |
| 69 | +I (310) cpu_start: ESP-IDF: v4.4.2-dirty |
| 70 | +I (316) heap_init: Initializing. RAM available for dynamic allocation: |
| 71 | +I (323) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM |
| 72 | +I (329) heap_init: At 3FFB3DE8 len 0002C218 (176 KiB): DRAM |
| 73 | +I (335) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM |
| 74 | +I (341) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM |
| 75 | +I (348) heap_init: At 4008B524 len 00014ADC (82 KiB): IRAM |
| 76 | +I (355) spi_flash: detected chip: generic |
| 77 | +I (359) spi_flash: flash io: dio |
| 78 | +W (362) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header. |
| 79 | +I (377) cpu_start: Starting scheduler on PRO CPU. |
| 80 | +I (0) cpu_start: Starting scheduler on APP CPU. |
| 81 | +I (391) wolfssl_benchmark: app_main CONFIG_BENCH_ARGV = -lng 0 |
| 82 | +I (397) wolfssl_benchmark: construct_argv arg:-lng 0 |
| 83 | +
|
| 84 | +------------------------------------------------------------------------------ |
| 85 | + wolfSSL version 5.5.3 |
| 86 | +------------------------------------------------------------------------------ |
| 87 | +wolfCrypt Benchmark (block bytes 1024, min 1.0 sec each) |
| 88 | +RNG 1 MiB took 1.017 seconds, 1.320 MiB/s |
| 89 | +AES-128-CBC-enc 6 MiB took 1.002 seconds, 5.726 MiB/s |
| 90 | +AES-128-CBC-dec 5 MiB took 1.000 seconds, 5.347 MiB/s |
| 91 | +AES-192-CBC-enc 6 MiB took 1.004 seconds, 5.714 MiB/s |
| 92 | +AES-192-CBC-dec 5 MiB took 1.001 seconds, 5.341 MiB/s |
| 93 | +AES-256-CBC-enc 6 MiB took 1.000 seconds, 5.713 MiB/s |
| 94 | +AES-256-CBC-dec 5 MiB took 1.002 seconds, 5.336 MiB/s |
| 95 | +AES-128-GCM-enc 300 KiB took 1.004 seconds, 298.805 KiB/s |
| 96 | +AES-128-GCM-dec 300 KiB took 1.004 seconds, 298.805 KiB/s |
| 97 | +AES-192-GCM-enc 300 KiB took 1.007 seconds, 297.915 KiB/s |
| 98 | +AES-192-GCM-dec 300 KiB took 1.008 seconds, 297.619 KiB/s |
| 99 | +AES-256-GCM-enc 300 KiB took 1.011 seconds, 296.736 KiB/s |
| 100 | +AES-256-GCM-dec 300 KiB took 1.011 seconds, 296.736 KiB/s |
| 101 | +GMAC Default 403 KiB took 1.002 seconds, 402.196 KiB/s |
| 102 | +3DES 450 KiB took 1.028 seconds, 437.743 KiB/s |
| 103 | +MD5 14 MiB took 1.001 seconds, 13.756 MiB/s |
| 104 | +SHA 14 MiB took 1.001 seconds, 14.463 MiB/s |
| 105 | +SHA-256 14 MiB took 1.000 seconds, 14.233 MiB/s |
| 106 | +SHA-512 17 MiB took 1.000 seconds, 16.626 MiB/s |
| 107 | +HMAC-MD5 14 MiB took 1.000 seconds, 13.599 MiB/s |
| 108 | +HMAC-SHA 14 MiB took 1.000 seconds, 13.989 MiB/s |
| 109 | +HMAC-SHA256 14 MiB took 1.000 seconds, 13.940 MiB/s |
| 110 | +HMAC-SHA512 16 MiB took 1.000 seconds, 16.064 MiB/s |
| 111 | +PBKDF2 640 bytes took 1.009 seconds, 634.291 bytes/s |
| 112 | +RSA 2048 public 52 ops took 1.022 sec, avg 19.654 ms, 50.881 ops/sec |
| 113 | +RSA 2048 private 4 ops took 1.056 sec, avg 264.000 ms, 3.788 ops/sec |
| 114 | +ECC [ SECP256R1] 256 key gen 4 ops took 1.216 sec, avg 304.000 ms, 3.289 ops/sec |
| 115 | +ECDHE [ SECP256R1] 256 agree 4 ops took 1.215 sec, avg 303.750 ms, 3.292 ops/sec |
| 116 | +ECDSA [ SECP256R1] 256 sign 4 ops took 1.226 sec, avg 306.500 ms, 3.263 ops/sec |
| 117 | +ECDSA [ SECP256R1] 256 verify 2 ops took 1.172 sec, avg 586.000 ms, 1.706 ops/sec |
| 118 | +CURVE 25519 key gen 3 ops took 1.279 sec, avg 426.333 ms, 2.346 ops/sec |
| 119 | +CURVE 25519 agree 4 ops took 1.701 sec, avg 425.250 ms, 2.352 ops/sec |
| 120 | +ED 25519 key gen 46 ops took 1.008 sec, avg 21.913 ms, 45.635 ops/sec |
| 121 | +ED 25519 sign 42 ops took 1.038 sec, avg 24.714 ms, 40.462 ops/sec |
| 122 | +ED 25519 verify 26 ops took 1.009 sec, avg 38.808 ms, 25.768 ops/sec |
| 123 | +Benchmark complete |
| 124 | +``` |
0 commit comments