sara matheu
/
CurvasElipticas
Operaciones de generacion de claves, D-H, firma y validacion.
Diff: main.cpp
- Revision:
- 5:4f619b9a7bb2
- Parent:
- 3:74a69ff114ba
--- 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(); } +