Uso de esta libreria para funciones criptograficas con curvas elipticas.

Dependencies:   mbed tinydtls lwip-mbed-2010

Files at this revision

API Documentation at this revision

Comitter:
saranieves92
Date:
Fri Feb 06 11:00:19 2015 +0000
Child:
1:b7f306783a3c
Commit message:
Prueba con main en blanco. La libreria no compila

Changed in this revision

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
tinydtls.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Feb 06 11:00:19 2015 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+Serial pc(USBTX, USBRX); // tx, rx
+DigitalOut myled(LED1);
+
+int main() {
+    
+    
+    //ecc_gen_pub_key(const uint32_t *priv_key, uint32_t *pub_x, uint32_t *pub_y)
+    /*
+ *  d: private key on the curve secp256r1 (32 bytes)
+ *  e: hash to sign (32 bytes)
+ *  k: random data, this must be changed for every signature (32 bytes)
+ *
+ * output:
+ *  r: r value of the signature (36 bytes)
+ *  s: s value of the signature (36 bytes)
+ *
+ * return:
+ *   0: everything is ok
+ *  -1: can not create signature, try again with different k.
+ */
+   /*uint32_t kPrivada=1147483647;
+    uint32_t hash=2147483117;
+    uint32_t ran=1147483147;
+    uint32_t firma_r;
+    uint32_t firma_s;
+    if (ecc_ecdsa_sign(&kPrivada, &hash, &ran, &firma_r, &firma_s)==0)  pc.printf("Hola Mundo\n");
+    else  pc.printf("Adios Mundo Cruel\n");
+    
+    */
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Feb 06 11:00:19 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e188a91d3eaa
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tinydtls.lib	Fri Feb 06 11:00:19 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/ashleymills/code/tinydtls/#598a56fe116e