0

The curve equation for P-256 is:

NIST P-256

y^2 = x^3-3x+41058363725152142129326129780047268409114441015993725554835256314039467401291

Below I am generating key data, including the secret key "d".

Can someone please help me:

1-Convert and plug in the 2 points below into the above equation to ensure the points lie on the curve.

2-Show me, using the curve equation above, how I can determine that x+y will land back on the curve as d, all values shown below?

Use jwcrypto to generate key data

key_data = jwk_crypto.JWK.generate(kty='EC', crv='P-256')

private_key_data = key_data.export(as_dict=True)

print(json.dumps(private_key_data, indent=2))

===>

{

'kty': 'EC',

'crv': 'P-256',

'x': 'vddm_d3R2dYNICxh2D93hjBZyEbpIWSW0fhPUXhHCgc',

'y': 'BjcTCjAp6oqDRbWDSCiCMxSKMDEAe4rAwYJqXHEbO98',

'd': 'B_nLv2KHBVUZEx6KSNULf3ZqZlYaVrpp8J7ncORbS_U'

}

0 Answers0