waku-org / go-waku

Go implementation of Waku v2 protocol
https://waku.org/
Other
116 stars 43 forks source link

How to change the elliptic curve to Ed448-Goldilocks #835

Closed mohammad-babaei closed 11 months ago

mohammad-babaei commented 11 months ago

Description

I would like to explore the possibility of changing the elliptic curve used in the Go Waku project to Ed448-Goldilocks. This would be a significant change and has the potential to enhance the security and performance of the project. I would appreciate guidance and assistance on how to make this transition.

Requested Changes

I would like to understand the necessary steps to change the elliptic curve to Ed448-Goldilocks within the Go Waku project. This may include modifications to cryptographic libraries, code changes, and any other related adjustments.

Questions

  1. Could you provide guidance on the codebase files that would need modification for this transition?
  2. Are there any compatibility concerns or potential breaking changes this might introduce?

Additional Information

Please provide any additional context, recommendations, or relevant information related to this elliptic curve change that would help me better understand the process.

Thank you for your assistance and support in considering this change. I'm looking forward to your guidance and expertise on this matter.

richard-ramos commented 11 months ago

You should look at this parameter: https://github.com/waku-org/go-waku/blob/master/waku/v2/node/wakuoptions.go#L53 it's used in a couple of places in https://github.com/waku-org/go-waku/blob/master/waku/v2/node/wakunode2.go

Also look at these functions:

Regarding compatibility concerns, no idea, to be honest. The type of curve we're using is one of those defined in https://github.com/libp2p/go-libp2p/tree/master/core/crypto so there was no need to deal with any specific curves other than the ones provided by default. You'd have to look into that package to see what should be done in order to add support for Ed448-Goldilocks

mohammad-babaei commented 11 months ago

go-waku Also uses go-discover for discv5 which the changes should be applied there also