Feature request: Add api.getSharedSecret(addrA, addrB)
Opened this issue · 2 comments
Add getSharedSecret to return ed25519 shared ephemeral secret, per CIP-008/030, to permit encryption on txn metadata (or other messages) between Alice (addrA) and Bob (addrB). Map addrA against corresponding private key held in wallet, addrB is recipient public address.
For example converts ed25519 private / public keys to Curve25519 and calculates Elliptic Curve Diffie Hellman (ECDH) with X25519 (conforming to RFC7748).
This would allow a number of interesting use cases where there is a need for an on-chain secret.
Would be happy to discuss further.
Thank you for taking the time to explain this feature in detail. It sounds like it could open up some exciting use cases on-chain.
We will discuss and most likely plan this feature internally and start working on it at some point.
However, we currently do not have the manpower to give an estimate on when this will be. We will keep this issue open until then. Thanks again for the idea!
Thanks for considering. We have found a possible workaround by extending existing capabilities, which we can use to prototype, but this approach would be much simpler and would confer a competitive advantage for the ecosystem (Metamask permits signing but not creation of a shared secret).