firstfloorsoftware / flutter_sodium

Flutter bindings for libsodium
BSD 3-Clause "New" or "Revised" License
102 stars 47 forks source link

crypto sign, convert ed25519 public key to curve25519 REQUEST #18

Closed khainhero closed 5 years ago

khainhero commented 5 years ago

Thank you very much for the package for flutter and I appreciate all the work!.

I am currently trying to implement signal protocol with this package into my app using flutter. I can create curve25519 pairs, generate the ed25519 for signing.

I noticed there is already a way to convert the ed25519 into a curve25519(secret key only)

I also noticed, when we convert the secret ed25519 into curve25519, it always results in the same output(when the ed25519 is static). Wonderful i guess.

On to the issue/request

If we can be allowed to convert the ed25519(public key) into a curve25519. That would be great.

but i have a question, can the converted ed25519(public key) be used for encryption and the converted ed25519(secret key) be used for decryption.

I mean, when we convert both secret and public keys into curve25519, are they a match as pairs? which can be used to come to a shared secret against a different unique pair?

I want to utilize the ed25519 which I can convert to curve25519 for my Identity pair and also use it for signing. Thank you!