On Mon, Mar 31, 2014 at 01:15:47PM -0600, Landen Landens wrote:

> How do I verify the modulus of an openssl Elliptic Curve Cryptography (ECC)
> private key?

Elliptic curve keys don't have a "modulus", that's a property of RSA
keys.

> If this were RSA, I would run:
> openssl x509 -noout -modulus -in certificateFileName.crt | openssl md5
> openssl rsa -noout -modulus -in privateKeyFileName.key | openssl md5
> openssl req -noout -modulus -in csrFileName.csr | openssl md5

Try:

    openssl x509 -noout -pubkey -in ... |
        openssl pkey -pubin -outform DER | 
        openssl dgst -sha1

    openssl pkey -pubout -outform DER -in ... |
        openssl dgst -sha1

    openssl req -noout -pubkey -in ... |
        openssl pkey -pubin -outform DER | 
        openssl dgst -sha1

This computes the digest of the DER form of the SubjectPublicKeyInfo
(SPKI) of the certificate public key, actual public key and CSR for
comparison.

-- 
        Viktor.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to