bcgit / bc-csharp

BouncyCastle.NET Cryptography Library (Mirror)
https://www.bouncycastle.org/csharp
MIT License
1.61k stars 542 forks source link

convert x448 keypair to ed448 keypair #157

Open chrishaly opened 5 years ago

chrishaly commented 5 years ago

x448 keypair can only be used to exchange shared key, and ed448 keypair can only be used to signature. but some sometimes we need used the same keypair to exchange key and signature.

if provider a converter function to convert x448 key pair to ed448 keypair and/or back, will solve this problem.

thanks.

jimsch commented 5 years ago

Given that the method of deriving the public key from the private key is different for x448 and ed448 that might be somewhat difficult. RFC 774 section 5 decodeScalar* and RFC 8032 section 5.1.5

chrishaly commented 5 years ago

Given that the method of deriving the public key from the private key is different for x448 and ed448 that might be somewhat difficult. RFC 774 section 5 decodeScalar* and RFC 8032 section 5.1.5

Some article says X448 and Ed448 are two forms of one curve it's possible to convert between them. For people who not good at Cryptography are very difficult almost not able to. So we wish there are functions in bc-crypto to implementation this.

chrishaly commented 5 years ago

Given that the method of deriving the public key from the private key is different for x448 and ed448 that might be somewhat difficult. RFC 774 section 5 decodeScalar* and RFC 8032 section 5.1.5

I found XEdDSA (XEd448) can sign with X448 from https://signal.org/docs/specifications/xeddsa/. Maybe it's possible to add XEdDSA to bc-sharp