sara matheu
/
mbed_cyassl
rsa con cyassl
Revision 0:a0ac34d8494a, committed 2015-05-31
- Comitter:
- saranieves92
- Date:
- Sun May 31 19:31:44 2015 +0000
- Commit message:
- rsa con cyassl
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cyassl.lib Sun May 31 19:31:44 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/saranieves92/code/cyassl_rsa/#04ea34bf3bff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun May 31 19:31:44 2015 +0000 @@ -0,0 +1,28 @@ +#include <mbed.h> +#include <time.h> +#include <string> +#include <stdlib.h> +#include <cstdio> +#include <cstdlib> +#include <alloca.h> +#include <cyassl/asn.h> +#include <cyassl/ctc_rsa.h> + +Serial pc(USBTX, USBRX); // tx, rx + +int main() { + clock_t t_ini, t_fin; + double secs; + RsaKey genKey; + RNG rng; + InitRng(&rng); + for (int i=0; i<30;i++){ + t_ini = clock(); + InitRsaKey(&genKey, 0); + MakeRsaKey(&genKey, 512, 65537, &rng); + FreeRsaKey(&genKey); + t_fin = clock(); + secs = (double)(t_fin - t_ini) / CLOCKS_PER_SEC; + pc.printf("%.16g\n", secs * 1000.0); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun May 31 19:31:44 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/cbbeb26dbd92 \ No newline at end of file