Hi Mikkel, thank you very much. Seems like they have a much more advanced app than mine.
What i want to achieve is a free open source backdoor-free app which provides encryption for peer to peer communication.
- The most important files are CryptoSocketProxy.js and DHMessage.s
CrypoSocketProxy is a Proxy() instance for net.Socket such that it will automatically exchange a key with the other peer using Diffie-Hellman to encrypt later with AES-256-CBC.
- For key generation and encryption im using crypto from nodejs provided openssl installed.
- For Diffie-Hellman i have four states (this is something i did, maybe there is a paper written already with the states to use):
const DH_STATE = {
NOT_CONNECTED: 'NOT_CONNECTED',
WAITING_FOR_SECRET: 'WAITING_FOR_SECRET',
CONNECTED: 'CONNECTED'
}
- A good place to start looking at the code, maybe as entry point would be Client.js, line 27, this.connect()
When socket('connect') it will send the common share and secret to the other peer and wait for it's secret to computer the symmetric key later
thanks a lot for taking the time to help me!!!
Fernando