I'm trying to implement public key encryption that support key pairs generated by different libraries:

  • Curve25519 - libsodium cryptoBoxKeypair()
  • Ed25519 - Google Tink Ed25519Sign.KeyPair.newKeyPair()
  • sr25519 - Polkadot Schnorrkel over Ristretto

I'm using libsodium cryptoBoxSealOpenEasy() for encryption that is works, obviously, with Curve25519 and with Ed25519 after conversion with libsodium convertKeyPairEd25519ToCurve25519(). But I'm stuck with sr25519 - don't know how to convert it to Curve25519.

  • $\begingroup$ You need to play with the coset $\endgroup$
    – kelalaka
    Apr 14, 2021 at 13:49
  • $\begingroup$ This is something that is also of interest to me. Did you find any resources that list a secure way to achieve this conversion -- or whether this is sensible at all? $\endgroup$ Jan 26, 2022 at 12:01
  • 1
    $\begingroup$ @cryptobeginner unfortunately, no. $\endgroup$
    – ninja
    Jan 27, 2022 at 14:40


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.