diff --git a/dist/libsignal-protocol.js b/dist/libsignal-protocol.js index e3d672a..9daec74 100644 --- a/dist/libsignal-protocol.js +++ b/dist/libsignal-protocol.js @@ -35307,6 +35307,8 @@ var Internal = Internal || {}; result = result | (a[i] ^ b[i]); } if (result !== 0) { + console.log('Our MAC ', dcodeIO.ByteBuffer.wrap(calculated_mac).toHex()); + console.log('Their MAC', dcodeIO.ByteBuffer.wrap(mac).toHex()); throw new Error("Bad MAC"); } }); @@ -35722,6 +35724,7 @@ Internal.SessionRecord = function() { index = i; } } + console.log("Deleting chain closed at", oldest.added); delete session[util.toString(oldest.ephemeralKey)]; session.oldRatchetList.splice(index, 1); } @@ -36256,6 +36259,7 @@ SessionCipher.prototype = { return Promise.resolve(); } + console.log('New remote ephemeral key'); var ratchet = session.currentRatchet; return Promise.resolve().then(function() { diff --git a/src/SessionCipher.js b/src/SessionCipher.js index 2a6a7db..d10499f 100644 --- a/src/SessionCipher.js +++ b/src/SessionCipher.js @@ -247,6 +247,7 @@ SessionCipher.prototype = { return Promise.resolve(); } + console.log('New remote ephemeral key'); var ratchet = session.currentRatchet; return Promise.resolve().then(function() { diff --git a/src/SessionRecord.js b/src/SessionRecord.js index d6d20bb..f525557 100644 --- a/src/SessionRecord.js +++ b/src/SessionRecord.js @@ -229,6 +229,7 @@ Internal.SessionRecord = function() { index = i; } } + console.log("Deleting chain closed at", oldest.added); delete session[util.toString(oldest.ephemeralKey)]; session.oldRatchetList.splice(index, 1); } diff --git a/src/crypto.js b/src/crypto.js index cc54156..02dbfa5 100644 --- a/src/crypto.js +++ b/src/crypto.js @@ -97,6 +97,8 @@ var Internal = Internal || {}; result = result | (a[i] ^ b[i]); } if (result !== 0) { + console.log('Our MAC ', dcodeIO.ByteBuffer.wrap(calculated_mac).toHex()); + console.log('Their MAC', dcodeIO.ByteBuffer.wrap(mac).toHex()); throw new Error("Bad MAC"); } });