CloakProject/codename-phoenix

Migrate/Implement CloakShield functionality

Opened this issue · 0 comments

CloakShield is a network messaging layer that operates on top of the standard messaging layer. CloakShield messages are multi-layer encrypted, with each layer being encrypted for one or more specific connected peers. Messages are onion-routed across the network and each onion layer uses the aforementioned encryption to ensure that only specific nodes are able to decrypt the outer layer before forwarding the further encrypted payload for decryption by the next node(s) on the onion route.

The bulk of the code relating to CloakShield is encapsulated in the cloakshield.cpp and cloakshield.h files. Specific methods for routing/encrypting/decrypting/transmitting data can be found here.

Onion routed data is packaged in nested CCloakingData objects (see cloakingdata.cpp and cloakingdata.h), which contain a CCloakingDataPayload object in which the actual data resides. A CCloakingData object can store various different types of data related to the Enigma transaction process (see CloakingDataType enum for more information).

It is likely that the messaging system within the bitcoin codebase has changed (perhaps significantly) since Cloak was first created, so it is impossible to determine just what changes will need to be made during porting of the CloakShield system to the new codebase. The removal of the OpenSSL dependency will likely require some reworking of the ECDH (Elliptical Curve Diffie Hellman) code, which may also cause some compatibility issues with previous Cloak clients (QT wallets and daemons). The secp256k1 does however contain functionality related to ECDH and this can likely be leveraged for CloakShield usage,