Software interacting with the blockchain, including wallets, do not only revolve around pure asset transfer transactions but might have additional functionalities. In the case of Status that would be chat, but it can be anything like authentication, file encryption, etc. Using keys under the BIP32 tree for these purposes would allow the user to migrate the whole identity from one software to the other using the BIP39 mnemonic alone, since everything else would be derived from there.
We plan to propose a short EIP (ERC maybe?) to formalize a key subtree which would be reserved for this. I have written a draft at https://notes.status.im/UPVhoAKjT0irxIPjs5x8IA and would like to have some feedback on this before submitting it.
A short summary is that we define a separate (from the usual 44’) subtree under master and then have a key type and a key index. The format would thus be m/XXXX’/key_type’/key_index. The XXXX would be the EIP/ERC number.
The list of allocated key type must be maintained in a way similar to the allocated coin types for BIP44.
Implies that access to a dApp specific private key is given to the dApp. I believe this is not ideal as it means the dApp now needs to properly handle the private key.
I agree with you that it’d be ideal if the dApp could instead request signing/decrypting messages to the wallet, using the dedicated dApp key. Potentially using a permission based design such as EIP-2255.
However, the challenge is that the decryption/signature method provided by a wallet may not fit the dApp needs.
In regards of the signature scheme, EIP-712 could be a one-fit-all candidate.
However, in terms of decryption, we can see that various schemes are used in the ecosystem and it may be difficult to pick one:
Metamask uses X25519_XSalsa20_Poly1305.
Geth uses ECIES
Waku, originating from Whisper/Geth, also uses ECIES
Another solution would be to provide a generic API that supports several encryption. An idea would be to use CryptoSubtle as the API reference and assume that in the Browser world, some of the encryption supported by Crypto Subtle should be supported by the Wallet API.