From c421be9e918f1f18399503a66ecc9161c6077719 Mon Sep 17 00:00:00 2001 From: Mega-Mewthree Date: Sat, 11 Aug 2018 18:28:18 -0700 Subject: [PATCH] Fix merge --- client/src/builtin/E2EE.js | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/client/src/builtin/E2EE.js b/client/src/builtin/E2EE.js index dcced961..4f6c73fb 100644 --- a/client/src/builtin/E2EE.js +++ b/client/src/builtin/E2EE.js @@ -190,29 +190,6 @@ export default new class E2EE extends BuiltinModule { if (!this._ecdh) this._ecdh = {}; return this._ecdh; } - - get ecdh() { - if (!this._ecdh) this._ecdh = {}; - return this._ecdh; - } - - createKeyExchange(userID) { - this.ecdh[userID] = crypto.createECDH('secp521r1'); - return this.ecdh[userID].generateKeys('base64'); - } - - publicKeyFor(userID) { - return this.ecdh[userID].getPublicKey('base64'); - } - - computeSecret(userID, otherKey) { - const secret = this.ecdh[userID].computeSecret(otherKey, 'base64', 'base64'); - delete this.ecdh[userID]; - // Hashing the shared secret future-proofs against some possible attacks. - const hash = crypto.createHash('sha256'); - hash.update(secret); - return hash.digest('base64'); - } createKeyExchange(dmChannelID) { this.ecdh[dmChannelID] = crypto.createECDH('secp521r1');