@taquito/sapling 25.0.0-beta.1 → 25.0.0-rc.1
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.
|
@@ -4383,8 +4383,9 @@
|
|
|
4383
4383
|
if (!password) {
|
|
4384
4384
|
throw new InvalidSpendingKey('no password provided to decrypt');
|
|
4385
4385
|
}
|
|
4386
|
-
|
|
4387
|
-
const
|
|
4386
|
+
// Noble rejects Buffer salts under jsdom/SSR realm boundaries. Normalize into this realm.
|
|
4387
|
+
const salt = Uint8Array.from(keyArr.subarray(0, 8));
|
|
4388
|
+
const encryptedSk = keyArr.subarray(8);
|
|
4388
4389
|
const encryptionKey = pbkdf2(sha512, password, salt, { c: 32768, dkLen: 32 });
|
|
4389
4390
|
// Zero nonce is safe: fresh random salt per encryption produces unique PBKDF2-derived key.
|
|
4390
4391
|
// See: https://gitlab.com/tezos/tezos/-/blob/master/src/lib_signer_backends/encrypted.ml
|