ERC-1775 Per-app dedicated wallet accounts (app keys) (App Keys, application specific wallet accounts)

Stagnant · Accounts & wallets · created 2019-02-20

A standard that lets a wallet automatically derive, from the user's mnemonic, an app key: a dedicated account unique to each app (domain), so that signing can be delegated separately from the main account or privacy can be enhanced.

Why it is needed

Wallets typically reuse the same main account across many apps as is. The main account holds most of the user's funds, so it requires high security, meaning the user must confirm every signature in person. Under this structure, it is hard to use scaling or privacy applications that need to watch state automatically and sign instantly, and because the same account is used across many apps, the user's activity ends up linked together, reducing privacy. There is also no standard way to recreate the temporary accounts used per app when restoring a wallet, so when a user recreates their wallet, the connection to each app is easily lost.

What to implement

In depth

An app's unique identifier

Each app is uniquely identified and authenticated by a domain string called its origin. This may be a DNS name, and in the future could also be an ENS name or an IPFS hash. If IPFS or swarm content is used as the origin, it could instead be pointed to via an ENS entry, in which case the content the ENS entry points to can change, altering the security and update model. It notes that when an ENS domain points to an IPFS address, a protocol prefix such as ens://ipfs.snap.eth may be required.

App-dedicated private key generation algorithm

Computed as appKeyPrivKey = keccak256(privKey + originString). privKey is the private key of the account the user chose to derive the app key from, and originString is the origin URL from which the permission request originated. This call is exposed via the provider.send({method: 'wallet_getAppKeyForAccount', params: [address1]}) RPC, allowing any domain to request its own app key tied to the currently requested account.

Using accounts as personas

By changing which account they select when deriving an app key, a user can create different sets of app keys. Using different account indexes from the same mnemonic lets a user create isolated personas (for example, personal and work) even for the same app, and the app or domain has no way to know they came from the same person or mnemonic. It explains that for an app that interacts with multiple main accounts, one can be used as the master account (persona) and the rest as secondary accounts.

Relationship to HD keys

App keys created this way do not follow BIP32. Therefore, an app cannot directly generate multiple app keys itself using non-hardening or extended public key techniques; it receives only a single private key per origin and persona. However, it notes that this single key can be used as new entropy to establish a separate HD tree, within which addresses can be derived in either a hardened or non-hardened manner as desired.

Connection to the permission model

It explains that an app key created this way can be granted a different set of permissions from the main account through the requestPermission model introduced in EIP-2255. This allows the user to delegate a degree of trust for the app to perform certain cryptographic operations on its behalf, while keeping the main account's security intact.

The idea of sharing keys across domains

This EIP does not explicitly address the case of sharing an app key across multiple pages, but it proposes that this need could be met by having one domain (app) pass its appKey as a seed to another domain (signer) and request that it perform cryptographic operations on its behalf. It explains that a domain representing a static hash of a trusted cryptographic function implementation could be as safe as calling an audited internal dependency.

Limits on privacy and the funding trail

If an app key only signs and does not need funds, this standard alone can provide privacy in a simple, deterministic way that is compatible across wallets. However, if funds must be sent to an app key, a deposit and withdrawal trail remains, so the privacy problem is not fully solved; it states that an anonymous funding method such as a mixer or ring signature must be used alongside this proposal for privacy to be guaranteed.

Backward compatibility and proposal status

From the wallet's perspective, an app key is a separate account from the one the user already uses, so there is no compatibility issue. However, it notes that apps that had linked the user to their main account must decide for themselves whether to move to the app key. This proposal is currently Stagnant, meaning it has stopped progressing and may not change or be adopted going forward.

Original ERC · ← ERCs