1

in PHP how do i create the full public key from a compressed one?

my test key is 026a04ab98d9e4774ad806e302dddeb63bea16b5cb5f223ee77478e861bb583eb3

and the uncompressed one is 6a04ab98d9e4774ad806e302dddeb63bea16b5cb5f223ee77478e861bb583eb3 36b6fbcb60b5b3d4f1551ac45e5ffc4936466e7d98f6c7c0ec736539f74691a6

can this be done via openssl?

thanks for any helpful answer!!

0

using MDANTER's great library i managed it to work. if anyone needs it in the future.

use Elliptic\EC;

$ec = new EC('secp256k1');

$pub="026a04ab98d9e4774ad806e302dddeb63bea16b5cb5f223ee77478e861bb583eb3";

$key = $ec->keyFromPublic($pub, 'hex');

print_r($key);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.