How to get range of finite field and coefficients used in elliptic curve cryptography from a certificate with OpenSSL?

gialloporpora

Like suggested in this example an elliptic curve is defined by the prime p that is the number of elements of the finite field and an equation: Curve = y² = x³ + ax + b

in real cases, for example for Google certificate, is it possible to find a,b, p** using OpenSSL? I have tried Googling and find this answer myself but I had found anything.

Maarten Bodewes

There are three ways to represent EC parameters within certificates. I'll discuss the most commonly used ones: explicit parameters and named curves.

Explicit EC (domain) parameters are exactly what the name implies: they are values directly put in the certificate. The application that reads in the public key can directly create a full EC public key out of the domain parameters and the value of W, the public point.

Named curves however only identify a previously specified set of domain parameters. They are normally simply represented as strings in software. However in certificates and other ASN.1 DER objects they are represented by ASN.1 OID's. OID's are unique strings of the form 1.2.3 etc. that first represent a registration office, then an organization etc.

If you put your Google certificate in ASN.1 parse you will find one of these OID's, already helpfully transformed into a String:

openssl asn1parse -in google_ec.cer

will yield:

...
251:d=3  hl=2 l=  19 cons: SEQUENCE          
253:d=4  hl=2 l=   7 prim: OBJECT            :id-ecPublicKey
262:d=4  hl=2 l=   8 prim: OBJECT            :prime256v1
...

A quick search will find RFC 5480, which refers to the secp256r1 (see 2.4.2) or NIST P-256 elliptic curve. The latter two define all the parameters of the curve, except W of course. Often it is easier to find these curve parameters from existing software though as the standards may not represent them in a useful format for your specific runtime environment.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Elliptic curve point addition over a finite field in Python

From Dev

Elliptic curve threshold cryptography in node

From Dev

How to find a point of an elliptic curve in crypto++ (with given x)? Or how to compute a root in finite field? Or root of Polynomial Ring?

From Dev

20 Byte limit with Elliptic Curve Cryptography

From Dev

How to normalize elliptic fourier coefficients?

From Java

Cannot sign a JWT using Elliptic Curve (EC) cryptography

From Dev

Elliptic Curve Cryptography : sending an encrypted message using NFC in eclipse android

From Dev

Encryption and Decryption of text messages using Elliptic Curve Cryptography Separately

From Dev

How to force a server to use a specific elliptic curve at the beginning of the handshake via openssl?

From Dev

Scalar Multiplication for elliptic curve over Prime Field

From Dev

How to add custom field to certificate using openssl

From Dev

OpenSSL Elliptic Curve reading private key in DER form

From Dev

Get key parameters from imported Elliptic Curve key in ASN.1 format

From Java

Using openssl to get the certificate from a server

From Dev

How extract all OIDs from certificate with OpenSSL

From Dev

Identify EC curve in certificate using openssl api

From Dev

Ruby/openssl: convert Elliptic Curve point octet string into OpenSSL::PKey::EC::Point

From Dev

How to get the coefficients from RFE using sklearn?

From Dev

Generating PublicKey from x and y values of elliptic curve point

From Dev

Reading elliptic curve private key from file with BouncyCastle

From Dev

Plotting an elliptic curve in SageMath

From Dev

Elliptic curve brute forcing

From Dev

How to sign the Certificates with Elliptic curve private keys and ECDSA algorithm?

From Dev

How to decipher the encrypted message using elliptic curve using JavaScript library?

From Dev

How can I best check these Elliptic Curve parameters are valid?

From Dev

Generate elliptic curve key pairs (EC_KEY_generate_key) in multiple threads using OpenSSL C library

From Dev

Import elliptic curve Certificate and Private Key into Java Keystore using java.security.KeyStore

From Dev

Import elliptic curve Certificate and Private Key into Java Keystore using java.security.KeyStore

From Dev

Which field is used to identify the root certificate from the cert store?

Related Related

  1. 1

    Elliptic curve point addition over a finite field in Python

  2. 2

    Elliptic curve threshold cryptography in node

  3. 3

    How to find a point of an elliptic curve in crypto++ (with given x)? Or how to compute a root in finite field? Or root of Polynomial Ring?

  4. 4

    20 Byte limit with Elliptic Curve Cryptography

  5. 5

    How to normalize elliptic fourier coefficients?

  6. 6

    Cannot sign a JWT using Elliptic Curve (EC) cryptography

  7. 7

    Elliptic Curve Cryptography : sending an encrypted message using NFC in eclipse android

  8. 8

    Encryption and Decryption of text messages using Elliptic Curve Cryptography Separately

  9. 9

    How to force a server to use a specific elliptic curve at the beginning of the handshake via openssl?

  10. 10

    Scalar Multiplication for elliptic curve over Prime Field

  11. 11

    How to add custom field to certificate using openssl

  12. 12

    OpenSSL Elliptic Curve reading private key in DER form

  13. 13

    Get key parameters from imported Elliptic Curve key in ASN.1 format

  14. 14

    Using openssl to get the certificate from a server

  15. 15

    How extract all OIDs from certificate with OpenSSL

  16. 16

    Identify EC curve in certificate using openssl api

  17. 17

    Ruby/openssl: convert Elliptic Curve point octet string into OpenSSL::PKey::EC::Point

  18. 18

    How to get the coefficients from RFE using sklearn?

  19. 19

    Generating PublicKey from x and y values of elliptic curve point

  20. 20

    Reading elliptic curve private key from file with BouncyCastle

  21. 21

    Plotting an elliptic curve in SageMath

  22. 22

    Elliptic curve brute forcing

  23. 23

    How to sign the Certificates with Elliptic curve private keys and ECDSA algorithm?

  24. 24

    How to decipher the encrypted message using elliptic curve using JavaScript library?

  25. 25

    How can I best check these Elliptic Curve parameters are valid?

  26. 26

    Generate elliptic curve key pairs (EC_KEY_generate_key) in multiple threads using OpenSSL C library

  27. 27

    Import elliptic curve Certificate and Private Key into Java Keystore using java.security.KeyStore

  28. 28

    Import elliptic curve Certificate and Private Key into Java Keystore using java.security.KeyStore

  29. 29

    Which field is used to identify the root certificate from the cert store?

HotTag

Archive