Added support for default hash functions in all PKCS algorithm schemes.
[crypto.git] / lib / silccrypt / rsa.h
index 81247b05cbe93563e5df86e505e4805a922ab4e7..1302f3b4c52f2ca0a0395eb1a400f51f28ed8d6e 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  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
 
 /* RSA Public Key */
 typedef struct {
-  int bits;                    /* bits in key */
+  SilcHash hash;               /* Default hash */
   SilcMPInt n;                 /* modulus */
   SilcMPInt e;                 /* public exponent */
+  int bits;                    /* bits in key */
 } RsaPublicKey;
 
 /* RSA Private Key */
 typedef struct {
-  int bits;                    /* bits in key */
+  SilcHash hash;               /* Default hash */
   SilcMPInt n;                 /* modulus */
   SilcMPInt e;                 /* public exponent */
   SilcMPInt d;                 /* private exponent */
@@ -38,6 +39,7 @@ typedef struct {
   SilcMPInt dP;                        /* CRT, d mod p - 1 */
   SilcMPInt dQ;                        /* CRT, d mod q - 1 */
   SilcMPInt qP;                        /* CRT, q ^ -1 mod p (aka u, aka qInv) */
+  int bits;                    /* bits in key */
 } RsaPrivateKey;
 
 SilcBool silc_rsa_generate_keys(SilcUInt32 bits, SilcMPInt *p, SilcMPInt *q,