removes encryption and signing. Relays on webrtc DTS. Keep authentication

This commit is contained in:
Matias Alejo Garcia 2014-04-28 15:02:24 -03:00
commit 830b6d2b5f
5 changed files with 10 additions and 101 deletions

View file

@ -20,22 +20,13 @@ function PrivateKey(opts) {
PrivateKey.prototype.getId = function() {
if (!this.id) {
var path = PublicKeyRing.SIGNING_BRANCH;
var path = PublicKeyRing.ID_BRANCH;
var bip32 = this.bip.derive(path);
this.id= bip32.eckey.public.toString('hex');
}
return this.id;
};
PrivateKey.prototype.getSigningKey = function() {
if (!this.sid) {
var path = PublicKeyRing.SIGNING_BRANCH;
var bip32 = this.bip.derive(path);
this.sid= bip32.eckey.private.toString('hex');
}
return this.sid;
};
PrivateKey.fromObj = function(obj) {
return new PrivateKey(obj);
};

View file

@ -8,7 +8,7 @@ var BIP32 = bitcore.BIP32;
var Address = bitcore.Address;
var Script = bitcore.Script;
var coinUtil = bitcore.util;
var Transaction = bitcore.Transaction;
var Transaction = bitcore.Transaction
var util = bitcore.util;
var Storage = imports.Storage || require('../storage/Base.js');
@ -48,7 +48,7 @@ PublicKeyRing.Branch = function (index, isChange) {
return 'm/0/'+(isChange?1:0)+'/'+index;
};
PublicKeyRing.SIGNING_BRANCH = 'm/100/0/0';
PublicKeyRing.ID_BRANCH = 'm/100/0/0';
PublicKeyRing.fromObj = function (data) {
if (data instanceof PublicKeyRing) {
@ -84,7 +84,7 @@ PublicKeyRing.prototype.getCopayerId = function(i) {
this.copayerIds = this.copayerIds || [];
if (!this.copayerIds[i]) {
var path = PublicKeyRing.SIGNING_BRANCH;
var path = PublicKeyRing.ID_BRANCH;
var bip32 = this.copayersBIP32[i].derive(path);
this.copayerIds[i]= bip32.eckey.public.toString('hex');
}
@ -158,7 +158,7 @@ PublicKeyRing.prototype.getPubKeys = function (index, isChange) {
}
this.publicKeysCache[path] = pubKeys.map(function(pk){return pk.toString('hex');});
} else {
pubKeys = pubKeys.map(function(s){return new Buffer(s,'hex')});
pubKeys = pubKeys.map(function(s){return new Buffer(s,'hex')});
}
return pubKeys;

View file

@ -161,7 +161,6 @@ Wallet.prototype.netStart = function() {
var myId = self.getMyCopayerId();
var startOpts = {
copayerId: myId,
signingKeyHex: self.privateKey.getSigningKey(),
maxPeers: self.totalCopayers,
};

View file

@ -151,7 +151,6 @@ WalletFactory.prototype.joinCreateSession = function(copayerId, cb) {
this.log('\t### PrivateKey Initialized');
var opts = {
copayerId: privateKey.getId(),
signingKeyHex: privateKey.getSigningKey(),
};
self.network.cleanUp();
self.network.start(opts, function() {