X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccrypt%2Frsa.c;h=5607dfc2db41ca0576ae62ae17f4be263bdddac1;hb=72cfa31520ebc0058763a30e21c13f6e9a964aa0;hp=4fd1dc1b38de527cff288ad6eeff0afbbf0272a8;hpb=2be0be2432fff760084c4093291e79f1fa6262d8;p=silc.git diff --git a/lib/silccrypt/rsa.c b/lib/silccrypt/rsa.c index 4fd1dc1b..5607dfc2 100644 --- a/lib/silccrypt/rsa.c +++ b/lib/silccrypt/rsa.c @@ -73,7 +73,7 @@ SILC_PKCS_API_INIT(rsa) { - unsigned int prime_bits = keylen / 2; + uint32 prime_bits = keylen / 2; SilcInt p, q; printf("Generating RSA Public and Private keys, might take a while...\n"); @@ -128,7 +128,7 @@ SILC_PKCS_API_GET_PUBLIC_KEY(rsa) { RsaKey *key = (RsaKey *)context; unsigned char *e, *n, *ret; - unsigned int e_len, n_len; + uint32 e_len, n_len; unsigned char tmp[4]; e = silc_mp_mp2bin(&key->e, 0, &e_len); @@ -167,7 +167,7 @@ SILC_PKCS_API_GET_PRIVATE_KEY(rsa) { RsaKey *key = (RsaKey *)context; unsigned char *e, *n, *d, *ret; - unsigned int e_len, n_len, d_len; + uint32 e_len, n_len, d_len; unsigned char tmp[4]; e = silc_mp_mp2bin(&key->e, 0, &e_len); @@ -214,7 +214,7 @@ SILC_PKCS_API_SET_PUBLIC_KEY(rsa) { RsaKey *key = (RsaKey *)context; unsigned char tmp[4]; - unsigned int e_len, n_len; + uint32 e_len, n_len; silc_mp_init(&key->e); silc_mp_init(&key->n); @@ -252,7 +252,7 @@ SILC_PKCS_API_SET_PRIVATE_KEY(rsa) { RsaKey *key = (RsaKey *)context; unsigned char tmp[4]; - unsigned int e_len, n_len, d_len; + uint32 e_len, n_len, d_len; silc_mp_init(&key->e); silc_mp_init(&key->n); @@ -477,7 +477,7 @@ SILC_PKCS_API_VERIFY(rsa) to compute the modulus n has to be generated before calling this. They are then sent as argument for the function. */ -void rsa_generate_keys(RsaKey *key, unsigned int bits, +void rsa_generate_keys(RsaKey *key, uint32 bits, SilcInt *p, SilcInt *q) { SilcInt phi, hlp;