From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20698 invoked by alias); 26 Jun 2012 13:12:51 -0000 Received: (qmail 20476 invoked by uid 22791); 26 Jun 2012 13:12:48 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_PK X-Spam-Check-By: sourceware.org Received: from mail-pz0-f43.google.com (HELO mail-pz0-f43.google.com) (209.85.210.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 Jun 2012 13:12:22 +0000 Received: by dajz8 with SMTP id z8so6249840daj.2 for ; Tue, 26 Jun 2012 06:12:21 -0700 (PDT) Received: by 10.68.226.226 with SMTP id rv2mr51665084pbc.101.1340716328820; Tue, 26 Jun 2012 06:12:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.147.9 with HTTP; Tue, 26 Jun 2012 06:11:48 -0700 (PDT) In-Reply-To: References: From: Lou Losee Date: Tue, 26 Jun 2012 13:12:00 -0000 Message-ID: Subject: Re: [OpenSSL]Is it possible to show the numerical value of the public and private key's exponent in a certificate To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-06/txt/msg00466.txt.bz2 =46rom the OpenSSL RSA man page: To print out the components of a private key to standard output: =C2=A0 =C2=A0 =C2=A0 =C2=A0 openssl rsa -in key.pem -text -noout Not explicitly in the man page, but from reading it, it appears to get the components of the private key, the following should work: =C2=A0 =C2=A0 =C2=A0 =C2=A0 openssl rsa -in key.pem -pubin -pubout -text -n= oout Lou Artificial Intelligence is no match for Natural Stupidity Artificial Intelligence is no match for Natural Stupidity On Tue, Jun 26, 2012 at 6:01 AM, gialloporpora wr= ote: > > Dear all, > I am trying to learn how S/MIME encryption/digital signing works. > > I would like to show the numerical values assigned to my private and publ= ic key. > > I have converted my personal certificate from p12 to pem, in this way: > > openssl pkcs12 -in mycert.p12 -out mycert.pem > > Now, I have used this command to show the modulus of the private/public k= ey: > > =C2=A0 =C2=A0openssl rsa -in mykey.pem -noout -modulus > > and I see an hexadecimal value, now I know that my public key is a data l= ike this: > > (exp1, modulus) > > > > where modulus is the value above. My private key is: > > (exp2, modulus) > > where exp1 and exp2 satisfy: > > exp1*exp2 ? 1 mod (p-1)(q-1) > modulus=3Dp*q > > I would like to know if is it possible to show the numerical values of ex= p1 and exp2 stored in my certificate. > > > Sandro > > > > > > > > > > > > > > -- > Problem reports: =C2=A0 =C2=A0 =C2=A0 http://cygwin.com/problems.html > FAQ: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http:= //cygwin.com/faq/ > Documentation: =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://cygwin.com/docs.html > Unsubscribe info: =C2=A0 =C2=A0 =C2=A0http://cygwin.com/ml/#unsubscribe-s= imple > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple