jsonld-signatures
Advanced tools
Comparing version 2.1.4 to 2.1.5
# jsonld-signatures ChangeLog | ||
## 2.1.5 - 2018-02-27 | ||
### Changed | ||
- Use `chloride`, a faster and better maintained implementation | ||
of `Ed25519`. | ||
## 2.1.4 - 2018-02-22 | ||
@@ -4,0 +10,0 @@ |
@@ -53,3 +53,3 @@ /** | ||
// optimize using node libraries | ||
const ed25519 = require('ed25519'); | ||
const chloride = require('chloride'); | ||
const bs58 = require('bs58'); | ||
@@ -62,3 +62,3 @@ | ||
const tbs = Buffer.concat([new Buffer(encodedHeader + '.', 'utf8'), new Buffer(verifyData.data, verifyData.encoding)]); | ||
const buffer = ed25519.Sign(tbs, privateKey); | ||
const buffer = chloride.crypto_sign_detached(tbs, privateKey); | ||
encodedSignature = util.encodeBase64Url(buffer.toString('binary'), { forge }); | ||
@@ -120,3 +120,3 @@ } else { | ||
// optimize using node libraries | ||
const ed25519 = require('ed25519'); | ||
const chloride = require('chloride'); | ||
const bs58 = require('bs58'); | ||
@@ -129,3 +129,3 @@ | ||
const tbs = Buffer.concat([new Buffer(encodedHeader + '.', 'utf8'), new Buffer(verifyData.data, verifyData.encoding)]); | ||
return ed25519.Verify(tbs, new Buffer(rawSignature, 'binary'), publicKey); | ||
return chloride.crypto_sign_verify_detached(new Buffer(rawSignature, 'binary'), tbs, publicKey); | ||
} | ||
@@ -132,0 +132,0 @@ |
@@ -37,3 +37,3 @@ /** | ||
+-------+-----------------------------------------------------------+ | ||
*/ | ||
*/ | ||
@@ -46,3 +46,3 @@ const encodedHeader = util.encodeBase64Url( | ||
// optimize using node libraries | ||
const ed25519 = require('ed25519'); | ||
const chloride = require('chloride'); | ||
const bs58 = require('bs58'); | ||
@@ -57,3 +57,3 @@ | ||
new Buffer(verifyData.data, verifyData.encoding)]); | ||
const buffer = ed25519.Sign(tbs, privateKey); | ||
const buffer = chloride.crypto_sign_detached(tbs, privateKey); | ||
encodedSignature = util.encodeBase64Url( | ||
@@ -108,3 +108,3 @@ buffer.toString('binary'), {forge}); | ||
// optimize using node libraries | ||
const ed25519 = require('ed25519'); | ||
const chloride = require('chloride'); | ||
const bs58 = require('bs58'); | ||
@@ -119,4 +119,4 @@ | ||
new Buffer(verifyData.data, verifyData.encoding)]); | ||
return ed25519.Verify( | ||
tbs, new Buffer(rawSignature, 'binary'), publicKey); | ||
return chloride.crypto_sign_verify_detached( | ||
new Buffer(rawSignature, 'binary'), tbs, publicKey); | ||
} | ||
@@ -123,0 +123,0 @@ |
{ | ||
"name": "jsonld-signatures", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"description": "An implementation of the Linked Data Signatures specifications for JSON-LD in JavaScript.", | ||
@@ -37,3 +37,3 @@ "homepage": "https://github.com/digitalbazaar/jsonld-signatures", | ||
"bs58": "^4.0.1", | ||
"ed25519": "0.0.4", | ||
"chloride": "^2.2.8", | ||
"jsonld": "^0.5.20", | ||
@@ -110,4 +110,4 @@ "node-forge": "^0.7.1", | ||
"bs58": false, | ||
"ed25519": false | ||
"chloride": false | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
418989
+ Addedchloride@^2.2.8
+ Addedchloride@2.4.1(transitive)
+ Addedchloride-test@1.2.4(transitive)
+ Addeded2curve@0.1.4(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedjson-buffer@2.0.11(transitive)
+ Addedlibsodium@0.7.15(transitive)
+ Addedlibsodium-wrappers@0.7.15(transitive)
+ Addednode-gyp-build@4.8.4(transitive)
+ Addedsha.js@2.4.112.4.5(transitive)
+ Addedsodium-browserify@1.3.0(transitive)
+ Addedsodium-browserify-tweetnacl@0.2.6(transitive)
+ Addedsodium-chloride@1.1.2(transitive)
+ Addedsodium-native@3.4.1(transitive)
+ Addedtweetnacl@1.0.3(transitive)
+ Addedtweetnacl-auth@0.3.1(transitive)
- Removeded25519@0.0.4
- Removeded25519@0.0.4(transitive)