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
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Trending

  • AI Agents Are Exceeding Permissions at Scale. Here Are the Queries Your SIEM Is Missing.
  • Why MCP Servers Lose Session State Behind Load Balancers
  • How to Break Up Swift Concurrency
  • How to Build a Solid Test Pipeline in the Era of Agentic AI Development

EC Private and Public Key Pair

Get familiar with elliptic curve private and public key pairs.

By 
Mark Rules user avatar
Mark Rules
·
Updated Apr. 30, 20 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
16.5K Views

Join the DZone community and get the full member experience.

Join For Free

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

The likes didn't load as expected. Please refresh the page and try again.

  • 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