Packed structure.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 21 Jul 2007 12:59:28 +0000 (12:59 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 21 Jul 2007 12:59:28 +0000 (12:59 +0000)
lib/silccrypt/rsa.h

index 81247b05cbe93563e5df86e505e4805a922ab4e7..6a9506a4aadf5896080f723d632d9a18808c4b29 100644 (file)
 
 /* RSA Public Key */
 typedef struct {
-  int bits;                    /* bits in key */
   SilcMPInt n;                 /* modulus */
   SilcMPInt e;                 /* public exponent */
+  int bits;                    /* bits in key */
 } RsaPublicKey;
 
 /* RSA Private Key */
 typedef struct {
-  int bits;                    /* bits in key */
   SilcMPInt n;                 /* modulus */
   SilcMPInt e;                 /* public exponent */
   SilcMPInt d;                 /* private exponent */
@@ -38,6 +37,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,