git ssb

1+

kieran / horcrux-schemas-and-thoughts



Commit 8f37914a1229a5f0f8d1b6726dcf8f9a835d2167

Rewrite schemas

Kieran committed on 4/10/2018, 8:09:43 PM
Parent: 601fabee75364c929bc500133c5535fb70a1838e

Files changed

schemas/invite.jsonchanged
schemas/response.jsonchanged
schemas/root.jsonchanged
schemas/secret.jsonchanged
schemas/announcement.jsonadded
schemas/contract.jsonadded
schemas/trustees.jsondeleted
schemas/invite.jsonView
@@ -6,21 +6,25 @@
66 "sequence": "...",
77 "timestamp": "...",
88 "hash": "sha256",
99 "content": {
10- "type": "secret_invite",
10 + "module": "secrets",
11 + "type": "invite",
1112 "root": "%qHZCXd0spsGVlEvMrvkZHVtndgYNOHxZFiVZm1+tplA=.sha256",
12- "text": "[@Kieran](@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519) invites you to secure his secret...",
13- "recipient": {
14- "link": "@NeB4q4Hy9IiMxs5L08oevEhivxW+/aDu/s/0SkNayi0=.ed25519",
15- "name": "Dan Hassan"
16- },
13 + "text": "[@Kieran](@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519) invites you to secure their secret...",
14 + "recps": [
15 + "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519",
16 + {
17 + "link": "@...",
18 + "name": "Alice"
19 + }
20 + ],
1721 "mentions": [
1822 {
1923 "link": "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519",
2024 "name": "Kieran"
2125 }
2226 ]
23- }
24-
27 + },
28 + "private": true
2529 }
2630 }
schemas/response.jsonView
@@ -1,26 +1,35 @@
11 {
22 "key": "%rBpGhzSwvhToQJU7cTJfK+qQlMqT//GmLMaAQi0xGKc=.sha256",
33 "value": {
44 "previous": "...",
5- "author": "@NeB4q4Hy9IiMxs5L08oevEhivxW+/aDu/s/0SkNayi0=.ed25519",
5 + "author": "@...",
66 "sequence": "...",
77 "timestamp": "...",
88 "hash": "sha256",
99 "content": {
10- "type": "secret_response",
10 + "module": "secrets",
11 + "type": "response",
1112 "root": "%qHZCXd0spsGVlEvMrvkZHVtndgYNOHxZFiVZm1+tplA=.sha256",
12- "invite": "%kQL0FcDYPJYVfT6qxV0H7d5ChiCJbdIkdv1yGYKYd8E=.sha256",
1313 "accept": true,
14- "text": "I am the soul harvester ... I will harvest your soul [@Kieran](@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519)",
14 + "text": "[@Alice](@...) accepts [@Kieran](@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519)'s invitation",
15 + "recps": [
16 + "@...",
17 + {
18 + "link": "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519",
19 + "name": "Kieran"
20 + }
21 + ],
1522 "mentions": [
1623 {
24 + "link": "@...",
25 + "name": "Alice"
26 + },
27 + {
1728 "link": "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519",
1829 "name": "Kieran"
1930 }
2031 ]
21- }
32 + },
33 + "private": true
2234 }
2335 }
24-
25-// Should it include the id of the secret splitter?
26-// Rather than having to stream through to search for the invite based on the inviteId?
schemas/root.jsonView
@@ -6,19 +6,13 @@
66 "sequence": "...",
77 "timestamp": "...",
88 "hash": "sha256",
99 "content": {
10- "type": "secret_root"
11- }
10 + "module": "secrets",
11 + "type": "root",
12 + "recps": [
13 + "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519"
14 + ]
15 + },
16 + "private": true
1217 }
1318 }
14-
15-// Root needs contain little to no information about events after it exists
16-
17-// Exists purely as a means to allow for a many to many relationship
18-// for an "author" to it's secrets.
19-
20-// If we were to have an secret sharding stream of events tied to their id / key, it
21-// would permit only one per person
22-
23-// Invites, Responses, Trustees and Secrets can all
24-// be queried and found using this root
schemas/secret.jsonView
@@ -6,32 +6,26 @@
66 "sequence": "...",
77 "timestamp": "...",
88 "hash": "sha256",
99 "content": {
10 + "module": "secrets",
1011 "type": "secret",
1112 "root": "%qHZCXd0spsGVlEvMrvkZHVtndgYNOHxZFiVZm1+tplA=.sha256",
1213 "response": "%rBpGhzSwvhToQJU7cTJfK+qQlMqT//GmLMaAQi0xGKc=.sha256",
1314 "secret": "80171f51d1f9cf6f6a8f3b08dee2ca5575cec57f32d02ed9f4435e940f1888637e1005e43232048fee13dd8804628",
14- "trustee": {
15- "link": "@NeB4q4Hy9IiMxs5L08oevEhivxW+/aDu/s/0SkNayi0=.ed25519",
16- "name": "Dan Hassan"
17- }
18- }
15 + "recps": [
16 + {
17 + "link": "@NeB4q4Hy9IiMxs5L08oevEhivxW+/aDu/s/0SkNayi0=.ed25519",
18 + "name": "Dan Hassan"
19 + }
20 + ]
21 + },
22 + "private": true
1923 }
2024 }
2125
22-// Perhaps "response" is unnecessary?
23-
2426 // A secret is in effect a private message between:
2527 // - the author (the holder of the secret)
2628 // - the trustee (the holder of the secret shard)
2729
28-// From the perspective of the person who has sharded their key,
29-// They're the sender of the secret, they can see this message...
30-// Makes sense.. can't be gotten around.. should it be anyway?
31-// Not sure if this is a problem... An issue for a compromised computer...?
32-
33-// Private messages can be decrypted and therefore the secret can be revealed
34-// at any point because the sharer still has the shards...
35-
36-// Sign with the public key of the trustee, they become the only one to can view it
30 +// Sign with the public key of the recp, they become the only one to can view it
3731 // Secret shard is no longer compromised to the author of the secret sharing process...
schemas/announcement.jsonView
@@ -1,0 +1,20 @@
1 +{
2 + "key": "...",
3 + "value": {
4 + "previous": "...",
5 + "author": "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519",
6 + "sequence": "...",
7 + "timestamp": "...",
8 + "hash": "sha256",
9 + "content": {
10 + "module": "secrets",
11 + "type": "announcement"
12 + }
13 + }
14 +}
15 +
16 +// Announcement contains information useful to an audit process
17 +// For other groups / people in the wider network to be able to ascertain
18 +// their 'security level'.
19 +// Acts as a complimentary layer to enable greater trust between individuals / groups
20 +// as another person's security now affects your security
schemas/contract.jsonView
@@ -1,0 +1,35 @@
1 +{
2 + "key": "...",
3 + "value": {
4 + "previous": "...",
5 + "author": "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519",
6 + "sequence": "...",
7 + "timestamp": "...",
8 + "hash": "sha256",
9 + "content": {
10 + "module": "secrets",
11 + "type": "contract",
12 + "root": "%qHZCXd0spsGVlEvMrvkZHVtndgYNOHxZFiVZm1+tplA=.sha256",
13 + "quorum": "2",
14 + "recps": [
15 + {
16 + "link": "@..,",
17 + "name": "Alice"
18 + },
19 + {
20 + "link": "@...",
21 + "name": "Bob"
22 + },
23 + {
24 + "link": "@...",
25 + "name": "Cathy"
26 + }
27 + ]
28 + },
29 + "private": true
30 + }
31 +}
32 +
33 +// recps is optional.
34 +// A contract is written at the same time as the secrets are produced from accepted responses.
35 +// recps makes visible all partners in the contract
schemas/trustees.jsonView
@@ -1,39 +1,0 @@
1-{
2- "key": "...",
3- "value": {
4- "previous": "...",
5- "author": "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519",
6- "sequence": "...",
7- "timestamp": "...",
8- "hash": "sha256",
9- "content": {
10- "type": "secret_trustees",
11- "root": "%qHZCXd0spsGVlEvMrvkZHVtndgYNOHxZFiVZm1+tplA=.sha256",
12- "shared": true,
13- "quorum": "2",
14- "trustees": [
15- {
16- "link": "@NeB4q4Hy9IiMxs5L08oevEhivxW+/aDu/s/0SkNayi0=.ed25519",
17- "name": "Dan Hassan"
18- },
19- {
20- "link": "@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519",
21- "name": "mix"
22- },
23- {
24- "link": "@DQ1HPdrTi6iUUlU22CRqZlEnbxWm6XjjdFQs+4fy+HY=.ed25519",
25- "name": "Nikolai"
26- }
27- ]
28- }
29-
30- }
31-}
32-
33-// The original idea for this being here was to ensure a cutoff point from which to distinguish
34-// the real participants who received a secret and those who replied late.
35-// Also acts as a contract of sorts - contains the details for the @author who was included in the
36-// final secret sharing and how to reassemble
37-
38-// { shared: true } indicates whether other participants and quorum is visible to trustees.
39-// If it is, this information gets copied over into the secret

Built with git-ssb-web