Bump to using 0.3.0 release of the libsignal-client library
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
8ee3bd9687
commit
84dc166b63
|
@ -23918,8 +23918,6 @@ var Internal = Internal || {};
|
|||
},
|
||||
|
||||
HKDF: function(input, salt, info) {
|
||||
// Specific implementation of RFC 5869 that only returns the first 3 32-byte chunks
|
||||
// TODO: We dont always need the third chunk, we might skip it
|
||||
return Internal.crypto.sign(salt, input).then(function(PRK) {
|
||||
var infoBuffer = new ArrayBuffer(info.byteLength + 1 + 32);
|
||||
var infoArray = new Uint8Array(infoBuffer);
|
||||
|
@ -23980,12 +23978,6 @@ var Internal = Internal || {};
|
|||
});
|
||||
};
|
||||
|
||||
libsignal.HKDF = {
|
||||
deriveSecrets: function(input, salt, info) {
|
||||
return Internal.HKDF(input, salt, info);
|
||||
}
|
||||
};
|
||||
|
||||
libsignal.crypto = {
|
||||
encrypt: function(key, data, iv) {
|
||||
return Internal.crypto.encrypt(key, data, iv);
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
"uuid": "3.3.2",
|
||||
"websocket": "1.0.28",
|
||||
"zkgroup": "https://github.com/signalapp/signal-zkgroup-node.git#2d7db946cc88492b65cc66e9aa9de0c9e664fd8d",
|
||||
"libsignal-client": "https://github.com/signalapp/libsignal-client-node.git#23edaad30ddec4d52a5634b30090563df1351337"
|
||||
"libsignal-client": "https://github.com/signalapp/libsignal-client-node.git#f10fbd04eb6efb396eb12c25429761e8785dc9d0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.7.7",
|
||||
|
|
12
preload.js
12
preload.js
|
@ -627,6 +627,18 @@ try {
|
|||
window.libsignal.externalCurve = externalCurve;
|
||||
window.libsignal.externalCurveAsync = externalCurveAsync;
|
||||
|
||||
window.libsignal.HKDF = {};
|
||||
window.libsignal.HKDF.deriveSecrets = (input, salt, info) => {
|
||||
const hkdf = client.HKDF.new(3);
|
||||
const output = hkdf.deriveSecrets(
|
||||
3 * 32,
|
||||
Buffer.from(input),
|
||||
Buffer.from(info),
|
||||
Buffer.from(salt)
|
||||
);
|
||||
return [output.slice(0, 32), output.slice(32, 64), output.slice(64, 96)];
|
||||
};
|
||||
|
||||
// Pulling these in separately since they access filesystem, electron
|
||||
window.Signal.Backup = require('./js/modules/backup');
|
||||
window.Signal.Debug = require('./js/modules/debug');
|
||||
|
|
|
@ -10268,9 +10268,9 @@ levn@~0.3.0:
|
|||
prelude-ls "~1.1.2"
|
||||
type-check "~0.3.2"
|
||||
|
||||
"libsignal-client@https://github.com/signalapp/libsignal-client-node.git#23edaad30ddec4d52a5634b30090563df1351337":
|
||||
version "0.2.0"
|
||||
resolved "https://github.com/signalapp/libsignal-client-node.git#23edaad30ddec4d52a5634b30090563df1351337"
|
||||
"libsignal-client@https://github.com/signalapp/libsignal-client-node.git#f10fbd04eb6efb396eb12c25429761e8785dc9d0":
|
||||
version "0.3.0"
|
||||
resolved "https://github.com/signalapp/libsignal-client-node.git#f10fbd04eb6efb396eb12c25429761e8785dc9d0"
|
||||
dependencies:
|
||||
bindings "^1.5.0"
|
||||
|
||||
|
|
Loading…
Reference in New Issue