Use Hash256

This commit is contained in:
Jim Hamill
2025-02-13 11:34:49 +00:00
parent cec0aeb56d
commit fff8e35d62
6 changed files with 1655 additions and 14 deletions
+8 -8
View File
@@ -173,14 +173,14 @@ To minimize the amount of data necessary for recovery and maintain backwards com
The below is very rough (I'm not suggesting this as a practical implementation, but just to illustrate the approach vaguely).
| Key | Derivation (Rough Example) | Comments |
|------------------------|---------------------------------------------------------------|---------------------------------------|
| Default HD Wallet | Root Seed -> m/44'/145'/0' | Backwards compat with current Wallets |
| WalletId | sha256(sha256(rootSeed) + sha256('walletId')) | Identifier for Wallet |
| EncryptionKey | sha256(sha256(rootSeed) + sha256('encryptionKey')) | Encrpytion Key for Activities |
| SigningKey | sha256(sha256(rootSeed) + sha256('signingKey')) | Signing key for Identity/Activity |
| Intra-Wallet Templates | sha256(sha256(rootSeed) + sha256('template:${templateHash}')) | Derive seed per template |
| Web-based Dapps | sha256(sha256(rootSeed) + sha256(`domain:${domain}')) | Derive seed per domain |
| Key | Derivation (Rough Example) | Comments |
|------------------------|------------------------------------------------------------------|---------------------------------------|
| Default HD Wallet | Root Seed -> m/44'/145'/0' | Backwards compat with current Wallets |
| WalletId | hash256(hash256(rootSeed) + hash256('walletId')) | Identifier for Wallet |
| EncryptionKey | hash256(hash256(rootSeed) + hash256('encryptionKey')) | Encrpytion Key for Activities |
| SigningKey | hash256(hash256(rootSeed) + hash256('signingKey')) | Signing key for Identity/Activity |
| Intra-Wallet Templates | hash256(hash256(rootSeed) + hash256('template:${templateHash}')) | Derive seed per template |
| Web-based Dapps | hash256(hash256(rootSeed) + hash256(`domain:${domain}')) | Derive seed per domain |
NOTE: WalletID, EncryptionKey and SigningKey could **probably** use a BIP32 Derivation Path instead of hashing a new seed from the root seed (and this might be more ideal/sensible?).