mirror of
https://github.com/bitcoin/bips.git
synced 2026-10-19 19:29:18 +00:00
bip-0138: use assigned BIP number 138 for magic and domain separation tags
This commit is contained in:
@@ -88,8 +88,8 @@ Note: in the followings sections, the operator ⊕ refers to the bitwise XOR op
|
||||
in particular it supports single-signature descriptors ($n = 1$). Each $p_i$
|
||||
is the x-only-normalized root public key of one *allowed* key expression
|
||||
(see [Descriptor key requirements](#descriptor-key-requirements)).
|
||||
- Let $s$ = sha256(sha256("BIPXXX_DECRYPTION_SECRET") | sha256("BIPXXX_DECRYPTION_SECRET") | $p_1$ | $p_2$ | ... | $p_n$)
|
||||
- Let $s_i$ = sha256(sha256("BIPXXX_INDIVIDUAL_SECRET") | sha256("BIPXXX_INDIVIDUAL_SECRET") | $p_i$)
|
||||
- Let $s$ = sha256(sha256("BIP138_DECRYPTION_SECRET") | sha256("BIP138_DECRYPTION_SECRET") | $p_1$ | $p_2$ | ... | $p_n$)
|
||||
- Let $s_i$ = sha256(sha256("BIP138_INDIVIDUAL_SECRET") | sha256("BIP138_INDIVIDUAL_SECRET") | $p_i$)
|
||||
- Let $c_i$ = $s$ ⊕ $s_i$
|
||||
|
||||
Because $s$ and $s_i$ use distinct domain-separation tags, $s \neq s_i$ and
|
||||
@@ -172,7 +172,7 @@ and integrity.
|
||||
In order to decrypt the payload of a backup, the owner of a certain public key p
|
||||
computes:
|
||||
|
||||
* let $s_i$ = sha256(sha256("BIPXXX_INDIVIDUAL_SECRET") ‖ sha256("BIPXXX_INDIVIDUAL_SECRET") ‖ $p$)
|
||||
* let $s_i$ = sha256(sha256("BIP138_INDIVIDUAL_SECRET") ‖ sha256("BIP138_INDIVIDUAL_SECRET") ‖ $p$)
|
||||
* for each `individual_secret_i` generate `reconstructed_secret_i` =
|
||||
`individual_secret_i` ⊕ `si`
|
||||
* for each `reconstructed_secret_i` process $payload$ =
|
||||
@@ -190,7 +190,7 @@ The encrypted backup must be encoded as follows:
|
||||
|
||||
#### Magic
|
||||
|
||||
`MAGIC`: 6 bytes which are ASCII/UTF-8 representation of **BIPXXX** (TBD).
|
||||
`MAGIC`: 6 bytes which are ASCII/UTF-8 representation of **BIP138**.
|
||||
|
||||
#### Version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user