lndc: remove print debug print statements

This commit is contained in:
Olaoluwa Osuntokun committed 2016-07-12 17:04:14 -07:00
1 parent 850feed877
commit 9b5e487893
1 file changed
-10
-10
View File
@@ -121,9 +121,6 @@ func (c *LNDConn) Dial(
return err return err
} }
// display private key for debug only
fmt.Printf("made session key %x\n", sessionKey)
c.myNonceInt = 1 << 63 c.myNonceInt = 1 << 63
c.remoteNonceInt = 0 c.remoteNonceInt = 0
@@ -229,7 +226,6 @@ func (c *LNDConn) authPKH(
return err return err
} }
idDH := fastsha256.Sum256(btcec.GenerateSharedSecret(myId, theirPub)) idDH := fastsha256.Sum256(btcec.GenerateSharedSecret(myId, theirPub))
fmt.Printf("made idDH %x\n", idDH)
theirDHproof := btcutil.Hash160(append(localEphPubBytes, idDH[:]...)) theirDHproof := btcutil.Hash160(append(localEphPubBytes, idDH[:]...))
// Verify that their DH proof matches the one we just generated. // Verify that their DH proof matches the one we just generated.
@@ -274,14 +270,10 @@ func (c *LNDConn) Read(b []byte) (n int, err error) {
var nonceBuf [8]byte var nonceBuf [8]byte
binary.BigEndian.PutUint64(nonceBuf[:], c.remoteNonceInt) binary.BigEndian.PutUint64(nonceBuf[:], c.remoteNonceInt)
fmt.Printf("decrypt %d byte from %x nonce %d\n",
len(ctext), c.RemoteLNId, c.remoteNonceInt)
c.remoteNonceInt++ // increment remote nonce, no matter what... c.remoteNonceInt++ // increment remote nonce, no matter what...
msg, err := c.chachaStream.Open(nil, nonceBuf[:], ctext, nil) msg, err := c.chachaStream.Open(nil, nonceBuf[:], ctext, nil)
if err != nil { if err != nil {
fmt.Printf("decrypt %d byte ciphertext failed\n", len(ctext))
return 0, err return 0, err
} }
@@ -301,8 +293,6 @@ func (c *LNDConn) Write(b []byte) (n int, err error) {
if b == nil { if b == nil {
return 0, fmt.Errorf("write to %x nil", c.RemoteLNId) return 0, fmt.Errorf("write to %x nil", c.RemoteLNId)
} }
fmt.Printf("Encrypt %d byte plaintext to %x nonce %d\n",
len(b), c.RemoteLNId, c.myNonceInt)
// first encrypt message with shared key // first encrypt message with shared key
var nonceBuf [8]byte var nonceBuf [8]byte