projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updates. New data types.
[silc.git]
/
lib
/
silccrypt
/
rsa.c
diff --git
a/lib/silccrypt/rsa.c
b/lib/silccrypt/rsa.c
index 4fd1dc1b38de527cff288ad6eeff0afbbf0272a8..5607dfc2db41ca0576ae62ae17f4be263bdddac1 100644
(file)
--- a/
lib/silccrypt/rsa.c
+++ b/
lib/silccrypt/rsa.c
@@
-73,7
+73,7
@@
SILC_PKCS_API_INIT(rsa)
{
SILC_PKCS_API_INIT(rsa)
{
- u
nsigned int
prime_bits = keylen / 2;
+ u
int32
prime_bits = keylen / 2;
SilcInt p, q;
printf("Generating RSA Public and Private keys, might take a while...\n");
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;
{
RsaKey *key = (RsaKey *)context;
unsigned char *e, *n, *ret;
- u
nsigned int
e_len, n_len;
+ u
int32
e_len, n_len;
unsigned char tmp[4];
e = silc_mp_mp2bin(&key->e, 0, &e_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;
{
RsaKey *key = (RsaKey *)context;
unsigned char *e, *n, *d, *ret;
- u
nsigned int
e_len, n_len, d_len;
+ u
int32
e_len, n_len, d_len;
unsigned char tmp[4];
e = silc_mp_mp2bin(&key->e, 0, &e_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];
{
RsaKey *key = (RsaKey *)context;
unsigned char tmp[4];
- u
nsigned int
e_len, n_len;
+ u
int32
e_len, n_len;
silc_mp_init(&key->e);
silc_mp_init(&key->n);
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];
{
RsaKey *key = (RsaKey *)context;
unsigned char tmp[4];
- u
nsigned int
e_len, n_len, d_len;
+ u
int32
e_len, n_len, d_len;
silc_mp_init(&key->e);
silc_mp_init(&key->n);
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. */
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, u
nsigned int
bits,
+void rsa_generate_keys(RsaKey *key, u
int32
bits,
SilcInt *p, SilcInt *q)
{
SilcInt phi, hlp;
SilcInt *p, SilcInt *q)
{
SilcInt phi, hlp;