Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 3.09 KB

slip-0077.md

File metadata and controls

66 lines (45 loc) · 3.09 KB

SLIP-0077 : Deterministic blinding key derivation for Confidential Transactions

Number:  SLIP-0077
Title:   Deterministic blinding key derivation for Confidential Transactions
Type:    Standard
Status:  Draft
Authors: Roman Zeyde <[email protected]>
Created: 2019-06-15

Abstract

This document describes a method for blinding key derivation for Confidential Transactions, using a deterministic hierarchy.

General design

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.

Design details

Master blinding key derivation

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).

Shared nonce derivation

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))

References