@taquito/sapling 24.0.1 → 24.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,7 +31,10 @@ function decryptKey(spendingKey, password) {
|
|
|
31
31
|
const salt = (0, typedarray_to_buffer_1.default)(keyArr.slice(0, 8));
|
|
32
32
|
const encryptedSk = (0, typedarray_to_buffer_1.default)(keyArr.slice(8));
|
|
33
33
|
const encryptionKey = pbkdf2_1.default.pbkdf2Sync(password, salt, 32768, 32, 'sha512');
|
|
34
|
-
|
|
34
|
+
// Zero nonce is safe: fresh random salt per encryption produces unique PBKDF2-derived key.
|
|
35
|
+
// See: https://gitlab.com/tezos/tezos/-/blob/master/src/lib_signer_backends/encrypted.ml
|
|
36
|
+
const decrypted = (0, nacl_1.openSecretBox)(new Uint8Array(encryptionKey), new Uint8Array(24), // zero nonce - uniqueness provided by per-encryption derived key
|
|
37
|
+
new Uint8Array(encryptedSk));
|
|
35
38
|
if (!decrypted) {
|
|
36
39
|
throw new errors_1.InvalidSpendingKey(spendingKey, 'incorrect password or unable to decrypt');
|
|
37
40
|
}
|
package/dist/lib/version.js
CHANGED
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
4
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT!
|
|
5
5
|
exports.VERSION = {
|
|
6
|
-
"commitHash": "
|
|
7
|
-
"version": "24.0.
|
|
6
|
+
"commitHash": "f798e97ba998acc2cc5310278d812448591bd312",
|
|
7
|
+
"version": "24.0.2"
|
|
8
8
|
};
|
|
@@ -1002,7 +1002,10 @@ function decryptKey(spendingKey, password) {
|
|
|
1002
1002
|
const salt = toBuffer(keyArr.slice(0, 8));
|
|
1003
1003
|
const encryptedSk = toBuffer(keyArr.slice(8));
|
|
1004
1004
|
const encryptionKey = pbkdf2.pbkdf2Sync(password, salt, 32768, 32, 'sha512');
|
|
1005
|
-
|
|
1005
|
+
// Zero nonce is safe: fresh random salt per encryption produces unique PBKDF2-derived key.
|
|
1006
|
+
// See: https://gitlab.com/tezos/tezos/-/blob/master/src/lib_signer_backends/encrypted.ml
|
|
1007
|
+
const decrypted = openSecretBox(new Uint8Array(encryptionKey), new Uint8Array(24), // zero nonce - uniqueness provided by per-encryption derived key
|
|
1008
|
+
new Uint8Array(encryptedSk));
|
|
1006
1009
|
if (!decrypted) {
|
|
1007
1010
|
throw new InvalidSpendingKey(spendingKey, 'incorrect password or unable to decrypt');
|
|
1008
1011
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-sapling.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taquito-sapling.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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f2.pbkdf2Sync(password, salt, 32768, 32, 'sha512');
|
|
1018
|
-
|
|
1018
|
+
// Zero nonce is safe: fresh random salt per encryption produces unique PBKDF2-derived key.
|
|
1019
|
+
// See: https://gitlab.com/tezos/tezos/-/blob/master/src/lib_signer_backends/encrypted.ml
|
|
1020
|
+
const decrypted = nacl.openSecretBox(new Uint8Array(encryptionKey), new Uint8Array(24), // zero nonce - uniqueness provided by per-encryption derived key
|
|
1021
|
+
new Uint8Array(encryptedSk));
|
|
1019
1022
|
if (!decrypted) {
|
|
1020
1023
|
throw new InvalidSpendingKey(spendingKey, 'incorrect password or unable to decrypt');
|
|
1021
1024
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-sapling.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taquito-sapling.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
|
3
|
-
"version": "24.0.
|
|
3
|
+
"version": "24.0.2",
|
|
4
4
|
"description": "Allows reading and preparing sapling transactions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tezos",
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"@airgap/sapling-wasm": "0.0.9",
|
|
69
69
|
"@stablelib/nacl": "^1.0.4",
|
|
70
70
|
"@stablelib/random": "^1.0.2",
|
|
71
|
-
"@taquito/core": "^24.0.
|
|
72
|
-
"@taquito/rpc": "^24.0.
|
|
73
|
-
"@taquito/taquito": "^24.0.
|
|
74
|
-
"@taquito/utils": "^24.0.
|
|
71
|
+
"@taquito/core": "^24.0.2",
|
|
72
|
+
"@taquito/rpc": "^24.0.2",
|
|
73
|
+
"@taquito/taquito": "^24.0.2",
|
|
74
|
+
"@taquito/utils": "^24.0.2",
|
|
75
75
|
"bignumber.js": "^9.1.2",
|
|
76
76
|
"bip39": "3.1.0",
|
|
77
77
|
"blakejs": "^1.2.1",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"ts-node": "^10.9.2",
|
|
106
106
|
"typescript": "~5.5.4"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "1ed75f883b26cbe2a62287813eedb096d81f0f46"
|
|
109
109
|
}
|