Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include <mbed.h> 00002 #include <time.h> 00003 #include <string> 00004 #include <stdlib.h> 00005 #include <cstdio> 00006 #include <cstdlib> 00007 #include <alloca.h> 00008 #include <cyassl/asn.h> 00009 #include <cyassl/ctc_rsa.h> 00010 00011 Serial pc(USBTX, USBRX); // tx, rx 00012 00013 int main() { 00014 clock_t t_ini, t_fin; 00015 double secs; 00016 RsaKey genKey; 00017 RNG rng; 00018 InitRng(&rng); 00019 for (int i=0; i<30;i++){ 00020 t_ini = clock(); 00021 InitRsaKey(&genKey, 0); 00022 MakeRsaKey(&genKey, 512, 65537, &rng); 00023 FreeRsaKey(&genKey); 00024 t_fin = clock(); 00025 secs = (double)(t_fin - t_ini) / CLOCKS_PER_SEC; 00026 pc.printf("%.16g\n", secs * 1000.0); 00027 } 00028 }
Generated on Thu Jul 21 2022 22:50:17 by
1.7.2