You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _pages/seeds-with-envelope.md
+33-14Lines changed: 33 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,19 @@ redirect_from:
18
18
19
19
## Overview
20
20
21
-
Cryptographic seeds are the heart of crypto asset control. [#SmartCustody](https://www.smartcustody.com/), one of Blockchain Commons' earliest initiatives, is all about keeping them safe. That's continued forward with resilience being a core [Gordian principles](https://developer.blockchaincommons.com/principles/). We're aware that loss of a seed or private key can be one of the most likely ways to lose a digital asset; Blockchain Commons is working to help developers and users to avoid that.
21
+
Cryptographic seeds are the heart of crypto asset control. [#SmartCustody](https://www.smartcustody.com/), one of Blockchain Commons' earliest initiatives, was all about keeping them safe. That's continued forward, with resilience being a core [Gordian principles](https://developer.blockchaincommons.com/principles/). We believe that loss of a seed or private key is one of the most likely ways for the average user to lose a digital asset; Blockchain Commons is working to help developers and users to avoid that.
22
22
23
23
One of the major ways to keep a seed safe is encode it in a Gordian Envelope. Not only is it a well-known, well-specified format that should be readable into the far future, but it also allows for encryption, sharding, multiple permits, and in the future storage with [GSTP](/envelope/gstp/) and CSR [/csr/].
24
24
25
-
The following examples demonstrate how many of these techniques work using the [Rust envelope-cli](https://github.com/BlockchainCommons/bc-envelope-cli-rust). The [bytewords-cli](https://github.com/BlockchainCommons/bytewords-cli) and [cbor2diag](https://github.com/cabo/cbor-diag) are also used for a few minor examples, but not necessary to fully understand this tutorial. You don't necessarily want to engage in this digital-asset work with [envelope-cli], as a command line is not secure enough for most digital assets; but, as a reference app, [envelope-cli] shows what Envelopes can do for seeds, and how they work, and can also be used to generate sample envelopes for testing elsewhere.
25
+
The following examples demonstrate how many of these techniques work using the [Rust envelope-cli](https://github.com/BlockchainCommons/bc-envelope-cli-rust). The [bytewords-cli](https://github.com/BlockchainCommons/bytewords-cli) and [cbor2diag](https://github.com/cabo/cbor-diag) are also used for a few minor examples, but they're not necessary to fully understand this tutorial (so if you don't have them, no problem).
26
+
27
+
⚠️ **Warning:** ⚠️ Do not work with real assets using envelope-cli. Because it's a command line, it's probably not secure enough for most digital assets; but, as a reference app, envelope-cli shows what envelopes can do for seeds and how they work. It can also be used to generate sample envelopes for testing elsewhere.
26
28
27
29
## Generating Seeds
28
30
29
-
Seeds and their associated private keys and public keys can all be generated using `seedtool-cli`, but this capability should be used solely for testing purposes. You'll ideally want a hardened offline wallet for generating your real seeds.
31
+
Seeds and their associated private keys and public keys can all be generated using `seedtool-cli`, but this capability should be used solely for testing purposes.
32
+
33
+
(You'll ideally want a hardened offline wallet for generating your real seeds.)
Seeds are generated as `ur:seed`s, in accordance with the [crypto-seed CDDL](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-006-urtypes.md#cryptographic-seed-seed).
Seeds are generated as `ur:seed`s, in accordance with the [crypto-seed CDDL](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-006-urtypes.md#cryptographic-seed-seed). If you want to examine a seed more closely, you can do so by stripping off the `ur:seed` prefix. What's left is the CBOR of the seed, prepared per the CDDL.
The cbor2diag utility will do that breakdown for you, which is why it's a convenient tool:
64
+
```
65
+
cbor2diag -x $SEED_CBOR
66
+
{1: h'd6df890a726b21b223ec3cc31d7950eb'}
67
+
```
68
+
Per the CDDL, there could have been an optional creation date, name, or note, as map entries 2, 3, or 4, respectively, but there aren't in this simple example.
The envelope-cli allows a seed to easily be placed in an envelope: you just define the seed you've generated as the subject of an envelope, using type `ur`:
0 commit comments