The wolfSSL package ships with several example projects which developers can use to get going quickly with wolfSSL on CS+ and e2studio platforms. The following example projects can be found under <wolfssl_root>/IDE/Renesas/es+(or e2studio)/Projects:
- wolfCrypt cryptography test
This application tests the wolfCrypt cryptography modules. It is generally a good idea to run this first on an MPU after compiling wolfSSL in order to verify all underlying crypto is working correctly.
- t4_demo application with CS+
This application is assumed to be built with an Alpha Project board with Renesas RX family MPU and its default firmware or driver. It includes TINET TCP/IP compatible Renesas firmware, T4Tiny.
The application has a console so that you can see message on the console prompting command as follows:
Command can be executed only once. You need to reset and restart MPU for following command:
t: wolfCrypt cryptography test
This application tests the wolfCrypt cryptography modules the same as above-mentioned test.
b: wolfCrypt benchmark test
This can be used on MPU to see cryptography algorithm benchmarks.
t: test, b: benchmark, s: server, or c : client$ bStart wolfCrypt Benchmark------------------------------------------------------------------------------ wolfSSL version 4.0.0------------------------------------------------------------------------------wolfCrypt Benchmark (block bytes 1024, min 1.0 sec each)RNG 775 KB took 1.031 seconds, 751.916 KB/sAES-128-CBC-enc 2 MB took 1.006 seconds, 1.505 MB/sAES-128-CBC-dec 1 MB took 1.010 seconds, 1.450 MB/sAES-192-CBC-enc 1 MB took 1.010 seconds, 1.378 MB/sAES-192-CBC-dec 1 MB took 1.011 seconds, 1.328 MB/sAES-256-CBC-enc 1 MB took 1.019 seconds, 1.270 MB/sAES-256-CBC-dec 1 MB took 1.014 seconds, 1.227 MB/sAES-128-GCM-enc 675 KB took 1.025 seconds, 658.858 KB/sAES-128-GCM-dec 675 KB took 1.026 seconds, 658.087 KB/sAES-192-GCM-enc 650 KB took 1.027 seconds, 633.220 KB/sAES-192-GCM-dec 650 KB took 1.028 seconds, 632.603 KB/sAES-256-GCM-enc 625 KB took 1.025 seconds, 609.697 KB/sAES-256-GCM-dec 625 KB took 1.026 seconds, 609.102 KB/sRABBIT 9 MB took 1.001 seconds, 8.534 MB/s3DES 475 KB took 1.035 seconds, 458.893 KB/sMD5 13 MB took 1.001 seconds, 13.275 MB/sSHA 5 MB took 1.002 seconds, 4.778 MB/sSHA-256 2 MB took 1.006 seconds, 1.650 MB/sSHA-384 675 KB took 1.034 seconds, 653.057 KB/sSHA-512 675 KB took 1.034 seconds, 652.994 KB/sHMAC-MD5 13 MB took 1.001 seconds, 13.142 MB/sHMAC-SHA 5 MB took 1.004 seconds, 4.768 MB/sHMAC-SHA256 2 MB took 1.014 seconds, 1.638 MB/sHMAC-SHA384 650 KB took 1.010 seconds, 643.437 KB/sHMAC-SHA512 650 KB took 1.011 seconds, 643.182 KB/sRSA 2048 public 26 ops took 1.067 sec, avg 41.038 ms, 24.367 ops/secRSA 2048 private 2 ops took 1.157 sec, avg 578.500 ms, 1.729 ops/secDH 2048 key gen 6 ops took 1.049 sec, avg 174.883 ms, 5.718 ops/secDH 2048 agree 6 ops took 1.191 sec, avg 198.433 ms, 5.039 ops/secECC 256 key gen 7 ops took 1.162 sec, avg 165.943 ms, 6.026 ops/secECDHE 256 agree 8 ops took 1.323 sec, avg 165.325 ms, 6.049 ops/secECDSA 256 sign 6 ops took 1.044 sec, avg 174.017 ms, 5.747 ops/secECDSA 256 verify 4 ops took 1.281 sec, avg 320.300 ms, 3.122 ops/secCURVE 25519 key gen 5 ops took 1.137 sec, avg 227.300 ms, 4.399 ops/secCURVE 25519 agree 6 ops took 1.366 sec, avg 227.583 ms, 4.394 ops/secED 25519 key gen 198 ops took 1.003 sec, avg 5.064 ms, 197.467 ops/secED 25519 sign 146 ops took 1.005 sec, avg 6.885 ms, 145.245 ops/secED 25519 verify 62 ops took 1.001 sec, avg 16.147 ms, 61.932 ops/secBenchmark completeEnd wolfCrypt Benchmark
Note 1:
Test condition: BoardAP-RX71M-0A, MPUR5F571MLDDFC, CS+v8.01.00,
Alpha Project example programv2.0
s: simple server accepting at port 50000
c: simple client. Specify IP address and port as c <IP Addr> <Port Num>
These applications are simple TLS client/server example programs using TINET TCP/IP connections. When testing the embedded client or server on MPU, it is recommended to test against one of the standard wolfSSL example applications running on a desktop machine.
[Client]
Desktop machine:
$ ./examples/server/server -b -dSSL version is TLSv1.2SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384SSL curve name is SECP256R1Client message: Hello Server
Board side:
wolfSSL Demot: test, b: benchmark, s: server, or c <IP addr> <Port>: client$ c 192.168.1.202 11111Start TLS Client(192.168.1.202, 11111)Received: I hear you fa shizzle!End TLS Client
[Server]
Board side:
wolfSSL Demot: test, b: benchmark, s: server, or c <IP addr> <Port>: client$ sStart TLS ServerReceived: hello wolfssl!End TLS Server
Desktop machine:
$ ./examples/client/client -h 192.168.1.200 -p 50000SSL version is TLSv1.2SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384SSL curve name is SECP256R1hello wolfssl!