mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-22 03:24:18 +01:00
Seed encrypt: init mint with encrypted keys after migration (#472)
* seed encrypt: init mint with encrypted keys after migration * adjust build pipeline
This commit is contained in:
@@ -6,15 +6,14 @@ from ..core.settings import settings
|
||||
|
||||
|
||||
def derive_keys_backwards_compatible_insecure_pre_0_12(
|
||||
master_key: str, derivation_path: str = ""
|
||||
seed: str, derivation_path: str = ""
|
||||
):
|
||||
"""
|
||||
WARNING: Broken key derivation for backwards compatibility with 0.11.
|
||||
"""
|
||||
return {
|
||||
2
|
||||
** i: PrivateKey(
|
||||
hashlib.sha256((master_key + derivation_path + str(i)).encode("utf-8"))
|
||||
2**i: PrivateKey(
|
||||
hashlib.sha256((seed + derivation_path + str(i)).encode("utf-8"))
|
||||
.hexdigest()
|
||||
.encode("utf-8")[:32],
|
||||
raw=True,
|
||||
|
||||
Reference in New Issue
Block a user