diff --git a/auth/request.go b/auth/request.go index 9251af76bca65579f3bb4d9f8d5107d7da0126c5..91eeb88d179e4e699e6f31db515b5f627add697d 100644 --- a/auth/request.go +++ b/auth/request.go @@ -122,6 +122,8 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader, cmixMsg.SetKeyFP(fp) cmixMsg.SetMac(mac) cmixMsg.SetContents(baseFmt.Marshal()) + cmixMsg.SetRecipientID(partner.ID) + jww.INFO.Printf("PARTNER ID: %s", partner.ID) /*store state*/ //fixme: channel is bricked if the first store succedes but the second fails @@ -135,6 +137,11 @@ func RequestAuth(partner, me contact.Contact, message string, rng io.Reader, //store the message as a critical message so it will always be sent storage.GetCriticalRawMessages().AddProcessing(cmixMsg) + //jww.INFO.Printf("CMIX MESSAGE 1: %s, %v, %v, %v", cmixMsg.GetRecipientID(), + // cmixMsg.GetKeyFP(), cmixMsg.GetMac(), cmixMsg.GetContents()) + jww.INFO.Printf("CMIX MESSAGE FP: %s, %v", cmixMsg.GetRecipientID(), + cmixMsg.GetKeyFP()) + /*send message*/ round, err := net.SendCMIX(cmixMsg, params.GetDefaultCMIX()) if err != nil { diff --git a/cmd/root.go b/cmd/root.go index 1c0ac853de7d979b7390fbca090aad1368eb8d32..e8063ec06cd9c6510ba4630584cdb0b9d95569d6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -156,6 +156,7 @@ var rootCmd = &cobra.Command{ if viper.GetBool("unsafe-channel-creation") { authMgr.AddGeneralRequestCallback(func( requestor contact.Contact, message string) { + jww.INFO.Printf("Got Request: %s", requestor.ID) err := client.ConfirmAuthenticatedChannel( requestor) if err != nil { diff --git a/go.mod b/go.mod index 1177dcbb6658f3da6581743754b578ed32ec1353..f1ae06038fecfeecccaa1f06aaf9edc28e7878ce 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.7.1 gitlab.com/elixxir/comms v0.0.3 - gitlab.com/elixxir/crypto v0.0.4 + gitlab.com/elixxir/crypto v0.0.5-0.20201109203841-ba162a25be6e gitlab.com/elixxir/ekv v0.1.3 gitlab.com/elixxir/primitives v0.0.2 gitlab.com/xx_network/comms v0.0.3 diff --git a/go.sum b/go.sum index cd8869a5b9d411cf1dd2f18b80a8e62273872a87..6bc013c925cac534b5f56c282e797db060bf0b9a 100644 --- a/go.sum +++ b/go.sum @@ -258,6 +258,10 @@ gitlab.com/elixxir/crypto v0.0.3 h1:znCt/x2bL4y8czTPaaFkwzdgSgW3BJc/1+dxyf1jqVw= gitlab.com/elixxir/crypto v0.0.3/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= gitlab.com/elixxir/crypto v0.0.4 h1:8eWjvUepCU2PiqZM2NFYo6rFg1w8KWO1hMDwMNFEqoI= gitlab.com/elixxir/crypto v0.0.4/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= +gitlab.com/elixxir/crypto v0.0.5-0.20201109195944-c4a4090b258a h1:SnZm8bO8Cw4j7FDGqzt4kfP58peuNE3z1Q3NqifXwns= +gitlab.com/elixxir/crypto v0.0.5-0.20201109195944-c4a4090b258a/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= +gitlab.com/elixxir/crypto v0.0.5-0.20201109203841-ba162a25be6e h1:rkT8Pzjgo9oF3uS8ExHGNUQoJX/22qK3lU+vU8QsOCY= +gitlab.com/elixxir/crypto v0.0.5-0.20201109203841-ba162a25be6e/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= gitlab.com/elixxir/ekv v0.1.3 h1:OE+LBMIhjGUMwc6hHJzYvEPNJQV7t1vMnJyIgxUMUo8= gitlab.com/elixxir/ekv v0.1.3/go.mod h1:e6WPUt97taFZe5PFLPb1Dupk7tqmDCTQu1kkstqJvw4= gitlab.com/elixxir/primitives v0.0.0-20200731184040-494269b53b4d/go.mod h1:OQgUZq7SjnE0b+8+iIAT2eqQF+2IFHn73tOo+aV11mg= diff --git a/network/message/handler.go b/network/message/handler.go index 8e3b34f30de7502844daebc01b057b62810802ac..9018e36f847d1fb5364f12d51e45f0a7c1e06353 100644 --- a/network/message/handler.go +++ b/network/message/handler.go @@ -72,6 +72,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message) { Timestamp: time.Time{}, Encryption: message.None, } + jww.INFO.Printf("Garbled/RAW Message: %v", msg.GetKeyFP()) m.Session.GetGarbledMessages().Add(msg) m.Switchboard.Speak(raw) return diff --git a/network/message/sendCmix.go b/network/message/sendCmix.go index 25e93f33dda8d3e7b9060e68471baf9451c8dd86..19e58074a9ab2f0c486db26d45c6cea831bafdc0 100644 --- a/network/message/sendCmix.go +++ b/network/message/sendCmix.go @@ -77,6 +77,7 @@ func (m *Manager) SendCMIX(msg format.Message, param params.CMIX) (id.Round, err return 0, errors.WithMessage(err, "Failed to generate "+ "salt, this should never happen") } + jww.INFO.Printf("RECIPIENTIDPRE_ENCRYPT: %s", msg.GetRecipientID()) encMsg, kmacs := roundKeys.Encrypt(msg, salt) //build the message payload