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

Improve public key storage efficiency #7

Open
tarrencev opened this issue Aug 29, 2022 · 1 comment
Open

Improve public key storage efficiency #7

tarrencev opened this issue Aug 29, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tarrencev
Copy link
Contributor

Currently, the users credential private key coordinates are naively stored as 86bit limbs, which is what the signature verification expects as input.

We store 3 limbs for both x, y coordinates, we're using six felts for storage. Since 6 * 86 = 516 and a felt can store 250bits, we should instead represent the key as 3 felts.

@tarrencev tarrencev added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Aug 29, 2022
@tarrencev tarrencev changed the title Improve public key storage efficieny Improve public key storage efficency Aug 29, 2022
@tarrencev tarrencev changed the title Improve public key storage efficency Improve public key storage efficiency Aug 29, 2022
@piniom
Copy link
Collaborator

piniom commented Feb 28, 2024

Hi @tarrencev, Is this issue still relevant? Currently we store webauthn pub_key as four felts here:

struct WebauthnPubKey {
    x: u256,
    y: u256,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants