Identity protocol v1

From Bitcoin Wiki
Revision as of 22:05, 28 August 2013 by Jgarzik (talk | contribs) (SIN record)
Jump to: navigation, search

Design goals

Fully decentralized, anonymous, secure identity.

A SIN ("System Identification Number") is the unique record identifier by which this identity will be known.


  • Ownership may be digitally proven
  • Start as anonymous; opt out of anonymity by attaching identifying key-value pairs ( = "John Smith", = "123-45-6789").
  • Disposable
  • All key-value pair updates digitally signed by SIN owner (key holder)
  • Third parties may offer digital attestions:
    • Identity Verification, Inc. digitally signs a SIN as passing their Not A Criminal/Level-1 check.
    • Big Auction Provider, Inc. digitally signs a SIN as having a certain reputation score, on their website.
    • Decentralized market users digitally sign one another's SINs, building a decentralized reputation
  • Type-1 SINs: have some creation cost, deterring spam.
  • Type-1 SINs: Sacrifice may be digitally proven, bootstrapping root of trust from blockchain data

tl;dr: A “master public key” generated by the user forms the root of digital trust.

Types of SINs

Type 1 (persistent)

SIN_Type 0x01 (bitcoin main chain) or 0x11 (testnet)

Type-1 SINs are intentionally scarce resources, much like bitcoins themselves. All Type-1 SINs must conform to the sacrifice protocol described in this specification, to be considered valid.

Type 2 (ephemeral)

SIN_Type 0x02

Type-2 SINs may be generated at any time, without network activity, much like bitcoin addresses.


Creating a SIN

  1. Prefix = 0x0F
  2. SIN_Type = [0x01 | 0x02 | 0x11] -- See below for discussion of SIN types.
  3. MD = Hash160(MPK)
  4. SIN = base58_encode_check( Prefix + SIN_Version + MD )
  5. Hyphenate SIN for easier human reading if desired, inserting one hyphen after every 5th character.

Creating sacrifice transactions

Creation cost is attached to decentralized identity by means of sacrificing a small amount of value.

An implementation of Announce/Commit Sacrifices. That author's feedback on this protocol was very helpful.

  1. MPK = master ECDSA public key (compressed)
  2. BH = current block height
  3. Create and sign transaction T2. Broadcast if desired.
    1. must include Hash160(MPK) OP_TRUE anyone-can-spend output with value >= 0.001BTC
    2. nlocktime = BH + 144 blocks
    3. no more than 1000 bytes in size
  4. Create, sign and broadcast transaction T1
    1. must include OP_RETURN serialized(T2) output as last txout

Validating the root identity information

  1. B1 = block w/ T1
  2. B2 = block w/ T2
  3. Verify B2 height - 144 >= B1 height.
  4. Verify announced T2 is valid
  5. Verify mined T2 spends same inputs as announced T2 (not equal to account for Transaction Malleability)
  6. Fail and waste sacrifice if not.

Thus a minimal root record is MPK and is provably

  • linked to the sacrifices
  • MPK starts a new chain of digital signature trust, for further record updates

SIN record

DANGER: This section is under heavy development and discussion. It might morph into merkle roots or another form.

A SIN record is a series of key/value pairs, validated by MPK digital signature. Each SIN record has a stable binary encoding designed to ensure stable hash values.

uint32_t: an unsigned, little endian integer

Basic layout:

  • uint32_t magic number (and/or version number) == 0x88, 0x41, 0x92, 0xA4
  • uint32_t pair count
  • [list of key/value pairs]
  • Hash160(prior data)

Basic layout of a key/value pair:

  • uint32_t key length
  • uint32_t value length
  • [key-length bytes of valid UTF8-encoded data]
  • [value-length bytes of opaque data]

The order of key/value pairs must be preserved, to ensure hash stability.

Duplicate keys are not permitted.



Future work

After creation, the root identity and key-value pairs must be stored $somewhere.

After that root identity is created, additional key-value pairs may be associated with the root record via updates verified by MPK, stored in an alt-blockchain or DHT somewhere. That is outside the scope of this minimal document, at this time.

Key attributes of this system, like price and transaction size, are hardcoded. It is presumed that version 2+ will improve upon this, once field experience is gained and lessons are learned.