rsa con cyassl

Dependencies:   cyassl_rsa mbed

Files at this revision

API Documentation at this revision

Comitter:
saranieves92
Date:
Sun May 31 19:31:44 2015 +0000
Commit message:
rsa con cyassl

Changed in this revision

cyassl.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /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