DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Trending

  • Giving AI Agents Safe Access to Legacy Systems: Introducing legacy2mcp
  • AI Agents Need an Identity Plane: Rethinking Enterprise Authorization for Autonomous Software
  • Beyond the Wall of Charts: How Advanced Observability Displaced the Telemetry Dashboard
  • Beyond @Transactional: Solving the Dual-Write Problem in Distributed Microservices

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

EC Private and Public Key Pair

Get familiar with elliptic curve private and public key pairs.

By 
Mark Rules
·
Updated Apr. 30, 20 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
16.6K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

An EC (Elliptic Curve) key-pair is a pair of a private and public key constructed from a given subgroup generator in a given elliptic curve group.

Here are the steps to generate an EC private and public key pair:

1. Alice selects an elliptic curve subgroup defined by a set of domain parameters, (p,a,b,G,n,h):

p: The modulo used to specify the reduced elliptic curve group.
a: The first coefficient of the elliptic curve. 
b: The second coefficient of the elliptic curve. 
G: The generator (base point) of the subgroup. 
n: The order of the subgroup.
h: The cofactor of the subgroup.


2. Alice selects a private number, d, and puts it together with domain parameters as the private key:

Private key = {d, p, a, b, G, n, h} 


3. Alice performs the scalar multiplication of Q = d*G and puts it together with domain parameters as the public key:

Private key = {Q, p, a, b, G, n, h} 


Actually, the order of the subgroup, n, and the cofactor of the subgroup, h, are not really important because they can be derived from the generator, G.

Also, if the subgroup (or domain parameters) is publicly known to everyone, we can simply refer to d as the private key and Q as the public key.

For example, if Alice decides to use the subgroup generated by G = (15, 13) in the elliptic curve group of E17(0, 7). The domain parameters will be:

{p, a, b, G, n, h} = {17, 0, 7, (15,3), 17, 1}


If Alice selects d = 11 as the private number, her private key will be:

{d, p, a, b, G, n, h} = {11, 17, 0, 7, (15,3), 17, 1}


Alice then calculates Q = d*G = 11*(15, 3) = (10, 2). Her key public key will be:

{Q, p, a, b, G, n, h} = {(10,2), 17, 0, 7, (15,3), 17, 1}
Alice (software)

Opinions expressed by DZone contributors are their own.

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook