sara matheu
/
CurvasElipticas
Operaciones de generacion de claves, D-H, firma y validacion.
Revision 5:4f619b9a7bb2, committed 2015-02-20
- Comitter:
- saranieves92
- Date:
- Fri Feb 20 18:37:50 2015 +0000
- Parent:
- 4:3b216ade5a24
- Commit message:
- intento de rsa
Changed in this revision
diff -r 3b216ade5a24 -r 4f619b9a7bb2 CyaSSL.lib --- 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
diff -r 3b216ade5a24 -r 4f619b9a7bb2 main.cpp --- 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(); } +
diff -r 3b216ade5a24 -r 4f619b9a7bb2 pruebas.cpp --- /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> + +