Number: SLIP-0077
Title: Deterministic blinding key derivation for Confidential Transactions
Type: Standard
Status: Draft
Authors: Roman Zeyde <mail@romanzey.de>
Created: 2019-06-15
This document describes a method for blinding key derivation for Confidential Transactions, using a determinstic hierarchy.
In confidential transactions, the sender and the receiver use ECDH to derive a shared nonce, which is then used for hiding/recovering of the actual value and asset type being transacted. In Elements/Liquid, the receiver uses the following derivation scheme for his ECDH public/private keys:
blinding_private_key := HMAC_SHA256(key=master_blinding_key, msg=script_pubkey)
blinding_public_key := secp256k1_publickey(private_key=blinding_private_key)
Note: blinding_private_key
(as 256-bit scalar) must be less than the secp256k1 curve group order - otherwise, the derivation above must fail.
The receiver is using blinding_public_key
to construct a "confidential address", which is used by the sender to blind the relevant transaction outputs. Each such blinded transaction output also contains the sender's ECDH public key, so the receiver would be able to recover the shared nonce using its blinding_private_key
.
An additional use-case is sharing some/all of the receiver's blinding private keys with an external auditor, allowing unblinding the audited outputs without being able to spend them.
In order to use similar blinding key derivation scheme on TREZOR, we suggest using SLIP-0021 derivation scheme for master_blinding_key
:
domain := b"Symmetric key seed"
root := HMAC_SHA512(key=domain, msg=seed)
label := b"SLIP-0077"
node := HMAC_SHA512(key=root[0:32], msg=(b"\x00" + label))
master_blinding_key := node[32:64]
The above seed should be derived using BIP-0039 mnemonic and passphrase (if available).
The shared nonce is derived using ECDH and double-SHA256 of the compressed shared public key:
shared := secp256k1_multiply(blinding_private_key, sender_public_key, compressed=True)
nonce := SHA256(SHA256(shared))