out of memory error during key generation

Mike Ashley jashley at yorktown.designlab.ukans.edu
Wed Jun 16 05:46:01 CEST 1999


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am getting out of memory errors during key generation.  Below are
two transcripts.  The first is with gpg setuid to root.  The second has
the setuid bit disabled.  Chloe's key was freshly generated and is the
only key on the secret and public keyrings.  I can reproduce this bug.

In the case where the setuid bit is set, I can successfully add the two
keys if I quit gpg after adding the first key.

Mike


gpg (GnuPG) 0.9.7; Copyright (C) 1999 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Secret key is available.

pub  1024D/26B6AAE1  created: 1999-06-15 expires: never      trust: -/u
sub  2048g/0CF8CB7A  created: 1999-06-15 expires: never     
(1)  Chloe (Jester) <chloe at cyb.org>

Command> addkey
Key is protected.

You need a passphrase to unlock the secret key for
user: "Chloe (Jester) <chloe at cyb.org>"
1024-bit DSA key, ID 26B6AAE1, created 1999-06-15

Please select what kind of key you want:
   (2) DSA (sign only)
   (3) ElGamal (encrypt only)
   (4) ElGamal (sign and encrypt)
Your selection? 3
About to generate a new ELG-E keypair.
              minimum keysize is  768 bits
              default keysize is 1024 bits
    highest suggested keysize is 2048 bits
What keysize do you want? (1024) 1792
Do you really need such a large keysize? y
Requested keysize is 1792 bits            
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 1y
Key expires at Wed Jun 14 04:16:31 2000 CDT
Is this correct (y/n)? y
Really create? y        
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
+++++++++++++++..++++++++++++++++++++.++++++++++.+++++.+++++++++++++++++++++++++
+++++.+++++.+++++.++++++++++..+++++++++++++++++++++++++++++++++++>.+++++.+++++^^
^^

pub  1024D/26B6AAE1  created: 1999-06-15 expires: never      trust: -/u
sub  2048g/0CF8CB7A  created: 1999-06-15 expires: never     
sub  1792g/8AD9B0C3  created: 1999-06-15 expires: 2000-06-14
(1)  Chloe (Jester) <chloe at cyb.org>

Command> addkey
Key is protected.

You need a passphrase to unlock the secret key for
user: "Chloe (Jester) <chloe at cyb.org>"
1024-bit DSA key, ID 26B6AAE1, created 1999-06-15

Please select what kind of key you want:
   (2) DSA (sign only)
   (3) ElGamal (encrypt only)
   (4) ElGamal (sign and encrypt)
Your selection? 2
About to generate a new DSA keypair.
              minimum keysize is  768 bits
              default keysize is 1024 bits
    highest suggested keysize is 2048 bits
What keysize do you want? (1024) 912
Requested keysize is 912 bits       
rounded up to 960 bits
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 3y
Key expires at Fri Jun 14 04:17:51 2002 CDT
Is this correct (y/n)? y
Really create? y        
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
+++++++++++++++..+++++.+++++...+++++++++++++++.+++++++++++++++.+++++..++++++++++
.+++++..+++++.+++++.++++++++++++++++++++++++++++++..++++++++++>+++++++++++++++..
................................................................................
..........................!+++++.+++++++++++++++++++++++++++++++++++++++++++++++
+++.++++++++++...+++++..+++++++++++++++++++++++++.++++++++++.++++++++++.+++++.++
+++..................................................................+++++
gpg: fatal: out of secure memory while allocating 4228 bytes
secmem usage: 11168/12448 bytes in 8/11 blocks of pool 12640/16384


===============================================================================

gpg (GnuPG) 0.9.7; Copyright (C) 1999 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

gpg: Warning: using insecure memory!
Secret key is available.

pub  1024D/26B6AAE1  created: 1999-06-15 expires: never      trust: -/u
sub  2048g/0CF8CB7A  created: 1999-06-15 expires: never     
(1)  Chloe (Jester) <chloe at cyb.org>

Command> addkey
Key is protected.

You need a passphrase to unlock the secret key for
user: "Chloe (Jester) <chloe at cyb.org>"
1024-bit DSA key, ID 26B6AAE1, created 1999-06-15

gpg: Invalid passphrase; please try again ...

You need a passphrase to unlock the secret key for
user: "Chloe (Jester) <chloe at cyb.org>"
1024-bit DSA key, ID 26B6AAE1, created 1999-06-15

Please select what kind of key you want:
   (2) DSA (sign only)
   (3) ElGamal (encrypt only)
   (4) ElGamal (sign and encrypt)
Your selection? 3
About to generate a new ELG-E keypair.
              minimum keysize is  768 bits
              default keysize is 1024 bits
    highest suggested keysize is 2048 bits
What keysize do you want? (1024) 1792
Do you really need such a large keysize? y
Requested keysize is 1792 bits            
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 3y
Key expires at Sat Jun 15 04:37:55 2002 CDT
Is this correct (y/n)? y
Really create? y        
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
++++++++++..+++++..+++++++++++++++++++++++++.+++++.+++++++++++++++.++++++++++++++++++++.++++++++++++++++++++++++++++++++++++++++...++++++++++....+++++>.+++++>+++++.....................................................+++++^^^
gpg: fatal: out of secure memory while allocating 4228 bytes
secmem usage: 11168/12384 bytes in 7/10 blocks of pool 12608/16384



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.7 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjdncl0ACgkQBwMqlokEyOIXpACeNl2kJTHwsLD0y/6zhx9STvVi
ETIAnRopsog9vMmxymiwVYB856uVkgtR
=+Moh
-----END PGP SIGNATURE-----



More information about the Gnupg-devel mailing list