-
Notifications
You must be signed in to change notification settings - Fork 9
KIRK 12 ECDSA key pair generation
artart78 edited this page Mar 26, 2013
·
1 revision
Elliptic Curve Math formula : <math>y^2 = x^3 +ax +b mod p</math> with NP points on the curve
p = FFFFFFFFFFFFFFFF00000001FFFFFFFFFFFFFFFF
N= FFFFFFFFFFFFFFFEFFFFB5AE3C523E63944F2127
a= -3
b= A68BEDC33418029C1D3CE33B9A321FCCBB9E0F0B
Base Point:
Gx= 128EC4256487FD8FDF64E2437BC0A1F6D5AFDE2C
Gy= 5958557EB1DB001260425524DBC379D5AC5F4ADF
Invocation:
u8 keypair[0x3c]
sceUtilsBufferCopyWithRange(keypair,0x3c,0,0,0xC);
This returns the following into the keypair buffer (each value is 0x14 bytes long):
0x00 - randomly generated private key
0x14 - Public Key point x value
0x28 - Public Key point y value
Basically function 0xC generates a random number < N and multiplies it to the base point G to get the new public key.