[Gllug] gpg - what are the strange characters ?

Alain Williams addw at phcomp.co.uk
Wed Jul 29 00:36:18 UTC 2009


On Tue, Jul 28, 2009 at 01:49:25AM +0100, Alain Williams wrote:
> I have been generating GPG keys, when it does it GPG prints out strings of '+.-<>' (see below)
> 
> What are these characters, I can see that it is trying to show progress, but what do
> the different characters mean ?

Well, Isabell tried a bit - no one else which I assume means that no one knows.

So: off to the source.

My first mistake was to download the latest version, the messages that I
was looking for to locate it were in gnypg-1.4 and there abouts, but not in gnupg-2.0.7.

Well: the meanings are progress and the characters mean different things depending on
what sort of encryption algorithm you have chosen and quite what that is doing at
the moment... things that not very clear (to me at least).

elgamal:
   .   when it gets some random bits.

   when generating a key ''Generate a random secret exponent k from prime p, so that k is
	relatively prime to p-1.''
   +   k < (p-1)
   -   k > 0
   .   k is relatively prime to (p-1)

dsa:
   .   when it gets some random bits.

   Generate a random secret exponent k less than q
   +   k < q
   -   k > 0

primegen:
   !   allocate new primes - goto next try
   >   nprime < pbits 20 times
   <   nprime > pbits 20 times
   ^   iteration of loop creating a generator
   .   (o/p several places), not a prime, failed 10 times at finding a prime
   :   Starting with a new random value
   +   May be a prime

The above lack of understanding not helped by the sparse commenting techniques used in the code :-(
All in the cipher/ directory.

Does what I learned leave me any the wiser ? Not at all.

Do take the above with a shovel full of salt.
If anyone can show me to be wrong:
a) I would not be surprised
b) I would be interested in a clearer description of what is going on


> 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.
> +++++++++++++++.+++++..+++++.+++++.++++++++++.+++++.....++++++++++.+++++.+++++++++++++++.++++++++++++++++++++++++++++++.++++++++++.+++++++++++++++>.++++++++++.>+++++.......................<+++++.........+++++
> 
> 
> Not enough random bytes available.  Please do some other work to give
> the OS a chance to collect more entropy! (Need 283 more bytes)
> 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.
> +++++++++++++++.+++++++++++++++++++++++++.+++++..+++++..++++++++++.++++++++++.+++++.++++++++++.+++++.++++++++++.+++++++++++++++.++++++++++..+++++.++++++++++.+++++>++++++++++....>.+++++.................+++++^^^

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
Past chairman of UKUUG: http://www.ukuug.org/
#include <std_disclaimer.h>
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list