Remove 1mod8

27b5bf54cc
This commit is contained in:
lilia 2014-11-06 00:49:54 -08:00
parent db76c7e164
commit cd4b98d426

View file

@ -69,8 +69,6 @@ window.textsecure.crypto = function() {
if (textsecure.nacl.USE_NACL) {
return textsecure.nacl.postNaclMessage({command: "bytesToPriv", priv: privKey}).then(function(message) {
var priv = message.res.slice(0, 32);
if (!isIdentity)
new Uint8Array(priv)[0] |= 0x01;
return textsecure.nacl.postNaclMessage({command: "privToPub", priv: priv}).then(function(message) {
return { pubKey: prependVersion(message.res.slice(0, 32)), privKey: priv };
});
@ -81,9 +79,6 @@ window.textsecure.crypto = function() {
priv[0] &= 0xFFF8;
priv[15] = (priv[15] & 0x7FFF) | 0x4000;
if (!isIdentity)
priv[0] |= 0x0001;
//TODO: fscking type conversion
return Promise.resolve({ pubKey: prependVersion(toArrayBuffer(curve25519(priv))), privKey: privKey});
}