Re: Extract numbers from a key

2011-08-04 Thread Sébastien
I know that gpg is an hybrid system. I want to know these numbers to check with a mathematica-like program that numbers supposed to be primes are actually real prime numbers. ___ Gnupg-users mailing list Gnupg-users@gnupg.org

Re: Extract numbers from a key

2011-08-04 Thread Sébastien
I tried the --with-key-data option which gives the numbers I'm looking for. Unfortunately, this doesn't work with the secret key. I tried with pgpdump but it doesn't work anymore because numbers in secret keys are encrypted. Is there any way to decrypt these numbers in the secret key? Le

Re: Extract numbers from a key

2011-08-04 Thread Jerome Baum
I know that gpg is an hybrid system. I want to know these numbers to check with a mathematica-like program that numbers supposed to be primes are actually real prime numbers. What is that supposed to tell you? It's not like Mathematica does an exhaustive check either. A healthy dose of

Re: Extract numbers from a key

2011-08-04 Thread Robert J. Hansen
On 8/4/11 9:05 AM, Jerome Baum wrote: What is that supposed to tell you? It's not like Mathematica does an exhaustive check either. The PRIMES algorithm can be expressed in Mathematica, and provides an exhaustive check. Mathematica's built-in tools don't provide PRIMES, but it can be added by

Re: Extract numbers from a key

2011-08-04 Thread Jerome Baum
The PRIMES algorithm can be expressed in Mathematica, and provides an exhaustive check.  Mathematica's built-in tools don't provide PRIMES, but it can be added by a modestly proficient Mathematica user. So just a sieve? Isn't that going to take ages on any reasonable key? -- Jerome Baum

Re: Extract numbers from a key

2011-08-04 Thread Robert J. Hansen
On 8/4/11 9:32 AM, Jerome Baum wrote: So just a sieve? Isn't that going to take ages on any reasonable key? No. http://en.wikipedia.org/wiki/AKS_primality_test ___ Gnupg-users mailing list Gnupg-users@gnupg.org

Re: Extract numbers from a key

2011-08-04 Thread Jerome Baum
Ah, I see why you referred to it as the PRIMES algorithm -- was mislead by a Google search on that string. Did you manage to get an unencrypted version of the private key? (Mobile/Handy) Am 04.08.2011 15:54 schrieb Robert J. Hansen r...@sixdemonbag.org: On 8/4/11 9:32 AM, Jerome Baum wrote:

Re: Extract numbers from a key

2011-08-04 Thread vedaal
Date: Wed, 03 Aug 2011 12:43:17 +0200 From: S?bastien tigresetdrag...@yahoo.fr Cc: gnupg-users@gnupg.org Subject: Re: Extract numbers from a key Message-ID: 4e392645.2020...@yahoo.fr Content-Type: text/plain; charset=UTF-8; format=flowed I know that gpg is an hybrid system. I want to know these

Re: Extract numbers from a key

2011-08-04 Thread Robert J. Hansen
On 8/4/11 10:30 AM, Jerome Baum wrote: Ah, I see why you referred to it as the PRIMES algorithm -- was mislead by a Google search on that string. PRIMES isn't the name of an algorithm: PRIMES is the name of a problem in computer science. the PRIMES algorithm isn't the algorithm named PRIMES,

Re: Extract numbers from a key

2011-08-04 Thread Johan Wevers
On 04-08-2011 16:14, ved...@nym.hush.com wrote: All that is necessary, is to use pre-canned primes, (i.e. to generate a prime which falls within a range of primes stored in an offsite area by the implementation.) This would be fat to easy noticed by inspecting the sourcecode. If you just

Re: Extract numbers from a key

2011-08-04 Thread Peter Lebbing
On 03/08/11 12:43, Sébastien wrote: I know that gpg is an hybrid system. I want to know these numbers to check with a mathematica-like program that numbers supposed to be primes are actually real prime numbers. And suppose GnuPG accidentally picked a composite. What would be the security

Re: Extract numbers from a key

2011-08-04 Thread Peter Lebbing
On 04/08/11 17:11, Johan Wevers wrote: An even more subtle way to add a backdoor would be tampering with the RNG that creates the session keys and the factors in key generation. A bug such as this existed in the Unix version of pgp 5.0 and it took quite some time before it was found. Let's

[Announce] GnuPG 2.0.18 released

2011-08-04 Thread Werner Koch
Hello! We are pleased to announce the availability of a new stable GnuPG-2 release: Version 2.0.18. The GNU Privacy Guard (GnuPG) is GNU's tool for secure communication and data storage. It can be used to encrypt data, create digital signatures, help authenticating using Secure Shell and to

Re: Extract numbers from a key

2011-08-04 Thread Sébastien
I success to catch the numbers with a blank passphrase and pgpdump. I found something strange with the number d. The operation e*d mod phi is not equal to 1, as expected with the RSA algo. I looked in cipher/rsa.c and I found that d is evaluated to match e*d mod f = 1 , with f =

Re: Extract numbers from a key

2011-08-04 Thread Peter Lebbing
Why is it coded like that ? Is it safe ? I'm pretty sure there is only one inverse given n and e, that is, d is unique. Accidentally choosing the wrong d because you made an algorithmic/programming error will create a non-working keypair. I'd say, since it works, it is correct. Perhaps the

Re: Extract numbers from a key

2011-08-04 Thread Peter Lebbing
On 04/08/11 20:30, Peter Lebbing wrote: Perhaps the better question is: *why* does it work? Why are the operations equivalent? H. Per the Handbook of Applied Cryptography 5th ed[1], section 8.5, computation of d can also be done modulo lambda, with lambda = lcm(p-1,q-1) =

Re: Extract numbers from a key

2011-08-04 Thread Werner Koch
On Thu, 4 Aug 2011 19:23, tigresetdrag...@yahoo.fr said: cipher/rsa.c and I found that d is evaluated to match e*d mod f = 1 , with f = phi/gcd((p-1),(q-1)) . Why is it coded like that ? Is it safe ? Using the universal exponent of n (lambda, in the code denoted as f) has the advantages that

Card only available to root user

2011-08-04 Thread Luis de Bethencourt
Hi everybody and thanks for the help. I recently upgraded my GnuPG setup with a Smart Card (GnuPG Card v2). I can get/set the information of the card through the root user, but this is not good for everyday use. I think I have pinpointed the problem, scdaemon iny my machine doesn't like anybody

Re: Card only available to root user

2011-08-04 Thread Luis de Bethencourt
On Fri, Aug 05, 2011 at 01:49:21AM +0200, Luis de Bethencourt wrote: Hi everybody and thanks for the help. I recently upgraded my GnuPG setup with a Smart Card (GnuPG Card v2). I can get/set the information of the card through the root user, but this is not good for everyday use. I think I

Re: Card only available to root user

2011-08-04 Thread Hauke Laging
Am Freitag, 5. August 2011, 01:49:21 schrieb Luis de Bethencourt: I can get/set the information of the card through the root user Notice how I can check the status as root, and do SCD Learn as my user. But= not check the status as my user (or sign my mails, which is the main problem). =

Re: Card only available to root user

2011-08-04 Thread Luis de Bethencourt
On Fri, Aug 05, 2011 at 12:14:47AM +0200, Hauke Laging wrote: Am Freitag, 5. August 2011, 01:49:21 schrieb Luis de Bethencourt: I can get/set the information of the card through the root user Notice how I can check the status as root, and do SCD Learn as my user. But= not check the

Re: Card only available to root user

2011-08-04 Thread Hauke Laging
Am Freitag, 5. August 2011, 03:02:07 schrieb Luis de Bethencourt: device in debian: crw-rw-r--+ 1 root root 189, 516 2011-08-05 00:46 /dev/bus/usb/005/005 device in gentoo: crw-rw-r-- 1 root pcscd 189, 395 Aug 5 02:56 /dev/bus/usb/004/012 my user is part of the pcscd group. I just

Re: Card only available to root user

2011-08-04 Thread Luis de Bethencourt
On Fri, Aug 05, 2011 at 01:07:19AM +0200, Hauke Laging wrote: Am Freitag, 5. August 2011, 03:02:07 schrieb Luis de Bethencourt: device in debian: crw-rw-r--+ 1 root root 189, 516 2011-08-05 00:46 /dev/bus/usb/005/005 device in gentoo: crw-rw-r-- 1 root pcscd 189, 395 Aug 5 02:56