X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccrypt%2Frsa.c;h=cc5e09885906813975be848d2d2e8a6b819d2b19;hb=bd548b5771a325d3dc051887d3fd0225550d4418;hp=96fbf1e3e62efb9959d509d99dcdcce92eed8860;hpb=8fd8212bcd16f2b53fbedff2a9b9a4e8c15b9695;p=crypto.git diff --git a/lib/silccrypt/rsa.c b/lib/silccrypt/rsa.c index 96fbf1e3..cc5e0988 100644 --- a/lib/silccrypt/rsa.c +++ b/lib/silccrypt/rsa.c @@ -5,7 +5,7 @@ Author: Pekka Riikonen - Copyright (C) 1997 - 2007 Pekka Riikonen + Copyright (C) 1997 - 2008 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,7 +46,6 @@ everything else too about cryptography. */ -/* $Id$ */ /* ChangeLog @@ -74,7 +73,7 @@ starting point in key generation. */ -#include "silc.h" +#include "silccrypto.h" #include "rsa.h" /* Generates RSA public and private keys. Primes p and q that are used @@ -98,6 +97,10 @@ SilcBool silc_rsa_generate_keys(SilcUInt32 bits, SilcMPInt *p, SilcMPInt *q, if (!privkey) return FALSE; + /* Default hash shall be sha1 */ + silc_hash_alloc("sha1", &pubkey->hash); + silc_hash_alloc("sha1", &privkey->hash); + /* Initialize variables */ silc_mp_init(&privkey->n); silc_mp_init(&privkey->e);