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

[AIP-61][Discussion] Keyless accounts #297

Closed
alinush opened this issue Jan 15, 2024 · 5 comments
Closed

[AIP-61][Discussion] Keyless accounts #297

alinush opened this issue Jan 15, 2024 · 5 comments

Comments

@alinush
Copy link
Contributor

alinush commented Jan 15, 2024

AIP Discussion

Currently, the only way1 to secure your Aptos account is to protect the secret key (SK) associated with it. Unfortunately, this is much easier said than done. In reality, secret keys are often lost (e.g., users forget to write down their mnemonic when first setting up their Aptos wallet) or stolen (e.g., users are tricked into revealing their SK). This makes onboarding users unnecessarily difficult and drives users away when their accounts are lost or stolen.

In this AIP, we describe a more user-friendly approach for account management that relies on the unmodified[^openpubkey] OpenID Connect (OIDC) standard and recent developments in zero-knowledge proofs of knowledge (ZKPoKs) of OIDC signatures2$^,$3$^,$4$^,$5$^,$6.

Specifically, we enable keyless accounts on Aptos that are secured through the owner’s existing OIDC account (i.e., their Web2 account with an OIDC provider such as Google, GitHub or Apple), rather than through a difficult-to-manage secret key. In a nutshell, “your blockchain account = your OIDC account”.

An important property of keyless accounts is that they are not only bound to the user’s OIDC account (e.g., alice@gmail.com) but are also bound to a managing application registered with the OIDC provider (e.g., a dapp’s dapp.xyz website, or a wallet’s mobile phone app). In other words, they are application-specific accounts. As a consequence, if the managing application of an account disappears or loses their OIDC provider registration credentials, then users whose accounts are bound to this application will become inaccessible, unless alternative recovery paths are provided (discussed below).

Read more about it here:

Footnotes

  1. There are alternatives to single-SK accounts, such as multisignature-based accounts (e.g., via MultiEd25519 or via AIP-55), but they still bottle down to one or more users protecting their secret keys from loss or theft.

  2. https://github.com/TheFrozenFire/snark-jwt-verify/tree/master

  3. https://github.com/sehyunc/nozee

  4. https://www.risczero.com/news/bonsai-pay

  5. https://github.com/emmaguo13/zk-blind

  6. https://docs.sui.io/concepts/cryptography/zklogin

@thepomeranian thepomeranian changed the title [AIP-X][Discussion] OpenID-based blockchain (OIDB) accounts [AIP-61][Discussion] OpenID-based blockchain (OIDB) accounts Feb 1, 2024
@thepomeranian thepomeranian added this to the aptos-node-v1.10 milestone Feb 14, 2024
@davidiw
Copy link
Contributor

davidiw commented Feb 20, 2024

@alinush
Copy link
Contributor Author

alinush commented Feb 20, 2024

  • Fixed the typo
  • Will add the 2nd bullet to my TODO

@alinush alinush changed the title [AIP-61][Discussion] OpenID-based blockchain (OIDB) accounts [AIP-61][Discussion] Keyless accounts Mar 1, 2024
@daoauth
Copy link

daoauth commented May 23, 2024

I am a developer eager to see WebAuthn implemented in keyless as soon as possible. Although the AIP considers WebAuthn, the actual implementation only includes Ed25519. Could this be due to the support for secp256r1? Additionally, I would like to propose extensions for WebAuthn. Would it be appropriate to continue with this here, or should I create a new AIP? I believe WebAuthn is the key to unlocking the remaining potential of keyless accounts.

pub enum EphemeralPublicKey {
    Ed25519 {
        public_key: Ed25519PublicKey,
    },
    Secp256r1Ecdsa {
        public_key: secp256r1_ecdsa::PublicKey,
    },
}

pub enum EphemeralSignature {
    Ed25519 {
        signature: Ed25519Signature,
    },
    WebAuthn {
        signature: PartialAuthenticatorAssertionResponse,
    },
}

https://github.com/aptos-labs/aptos-ts-sdk/blob/57630ebc488026c0eca4eb410a2f51386ff6855a/src/types/index.ts#L121

@alinush
Copy link
Contributor Author

alinush commented Jul 3, 2024

Hi @daoauth, sorry for the late response. We already support WebAuthn! See the AIP here and feel free to discuss here.

@daoauth
Copy link

daoauth commented Jul 5, 2024

I am a developer eager to see WebAuthn implemented in keyless as soon as possible. Although the AIP considers WebAuthn, the actual implementation only includes Ed25519. Could this be due to the support for secp256r1? Additionally, I would like to propose extensions for WebAuthn. Would it be appropriate to continue with this here, or should I create a new AIP? I believe WebAuthn is the key to unlocking the remaining potential of keyless accounts.

Thank you for the great news. I will actively use it.

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

No branches or pull requests

4 participants