Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compressed vs uncompressed pubkey #65

Closed
acolytec3 opened this issue Jul 3, 2022 · 1 comment
Closed

Compressed vs uncompressed pubkey #65

acolytec3 opened this issue Jul 3, 2022 · 1 comment

Comments

@acolytec3
Copy link

Is there a simple way using the existing API + utils to convert a pubkey between the compressed and uncompressed forms? I'm exploring switching the discv5 library from the bcrypto secp256k1 implementation to this one but we need to be able to switch between compressed and uncompressed public keys without providing a private key in the middle if possible (bcrypto provides this method today).

@paulmillr
Copy link
Owner

secp.Point.fromHex(publicKey).toRawBytes(isCompressed);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants