Michal Schmidt wrote:
You can take a look at the attached patch, which shrinks struct
swsusp_info to 2028 bytes on i386. This is achieved by only saving the
components (n, e, d).
I am _not_ proposing to merge this one, because it requires a slightly
modified libgcrypt to work. Original libgcrypt insists on knowing all
the six components, even though it doesn't really need them. I consider
that a bug in libgcrypt.
Here's the libgcrypt hack, in case someone's interested.
Michal
diff -Nurp libgcrypt11-1.2.3/cipher/pubkey.c
libgcrypt11-1.2.3.hack/cipher/pubkey.c
--- libgcrypt11-1.2.3/cipher/pubkey.c 2005-07-29 15:45:48.000000000 +0200
+++ libgcrypt11-1.2.3.hack/cipher/pubkey.c 2007-01-20 02:54:44.000000000
+0100
@@ -709,7 +709,7 @@ sexp_elements_extract (gcry_sexp_t key_s
{
list = gcry_sexp_find_token (key_sexp, name, 1);
if (! list)
- err = GPG_ERR_NO_OBJ;
+ elements[idx] = NULL;
else
{
elements[idx] = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
diff -Nurp libgcrypt11-1.2.3/cipher/rsa.c libgcrypt11-1.2.3.hack/cipher/rsa.c
--- libgcrypt11-1.2.3/cipher/rsa.c 2005-07-29 15:45:48.000000000 +0200
+++ libgcrypt11-1.2.3.hack/cipher/rsa.c 2007-01-20 02:57:13.000000000 +0100
@@ -509,6 +509,9 @@ _gcry_rsa_decrypt (int algo, gcry_mpi_t
sk.q = skey[4];
sk.u = skey[5];
+ if (! (flags & PUBKEY_FLAG_NO_BLINDING) && !sk.e)
+ return GPG_ERR_NO_OBJ;
+
y = gcry_mpi_snew (gcry_mpi_get_nbits (sk.n));
if (! (flags & PUBKEY_FLAG_NO_BLINDING))
-------------------------------------------------------------------------
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