Hello! We have a setting with two peers who each know the other’s sr25519 public key (as a Polkadot account ID).
What we’d like to do is derive a shared secret between them, i.e. perform a static Diffie–Hellman based on their sr25519 keypairs.
Questions:
1. Does schnorrkel currently provide an out-of-the-box function to derive such a common secret?
2. If not, would it be safe to use an external crate such as ristretto255-dh for the actual key derivation?
We want to make sure we’re handling the scalars and points correctly and not missing any subtleties in schnorrkel’s key structure.
Hello! We have a setting with two peers who each know the other’s sr25519 public key (as a Polkadot account ID).
What we’d like to do is derive a shared secret between them, i.e. perform a static Diffie–Hellman based on their sr25519 keypairs.
Questions:
1. Does schnorrkel currently provide an out-of-the-box function to derive such a common secret?
2. If not, would it be safe to use an external crate such as ristretto255-dh for the actual key derivation?
We want to make sure we’re handling the scalars and points correctly and not missing any subtleties in schnorrkel’s key structure.