Skip to content

Deriving a common secret from two sr25519 keypairs (static Diffie–Hellman) #114

@ERussel

Description

@ERussel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions