delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/06/26/09:13:01

X-Recipient: archive-cygwin AT delorie DOT com
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
MIME-Version: 1.0
In-Reply-To: <jsc4sc$ohp$1@dough.gmane.org>
References: <jsc4sc$ohp$1 AT dough DOT gmane DOT org>
From: Lou Losee <llosee AT gmail DOT com>
Date: Tue, 26 Jun 2012 08:11:48 -0500
Message-ID: <CA+NdcOakSDxhpk=RVZBtVS0NB=xEC9ht2r5U_=r3DmD6Mv5-Jg@mail.gmail.com>
Subject: Re: [OpenSSL]Is it possible to show the numerical value of the public and private key's exponent in a certificate
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q5QDCvCr027541

From the OpenSSL RSA man page:

To print out the components of a private key to standard output:

        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:

        openssl rsa -in key.pem -pubin -pubout -text -noout

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 <gialloporpora AT gmail DOT com> wrote:
>
> 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 public 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 key:
>
>    openssl rsa -in mykey.pem -noout -modulus
>
> and I see an hexadecimal value, now I know that my public key is a data like 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=p*q
>
> I would like to know if is it possible to show the numerical values of exp1 and exp2 stored in my certificate.
>
>
> Sandro
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> 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
>

--
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019