@@ -7,160 +7,49 @@ template = "doc.html"
8
8
10−A public key infrastructure (PKI) is a system for binding a set of keys to a
10+A public key infrastructure (PKI) is a system for binding a set of keys to a name. Sometimes a small amount of metadata is included.
11−name. Sometimes a small amount of metadata is included.
11+
12−
12+Existing PKIs include PGP-style ["web of trust"](https://en.wikipedia.org/wiki/Web_of_trust), [SSL certificates](https://en.wikipedia.org/wiki/Certificate_authority), [ZeroTier](https://www.zerotier.com/lf-announcement/), [Keybase](https://keybase.io/), [OpenID](https://openid.net/what-is-openid/), [Mozilla Persona](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Persona), and [Login with Google](https://developers.google.com/identity). These take unique approaches to the problem and have achieved some degree of success, but none provide globally consistent, permanent, and completely self-owned identities. Exhaustive exploration and categorization is unfortunately out of scope for this post, so we'll just describe Urbit's approach to achieving these properties in our PKI.
13−Existing PKIs include PGP-style ["web of
13+
14−trust"](https://en.wikipedia.org/wiki/Web_of_trust), [SSL
14+In Urbit, a "name" is often called a "ship" or an "address" because we use the metadata in the PKI to make names routable. The total data is two 256-bit asymmetric keys, a cryptographic suite number (to allow changing crypto algorithms), the revision number of the key, and the name of a ship that will route for it. This sums to less than 128 bytes of data.
15−certificates](https://en.wikipedia.org/wiki/Certificate_authority),
15+
16−[ZeroTier](https://www.zerotier.com/lf-announcement/),
17−[Keybase](https://keybase.io/), [OpenID](https://openid.net/what-is-openid/),
19−Persona](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Persona), and
20−[Login with Google](https://developers.google.com/identity). These take unique
21−approaches to the problem and have achieved some degree of success, but none
22−provide globally consistent, permanent, and completely self-owned identities.
23−Exhaustive exploration and categorization is unfortunately out of scope for this
24−post, so we'll just describe Urbit's approach to achieving these properties in
27−In Urbit, a "name" is often called a "[ship](/docs/glossary/ship)" or an "address" because we use the
28−metadata in the PKI to make names routable. The total data is two 256-bit
29−asymmetric keys, a cryptographic suite number (to allow changing crypto
30−algorithms), the revision number of the key, and the name of a ship that will
31−route for it. This sums to less than 128 bytes of data.
33−Each PKI trades off various properties. We chose a tripartite system so that
16+Each PKI trades off various properties. We chose a tripartite system so that appropriate choices can be made for different use cases. Here, we explore the various properties we chose by following a series of binary choices -- the idea maze.
34−appropriate choices can be made for different use cases. Here, we explore the
17+
35−various properties we chose by following a series of binary choices -- the idea
38−There are two sorts of PKI: either you can change your keys or not. If you
39−cannot, then your name is impermanent, for no one can keep a set of keys secure
40−forever. Even if your opsec never fails, eventually your crypto algorithms may
18+There are two sorts of PKI: either you can change your keys or not. If you cannot, then your name is impermanent, for no one can keep a set of keys secure forever. Even if your opsec never fails, eventually your crypto algorithms may be compromised.
42−
20+However, if you sacrifice the ability to change your keys, you can have a very nice property: self-attesting keys. If your name is a hash of your public key information, then no other source of information is required to verify you are who you say you are. This is a useful property since it requires no coordination at all. Many things are impermanent, especially during development. It also provides a way to try out the network without obtaining a permanent address.
43−However, if you sacrifice the ability to change your keys, you can have a very
21+
44−nice property: self-attesting keys. If your name is a hash of your public key
45−information, then no other source of information is required to verify you are
46−who you say you are. This is a useful property since it requires no coordination
47−at all. Many things are impermanent, especially during development. It also
48−provides a way to try out the network without obtaining a permanent address.
50−This is our first stop in the idea maze. We call this sort of name a "[comet](/docs/glossary/comet)". A
22+This is our first stop in the idea maze. We call this sort of name a "comet". A comet's name is the 128-bit hash of its public keys.
51−comet's name is a 128-bit human-readable hash of its public keys.
23+
53−However, Urbit is yours and it's forever. You shouldn't have to change your name
24+However, Urbit is yours and it's forever. You shouldn't have to change your name every time you change your keys. So, we go back and take the other choice: you must be able to change your keys.
54−every time you change your keys. So, we go back and take the other choice as well: you
25+
55−must be able to change your keys.
26+To change keys, you must sign a message with the old keys revoking them and supplying the new ones[^0]. The question is what happens if the old keys also sign a second set of new keys. This could happen if an attacker obtained your old keys after the fact. This is important because one of the reasons to be able to change your keys is to invalidate the old ones so that they have no power.
58−To change keys, you must sign a message with the old keys revoking them and
59−supplying the new ones<sup><a href="#f0">[0]</a></sup>. The question
60−is what happens if the old keys also sign a second set of new keys. This could
61−happen if an attacker obtained your old keys after the fact. This is important
62−because one of the reasons to be able to change your keys is to invalidate the
63−old ones so that they have no power.
65−We have two options again: the PKI may be globally consistent or not. To be
66−globally consistent means that if you believe a name is bound to a set of keys,
28+We have two options again: the PKI may be globally consistent or not. To be globally consistent means that if you believe a name is bound to a set of keys, then nobody on the network will disagree.
67−then nobody on the network will disagree.
29+
68−
30+If you don't require global consistency, you may sign this message and send it to all your neighbors, and they pass it on, and hopefully it gets to most of the network quickly. However, if one of those ships receives two contradictory versions of this message, the only thing it can do is trust the first one it heard, which may be different than what someone else heard. Thus, this is pairwise consistent but globally inconsistent. This is essentially how the pre-blockchain Ames network worked, though key changes were not actually implemented. Because global consistency is a valuable property, we looked at other options.
69−If you don't require global consistency, you may sign this message and send it
31+
70−to all your neighbors, and they pass it on, and hopefully it gets to most of the
32+For a globally consistent PKI that allows you to revoke keys, you need to be able to distinguish between two cryptographically valid messages to determine which was signed first. The dual problem could be solved easily — you can prove a message is signed after another by including the signature of the first in the second. This is equivalent to reading out a newspaper headline to prove a message was recorded after a given day.
71−network quickly. However, if one of those ships receives two contradictory
33+
72−versions of this message, the only thing it can do is trust the first one it
34+However, the problem of proving one message was sent before any later ones inverts the problem. You can solve this with newspapers by placing the message in the text of the newspaper. However, while reading a newspaper requires no central party, writing one does. For a long time, this sort of message was always handled by a central party. SSL revocations are managed by a few central parties. When you buy property, it's not sufficient to have the previous owner sign the title — this must be entered into a central land registry. Otherwise, the owner may sell their property to multiple people and there would be no way to determine who is the new owner. With the land registry, all you need to do is ask the registry which sale happened first, and that's the one that counts.
73−heard, which may be different than what someone else heard. Thus, this is
35+
74−pairwise consistent but globally inconsistent. This is essentially how the
36+However, Urbit is yours and it's forever. Trusting central registries jeopardizes both. The keen reader will notice that the problem of determining which key rotation happened first is exactly the double-spend problem that Satoshi solved with his proof of work algorithm for Bitcoin. His first block famously includes a newspaper headline to prove he didn't mine the block before that date. In a beautiful duality, his own algorithm proves that he didn't mine it after that date.[^1]
75−pre-blockchain [Ames](/docs/glossary/ames) network worked, though key changes were not actually
37+
76−implemented. Because global consistency is a valuable property, we looked at
38+Some argue that blockchain is only good for money. This is myopic and is generally based on the experience that its most valuable application so far has been money. However, blockchain is a cryptographic primitive to do what was previously impossible: prove that one message was signed before another without a central party. Blockchain was discovered by someone trying to create digital money, and he needed that primitive, but that doesn't mean that's all it's good for.
78−
40+Thus, we store our PKI data on a blockchain for our second kind of name: planets. A planet is a 32-bit address which has key information stored on the blockchain.[^2] The owner of a planet may broadcast new PKI data by adding it to the blockchain. Any later messages by the old keys will be rejected, and everyone on the network will listen to the blockchain for key data. Thus, we have global consistency, permanence, and self sovereignty. We know of no other solution that can provide these properties.
79−For a globally consistent PKI that allows you to revoke keys, you need to be
41+
80−able to distinguish between two cryptographically valid messages to determine
42+However, while small individually, the aggregate PKI data for all nodes on the network may become very large. This is not an issue for comets because nobody needs to store comet keys except for those which they're talking with, and even those can be garbage-collected and re-requested and verified. For planets, there is a canonical set of keys, and somebody must store that. There are about 2<sup>32</sup>, or 4 billion planets. If the PKI data is about 100 bytes for each planet, this is about 400 GB of data. This may be more than most users wish to store, but it's small enough that it would be very cheap for someone to host this data for many users[^3].
81−which was signed first. The dual problem could be solved easily — you can prove
43+
82−a message is signed after another by including the signature of the first in the
44+This information is currently stored directly on the Ethereum 1.0 blockchain, but as is well understood in blockchain circles this approach will not scale beyond a certain point. Many chains are pursing designs that allow the users of the smart contracts to store locally the data associated with the contracts they care about and only commit hashes to the chain. We expect there to be several viable options for this by the time our scaling needs exceed what's provided by Ethereum 1.0. This will free us from the cost of hosting the PKI data on all Ethereum nodes, but the data must still be stored somewhere. Any service that could handle such a large amount of data would inherently centralize the network.
83−second. This is equivalent to reading out a newspaper headline to prove a
45+
84−message was recorded after a given day.
46+However, 4 billion is not enough addresses for every device on the planet today, much less in a few decades. So, we apply our maxim of re-examining our choices at each level for each use case. Examining the idea maze above, we cannot use the blockchain option for everything since the data is too big. However, it's not actually necessary for each of your devices to have its own self-sovereign identity separate from your planet. So we choose the option of using a central registry: your own planet.
86−The problem of proving that one message was sent before any later ones
87−inverts the problem. You can solve this with newspapers by placing the message
88−in the text of the newspaper. While reading a newspaper requires no
89−central party, writing one does. For a long time, this sort of message was
90−always handled by a central party. SSL revocations are managed by a few central
91−parties. When you buy property, it's not sufficient to have the previous owner
92−sign the title — this must be entered into a central land registry. Otherwise,
93−the owner may sell their property to multiple people and there would be no way
94−to determine who is the new owner. With the land registry, all you need to do is
95−ask the registry which sale happened first, and that's the one that counts.
98−Again, Urbit is yours and it's forever. Trusting central registries
99−jeopardizes both. The keen reader will notice that the problem of determining
100−which key rotation happened first is exactly the double-spend problem that
101−Satoshi solved with his proof of work algorithm for Bitcoin. His first block
102−famously includes a newspaper headline to prove he didn't mine the block before
103−that date. In a beautiful duality, his own algorithm proves that he didn't mine
104−it after that date.<sup><a href="#f1">[1]</a></sup>
106−Some argue that blockchain is only good for money. This is myopic and is
107−generally based on the experience that its most valuable application so far has
108−been money. The deeper problem that the blockchain cryptographic primitive
109−allows one to solve a previously impossible task: prove that one message was
110−signed before another without a central party. Blockchain was discovered by
111−someone trying to create digital money, and he needed that primitive, but that
112−doesn't mean that's all it's good for.
115−Thus, we store our PKI data on a blockchain for our second kind of name:
116−[planets](/docs/glossary/planet). A planet is a 32-bit address which has key
117−information stored on the blockchain.<sup><a href="#f2">[2]</a></sup>
118−The owner of a planet may broadcast new PKI data by adding it to the
119−blockchain. Any later messages by the old keys will be rejected, and everyone
120−on the network will listen to the blockchain for key data. Thus, we have global
121−consistency, permanence, and self sovereignty. We know of no other solution
122−that can provide these properties.
125−While small individually, the aggregate PKI data for all nodes on the
126−network may become very large. This is not an issue for comets because nobody
127−needs to store comet keys except for those which they're talking with, and even
128−those can be garbage-collected and re-requested and verified. For planets, there
129−is a canonical set of keys, and somebody must store that. There are about
130−2<sup>32</sup>, or 4 billion planets. If the PKI data is about 100 bytes for
131−each planet, this is about 400 GB of data. This may be more than most users wish
132−to store, but it's small enough that it would be very cheap for someone to host
133−this data for many users<sup><a href="#f3">[3]</a></sup>.
135−This information is currently stored directly on the Ethereum 1.0 blockchain,
136−but as is well understood in blockchain circles this approach will not scale
137−beyond a certain point. This moment came to be sometime in 2020. In reaction to
138−this state of affairs, Tlon developed a "layer 2" scaling solution known as
139−[naive rollups](/docs/glossary/rollups). This allows users to submit compressed
140−PKI transactions to Ethereum as batches and compute the resulting change in PKI
141−state locally, dramatically reducing gas costs to the point that Tlon offers a
142−free-to-use public "roller" which aggregates transactions and submits them as a
145−Of course, 4 billion is not enough addresses for every device on the planet today,
146−much less in a few decades. So, we apply our maxim of re-examining our choices
147−at each level for each use case. Examining the idea maze above, we cannot use
148−the blockchain option for everything since the data is too big. However, it's
149−not actually necessary for each of your devices to have its own self-sovereign
150−identity separate from your planet. So we choose the option of using a central
151−registry: your own planet.
153−We allocate 4 billion "moons" to each of those planets. A moon is a 64-bit
154−address whose 32-bit suffix is its planet. Your planet can easily store the keys
48+We allocate 4 billion "moons" to each of those planets. A moon is a 64-bit address whose 32-bit suffix is its planet. Your planet can easily store the keys for its own moons, and anyone who needs to talk to your moons can ask you for the keys.
155−for its own moons, and anyone who needs to talk to your moons can ask you for
49+
158−This is the sense in which moons are true ships: they're permanent names and you
50+This is the sense in which moons are true ships: they're permanent names and you own them completely, as long as you own the planet. However, they're not independent ships — their keys can always be revoked by their planet.
159−own them completely, as long as you own the planet. But they're not
51+
160−independent ships — their keys can always be revoked by their planet.
162−To create a sane network, we require global consistency for all our names. There
52+To create a sane network, we require global consistency for all our names. There are three other properties; pick any two:
163−are three other properties; pick any two:
165- Comets are impermanent, self sovereign, and plentiful.
54- Comets are impermanent, self sovereign, and plentiful.
@@ -168,36 +57,10 @@ are three other properties; pick any two:
169- Moons are permanent, not self sovereign, and plentiful.
58- Moons are permanent, not self sovereign, and plentiful.
171−<a name="4"></a>
60+Fancifully, comets are wayward celestial bodies that are great for testing and miscellaneous low-value things that won't last for long. Planets are where you can build a home and shape it into anything you want it to be. People can always find your planet; it's not going anywhere. Moons are useful for special purposes, like storage, heavy industry, and anything else you might want to do off-planet.[^4]
172−Fancifully, comets are wayward celestial bodies that are great for testing and
61+
173−miscellaneous low-value things that won't last for long. Planets are where you
174−can build a home and shape it into anything you want it to be. People can always
175−find your planet; it's not going anywhere. Moons are useful for special
176−purposes, like storage, heavy industry, and anything else you might want to do
177−off-planet.<sup><a href="#f4">[4]</a></sup>
180−<a name="f0" href="#0">[0]</a>: Or the equivalent with a hierarchical key
181−structure. In practice, you want to have a master key which signs a junior key
62+[^0]: Or the equivalent with a hierarchical key structure. In practice, you want to have a master key which signs a junior key for everyday use. You use the master key to rotate the junior key.
182−for everyday use. You use the master key to rotate the junior key.
184−<a name="f1" href="#1">[1]</a>: More strictly: it proves that he didn't mine it
185−after the other blocks currently on the Bitcoin blockchain. It only gives an
63+[^1]: More strictly: it proves that he didn't mine it after the other blocks currently on the Bitcoin blockchain. It only gives an ordering within the chain, not a literal timestamp.
186−ordering within the chain, not a literal timestamp.
188−<a name="f2" href="#2">[2]</a>: In addition to planets, there are stars and
189−galaxies. From a PKI perspective they're treated exactly like planets, but on
64+[^2]: In addition to planets, there are stars and galaxies. From a PKI perspective they're treated exactly like planets, but on the network they provide infrastructure services like routing.
190−the network they provide infrastructure services like routing.
192−<a name="f3" href="#3">[3]</a>: In practice, this will likely be an included
193−service by your sponsoring star. It could be a separate service, but it will be
65+[^3]: In practice, this will likely be an included service by your sponsoring star. It could be a separate service, but it will be very cheap because it's a commodity and the "cost of production" is very cheap. At any rate, it should never rise above the capital cost of a 400GB hard drive.
194−very cheap because it's a commodity and the "cost of production" is very cheap.
66+[^4]: To extend the metaphor, stars are a neighborhood to live in -- they're easier for other planets to see, so when they want to send you a message they look for your star first. If they don't even know where your star is, they can certainly find your star's galaxy, and that will be enough to locate the star. Of course, if your star is not providing satisfactory service, you can take your planet and move to another star.
195−At any rate, it should never rise above the capital cost of a 400GB hard drive.
197−<a name="f4" href="#4">[4]</a>: To extend the metaphor, stars are a
198−neighborhood to live in -- they're easier for other planets to see, so when
199−they want to send you a message they look for your star first. If they don't
200−even know where your star is, they can certainly find your star's galaxy, and
201−that will be enough to locate the star. Of course, if your star is not
202−providing satisfactory service, you can take your planet and move to another