GMEllipticCurveCrypto icon indicating copy to clipboard operation
GMEllipticCurveCrypto copied to clipboard

PublicKey Coordinates

Open saravnandm opened this issue 5 years ago • 2 comments

Hi, Is there a way to get coordinates (X and Y) of publickey like android ECPublic->ECPoint ?

If not could you add that support?

saravnandm avatar Sep 11 '19 17:09 saravnandm

Encounter the same problem, ask how to solve. How to transform

leohyman avatar Jun 18 '20 09:06 leohyman

GMEllipticCurveCrypto* ecc = [GMEllipticCurveCrypto generateKeyPairForCurve: GMEllipticCurveSecp256r1];
ecc.compressedPublicKey = false;
NSData* pkeyX = [ecc.publicKey subdataWithRange:NSMakeRange(1, 32)];
NSData* pkeyY = [ecc.publicKey subdataWithRange:NSMakeRange(33, 32)];

grishka avatar Apr 29 '21 12:04 grishka