-
Notifications
You must be signed in to change notification settings - Fork 9
KIRK 13 ECDSA point multiplication
Elliptic Curve Math formula : <math>y^2 = x^3 +ax +b mod p</math> with NP points on the curve
p = FFFFFFFFFFFFFFFF00000001FFFFFFFFFFFFFFFF
NP= FFFFFFFFFFFFFFFEFFFFB5AE3C523E63944F2127
a= -3
b= A68BEDC33418029C1D3CE33B9A321FCCBB9E0F0B
Base Point:
Gx= 128EC4256487FD8FDF64E2437BC0A1F6D5AFDE2C
Gy= 5958557EB1DB001260425524DBC379D5AC5F4ADF
Invocation:
u8 buffer[0x3C]
u8 newpoint[0x28]
memcpy(buffer, multiplier, 0x14);
memcpy(buffer+0x14, pointx, 0x14);
memcpy(buffer+0x28, pointy, 0x14);
sceUtilsBufferCopyWithRange(newpoint,0x28,buffer,0x3c,0xD);
The result is a new point(x and y are each 0x14 bytes long).
To test this, you can call 0xC service and copy the first 0x14 bytes to a new buffer, then copy the Gx and Gy values after that.
Calling 0xD with the new buffer will return the values of x and y that were generated by the 0xC call.