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

Document what the public key is for each keytype #18

Open
onbjerg opened this issue Feb 4, 2025 · 1 comment
Open

Document what the public key is for each keytype #18

onbjerg opened this issue Feb 4, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@onbjerg
Copy link
Contributor

onbjerg commented Feb 4, 2025

We should document what goes into publicKey in the Key struct depending on the keytype. For example, for Secp256k1 it is just the corresponding address of the private key, i.e. not actually the public key but a truncated hash of it.

@onbjerg onbjerg added the documentation Improvements or additions to documentation label Feb 4, 2025
@atarpara
Copy link
Collaborator

atarpara commented Feb 12, 2025

Key Type Encoding Format Description
secp256k1 abi.encode(address) Stores only the Ethereum address derived from publicKey(truncated hash).
webAuth abi.encode(x, y) Stores both x and y coordinates of the public key on the elliptic curve.
secp256r1(P256) abi.encode(x, y) Stores both x and y coordinates for the secp256r1 curve.

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

No branches or pull requests

2 participants