Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix private key format to match curve25518-donna

THIS BREAKS COMPATIBILITY WITH PREVIOUS CRYPTOCAT VERSIONS

We need to be careful about scheduling a coordinated rollout for this
update.

(Thanks @edakasmith @agl)
  • Loading branch information...
commit f199fcbe4b5c5deb8d7d7ff13f92ee5090d149ed 1 parent 837ebf7
@kaepora kaepora authored
View
3  src/chrome/js/multiparty.js
@@ -88,7 +88,8 @@ function checkSize(publicKey) {
// Generate private key (32 byte random number)
// Represented in decimal
multiParty.genPrivateKey = function() {
- myPrivateKey = Cryptocat.randomString(32, 0, 0, 1);
+ rand = Cryptocat.randomString(32, 0, 0, 1);
+ myPrivateKey = BigInt.str2bigInt(rand, 10);
return myPrivateKey;
}
View
3  src/cryptocat.safariextension/js/multiparty.js
@@ -88,7 +88,8 @@ function checkSize(publicKey) {
// Generate private key (32 byte random number)
// Represented in decimal
multiParty.genPrivateKey = function() {
- myPrivateKey = Cryptocat.randomString(32, 0, 0, 1);
+ rand = Cryptocat.randomString(32, 0, 0, 1);
+ myPrivateKey = BigInt.str2bigInt(rand, 10);
return myPrivateKey;
}
View
3  src/firefox/chrome/content/data/js/multiparty.js
@@ -88,7 +88,8 @@ function checkSize(publicKey) {
// Generate private key (32 byte random number)
// Represented in decimal
multiParty.genPrivateKey = function() {
- myPrivateKey = Cryptocat.randomString(32, 0, 0, 1);
+ rand = Cryptocat.randomString(32, 0, 0, 1);
+ myPrivateKey = BigInt.str2bigInt(rand, 10);
return myPrivateKey;
}
Please sign in to comment.
Something went wrong with that request. Please try again.