Hi, suspend-keygen fails silently generating keys larger than approximately 3500 bits. The problem is that RSA_DATA_SIZE is to small for the test
if (offset + size >= RSA_DATA_SIZE) to pass. Although RSA_DATA_SIZE is big enough to accommodate the biggest keys in practice. The theoretical size the keygen.c code could write to the buffer is 3072. The patch fixes this. OK, to commit? grts Tim RCS file: /cvsroot/suspend/suspend/encrypt.h,v retrieving revision 1.5 diff -u -r1.5 encrypt.h --- encrypt.h 14 Sep 2006 14:18:58 -0000 1.5 +++ encrypt.h 11 Dec 2006 12:17:18 -0000 @@ -28,7 +28,7 @@ #define PK_KEY_SIZE 16 #define PK_CIPHER_BLOCK 16 /* Auxiliary constants */ -#define RSA_DATA_SIZE 2000 +#define RSA_DATA_SIZE 3072 #define KEY_DATA_SIZE 1000 #define RSA_FIELDS 6 #define RSA_FIELDS_PUB 2 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel