-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
## Keystone Zcash UR Registries | ||
|
||
This protocol is based on the [Uniform Resources](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-005-ur.md). It describes the data schemas (UR Registries) used in Zcash integrations. | ||
|
||
### Introduction | ||
|
||
Keystone's QR workflow involves two main steps: linking the wallet and signing data, broken down into three sub-steps: | ||
|
||
1. **Wallet Linking:** Keystone generates a QR code with public key info for the Watch-Only wallet to scan and import. | ||
2. **Transaction Creation:** The Watch-Only wallet creates a transaction and generates a QR code for Keystone to scan, parse, and display. | ||
3. **Signing Authorization:** Keystone signs the transaction, displays the result as a QR code for the Watch-Only wallet to scan and broadcast. | ||
|
||
Two UR Registries are needed for these steps, utilizing the Partially Created Zcash Transaction structure. | ||
|
||
### Zcash Accounts | ||
|
||
#### Unified Full Viewing Key (UFVK) | ||
|
||
UFVK is a standard account expression format in Zcash as per [ZIP-316](https://zips.z.cash/zip-0316). It consists of: | ||
|
||
1. Transparent | ||
2. Sprout | ||
3. Sapling | ||
4. Orchard | ||
|
||
This protocol focuses on the Transparent and Orchard components. | ||
|
||
#### CDDL for Zcash Accounts | ||
|
||
The specification uses CDDL and includes `crypto-hdkey` and `crypto-key-path` specs. | ||
|
||
```cddl | ||
zcash-accounts = { | ||
master-fingerprint: uint32, ; the master fingerprint to identify the wallet | ||
This comment has been minimized.
Sorry, something went wrong. |
||
accounts: [+ zcash-ufvk], | ||
? origin: text, ; source of data, e.g., Keystone | ||
} | ||
zcash-ufvk = { | ||
? transparent: crypto-hdkey, | ||
orchard: zcash-fvk, | ||
? name: text, | ||
} | ||
zcash-fvk = { | ||
origin: crypto-key-path, | ||
key-data: bytes, | ||
} | ||
``` | ||
|
||
`zcash-ufvk` describes the UFVK of a Zcash account. Each seed has multiple accounts with different indexes. For index 0, `zcash-ufvk` should contain a BIP32 extended public key with path `M/44'/133'/0'` (transparent) and an Orchard FVK with path `M_orchard/32'/133'/0'` (Orchard). | ||
This comment has been minimized.
Sorry, something went wrong.
daira
|
||
|
||
#### CDDL for Zcash PCZT | ||
|
||
```cddl | ||
zcash-pczt { | ||
data: bytes, ; Zcash PCZT, signatures inserted after signing. | ||
} | ||
``` |
ZIP 32 specifies a 16-byte seed fingerprint: https://zips.z.cash/zip-0032#seed-fingerprints
It's a byte array so endian-independent.