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

[morpheusvm/tokenvm/indexvm] Change the auth on one of these to better showcase how to provide your own crypto #267

Closed
patrick-ogrady opened this issue Jul 22, 2023 · 3 comments · Fixed by #571
Assignees
Labels

Comments

@patrick-ogrady
Copy link
Contributor

patrick-ogrady commented Jul 22, 2023

We should use BLS for this...we'll need to generalize crypto.PublicKey and crypto.Signature, which are hardcoded to 32 and 64 bytes, respectively. BLS has 48 and 96.

Potential Changes

  • We should consider a "SmallBytes" codec which uses uint8 to encode length, rather than int.
  • We may want to send to an address/arbitrary bytes instead of sending to a public key (will be needed for WASM anyways). Addresses/Programs should be "indistinguishable".
@patrick-ogrady patrick-ogrady changed the title [simplevm/tokenvm/indexvm] Change the auth on one of these to better showcase how to provide your own crypto [morpheusvm/tokenvm/indexvm] Change the auth on one of these to better showcase how to provide your own crypto Jul 24, 2023
@patrick-ogrady patrick-ogrady self-assigned this Aug 3, 2023
@patrick-ogrady patrick-ogrady added this to the v0.2.0 (WASM Programs) milestone Aug 8, 2023
@patrick-ogrady patrick-ogrady modified the milestones: WASM Programs + Parallel Execution, v0.1.1 (Validator-Prioritized Messages + Proveable Block Hash) Sep 5, 2023
@0xJohnnyGault
Copy link

We are hacking on an Auth that uses secp256r1 (P256) which is what WebAuthn uses, and have a POC where the browser can sign transactions using biometrically protected private keys. The P256 curve basically turns every browser into a overpowered crypto wallet. The WebAuthn plumbing even includes scannable QR codes to sign from your mobile while using a desktop browser. Anyway, it seems like the ed25519.PublicKey type is pretty deeply baked throughout the HyperSDK code. It would be very useful to see some sketches of how to best incorporate a generic Auth pattern.

@patrick-ogrady
Copy link
Contributor Author

patrick-ogrady commented Sep 8, 2023

We are hacking on an Auth that uses secp256r1 (P256) which is what WebAuthn uses, and have a POC where the browser can sign transactions using biometrically protected private keys. The P256 curve basically turns every browser into a overpowered crypto wallet. The WebAuthn plumbing even includes scannable QR codes to sign from your mobile while using a desktop browser. Anyway, it seems like the ed25519.PublicKey type is pretty deeply baked throughout the HyperSDK code. It would be very useful to see some sketches of how to best incorporate a generic Auth pattern.

Exactly why I want to fix this 😓. Thanks for sharing your use case!

I am planning to work on this right after the first public Devnet is launched. It'll be a pretty easy integration (Address will basically become a byte slice instead of a fixed-size ed25519 public key byte array). It will then be up to the VM user to specify an address scheme that makes sense for them (will also make adding abstract accounts/interacting with WASM programs MUCH easier).

@patrick-ogrady patrick-ogrady modified the milestones: v0.1.1 (Validator-Prioritized Messages + Proveable Block Hash), v0.0.16 (Improvements from Devnet Experiments) Oct 16, 2023
@patrick-ogrady
Copy link
Contributor Author

patrick-ogrady commented Oct 19, 2023

Great blog on this topic: https://gogo-webauthn.fly.dev/blog

And associated code: https://github.com/multisig-labs/webauthn-demo

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

Successfully merging a pull request may close this issue.

2 participants