public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [OpenSSL]Is it possible to show the numerical value of the public and private key's exponent in a certificate
@ 2012-06-26 11:03 gialloporpora
  2012-06-26 11:59 ` Corinna Vinschen
  2012-06-26 13:12 ` Lou Losee
  0 siblings, 2 replies; 5+ messages in thread
From: gialloporpora @ 2012-06-26 11:03 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OpenSSL]Is it possible to show the numerical value of the public and private key's exponent in a certificate
  2012-06-26 11:03 [OpenSSL]Is it possible to show the numerical value of the public and private key's exponent in a certificate gialloporpora
@ 2012-06-26 11:59 ` Corinna Vinschen
  2012-06-26 22:20   ` gialloporpora
  2012-06-26 13:12 ` Lou Losee
  1 sibling, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2012-06-26 11:59 UTC (permalink / raw)
  To: cygwin

On Jun 26 13:01, gialloporpora 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.

Since this is a OpenSSL question, you will probably have more luck
asking on the appropriate openssl-users mailing list:

  http://www.openssl.org/support/community.html


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OpenSSL]Is it possible to show the numerical value of the public and private key's exponent in a certificate
  2012-06-26 11:03 [OpenSSL]Is it possible to show the numerical value of the public and private key's exponent in a certificate gialloporpora
  2012-06-26 11:59 ` Corinna Vinschen
@ 2012-06-26 13:12 ` Lou Losee
  2012-06-26 22:18   ` gialloporpora
  1 sibling, 1 reply; 5+ messages in thread
From: Lou Losee @ 2012-06-26 13:12 UTC (permalink / raw)
  To: cygwin

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@gmail.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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OpenSSL]Is it possible to show the numerical value of the public and private key's exponent in a certificate
  2012-06-26 13:12 ` Lou Losee
@ 2012-06-26 22:18   ` gialloporpora
  0 siblings, 0 replies; 5+ messages in thread
From: gialloporpora @ 2012-06-26 22:18 UTC (permalink / raw)
  To: cygwin

Risposta al messaggio di Lou Losee :

>  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

Yes, it works, thanks, I have searched for an explicit option, but -text 
works fine, tahnk you very much.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OpenSSL]Is it possible to show the numerical value of the public and private key's exponent in a certificate
  2012-06-26 11:59 ` Corinna Vinschen
@ 2012-06-26 22:20   ` gialloporpora
  0 siblings, 0 replies; 5+ messages in thread
From: gialloporpora @ 2012-06-26 22:20 UTC (permalink / raw)
  To: cygwin

Risposta al messaggio di Corinna Vinschen :

> Since this is a OpenSSL question, you will probably have more luck
> asking on the appropriate openssl-users mailing list:
>
>    http://www.openssl.org/support/community.html
>
>
> Corinna
Ok, I'll ask there in future. Thanks for the link.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-06-26 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-26 11:03 [OpenSSL]Is it possible to show the numerical value of the public and private key's exponent in a certificate gialloporpora
2012-06-26 11:59 ` Corinna Vinschen
2012-06-26 22:20   ` gialloporpora
2012-06-26 13:12 ` Lou Losee
2012-06-26 22:18   ` gialloporpora

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).