UNiD Network Overview


UNiD Network is built on the top of Sidetree that is a 2nd layer blockchain-agnostic protocol and has multiple reference implementations for various decentralized ledger systems, such as Bitcoin, Ethereum, etc.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/299bc43d-adf2-4258-942c-97074f304e73/Screen_Shot_2020-12-23_at_4.03.30.png

Generate New DID


UNiD Core generates the mnemonic seed phrase and converting it into a binary seed with BIP39. From the seed, it generates 3 pairs of keys: update key, recovery key, and singing key using SECP256K1 with ECDSA algorithm. The signing key is the key that is used for DID user to generate signature. Other keys are used for managing this DID on UNiD network.

UNiD computes hash from the public keys and objects. The hash with Multihash format and SHA2-256 (which code is 18 or 0x12) is used for generating hashes of protocol-related values. And then, it generates the base64-encoded entity including these hash values and document are submitted to a UNiD node by HTTP POST method.

  1. generate Create Operation Delta Object that contains a updateCommitment and action patch with signing public key
{
	"updateCommitment": "EiBDyhxhHeTMH...",
	patches: [
		{
			"action": "replace",
			"document": {
				"publicKeys": [
					{
						"id": "signingKey",
						"type": "EcdsaSecp256k1VerificationKey2019",
						"publicKeyJwk": {
							"kty": "EC",
						  "crv": "secp256k1",
						  "x": "4mGSwbx5nPRkRTj87HAoD1Sa3AYLK1Btt5ogGIU5RS0",
						  "y": "wSg3AhkpcrmLwB79NsFWc4BB_M4ztCgkdh4HdEvfTIE"
						},
						"purpose": [
							"auth",
							"general"
						],
					}
				],
				"service": [
					{
						"id": "sds",
						"type": "secure data storage",
						"endpoint": "<https://sds.getunid.io/>"
					}
				]
			}
		}
	]
}
  1. generate Create Operation Suffix Data Object that contains deltaHash (is a hash of canonicalized Create Operation Delta Object) and recoverCommitment
{
	deltaHash: "eyJwYXRjaGV...",
	recoverCommitment: "EiBDyhxhHeTMH8y_Ox_JOq-mliEAO0LqEUfXChyH5ghWEQ"
}
  1. generate Create Operation Payload that contains suffixData (is a hash of canonicalized and base64 encoded Create Operation Suffix Data Object) and delta (is a hash of canonicalized and base64 encoded Create Operation Delta Object)
{
  "type": "create",
  "suffixData": "eyJkZWx0YV9oYXNoIjoiRWlCRjRJMHRqU2tQa2o3cVhTN09mbFdfYmpQY3V3TDBWRTU4Y2gtLUFWU0pjQSIsInJlY292ZXJ5X2NvbW1pdG1lbnQiOiJFaUJEeWh4aEhlVE1IOHlfT3hfSk9xLW1saUVBTzBMcUVVZlhDaHlINWdoV0VRIn0",
  "delta": "eyJwYXRjaGVzIjpbeyJhY3Rpb24iOiJyZXBsYWNlIiwiZG9jdW1lbnQiOnsicHVibGljX2tleXMiOlt7ImlkIjoic2lnbmluZ0tleSIsInR5cGUiOiJFY2RzYVNlY3AyNTZrMVZlcmlmaWNhdGlvbktleTIwMTkiLCJqd2siOnsia3R5IjoiRUMiLCJjcnYiOiJzZWNwMjU2azEiLCJ4IjoiNG1HU3dieDVuUFJrUlRqODdIQW9EMVNhM0FZTEsxQnR0NW9nR0lVNVJTMCIsInkiOiJ3U2czQWhrcGNybUx3Qjc5TnNGV2M0QkJfTTR6dENna2RoNEhkRXZmVElFIn0sInB1cnBvc2VzIjpbImF1dGgiLCJnZW5lcmFsIl19XSwic2VydmljZV9lbmRwb2ludHMiOltdfX1dLCJ1cGRhdGVfY29tbWl0bWVudCI6IkVpQkZKU2hKMFBYQlhmNzNHMFEzbC0xVGZZcHBPZzJ3NmdGak9YTnk1Y0o4RncifQ"
}

Response of Create Operation (after posting the payload)