Operaciones de generacion de claves, D-H, firma y validacion.

Dependencies:   mbed CyaSSL

Files at this revision

API Documentation at this revision

Comitter:
saranieves92
Date:
Fri Feb 20 18:37:50 2015 +0000
Parent:
4:3b216ade5a24
Commit message:
intento de rsa

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
pruebas.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/CyaSSL.lib	Mon Feb 16 22:30:21 2015 +0000
+++ b/CyaSSL.lib	Fri Feb 20 18:37:50 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/toddouska/code/CyaSSL/#5045d2638c29
+http://developer.mbed.org/users/saranieves92/code/CyaSSL/#ca372ff4b2fe
--- a/main.cpp	Mon Feb 16 22:30:21 2015 +0000
+++ b/main.cpp	Fri Feb 20 18:37:50 2015 +0000
@@ -7,6 +7,8 @@
 #include <alloca.h>
 #include "sha256.h"
 #include "ecc.h"
+#include "ctc_rsa.h"
+
 Serial pc(USBTX, USBRX); // tx, rx
 
 void vli_print(uint32_t *p_vli, unsigned int p_size)
@@ -18,6 +20,21 @@
     }
 }
 
+int rsa_test()
+{
+        RsaKey genKey;
+        InitRsaKey(&genKey, 0);
+        for (int i=0; i<100;i++){
+            pc.printf("%d ", genKey.p.dp[i]);
+            }
+            RsaKey* key;
+            RNG* rng;
+            InitRng(rng);
+        MakeRsaKey(key, 512, 65537, rng);
+    return 0;
+}
+
+
 int main() {
     clock_t t_ini, t_fin;
   double secs;
@@ -132,5 +149,7 @@
   secs = (double)(t_fin - t_ini) / CLOCKS_PER_SEC;
    pc.printf("%.16g milisegundos\n", secs * 1000.0);
    
+   rsa_test();
     
 }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pruebas.cpp	Fri Feb 20 18:37:50 2015 +0000
@@ -0,0 +1,4 @@
+#include "ctc_rsa.h"
+#include <cstdlib>
+
+