CodeChain-io / foundry

A programmable open source blockchain engine
GNU General Public License v3.0
38 stars 12 forks source link

Generate ephemeral keys for p2p networks #169

Closed HoOngEe closed 4 years ago

HoOngEe commented 4 years ago

sodiumoxide does not support point conversion from Edward25519 to Curve25519(https://github.com/sodiumoxide/sodiumoxide/issues/85). This functionality was required to use the same private key for both transaction signing and p2p network key exchange. At first, I implemented the conversion in my sodiumoxide fork. The problem can also be resolved by generating ephemeral keys for every connection. Because this involves the protocol change, I think we need a discussion.

HoOngEe commented 4 years ago

Already ephemeral keys are generated in our p2p layer so such conversion is unnecessary.