Commit 8f37914a1229a5f0f8d1b6726dcf8f9a835d2167
Rewrite schemas
Kieran committed on 4/10/2018, 8:09:43 PMParent: 601fabee75364c929bc500133c5535fb70a1838e
Files changed
schemas/invite.json | changed |
schemas/response.json | changed |
schemas/root.json | changed |
schemas/secret.json | changed |
schemas/announcement.json | added |
schemas/contract.json | added |
schemas/trustees.json | deleted |
schemas/invite.json | ||
---|---|---|
@@ -6,21 +6,25 @@ | ||
6 | 6 … | "sequence": "...", |
7 | 7 … | "timestamp": "...", |
8 | 8 … | "hash": "sha256", |
9 | 9 … | "content": { |
10 | - "type": "secret_invite", | |
10 … | + "module": "secrets", | |
11 … | + "type": "invite", | |
11 | 12 … | "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 … | + ], | |
17 | 21 … | "mentions": [ |
18 | 22 … | { |
19 | 23 … | "link": "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519", |
20 | 24 … | "name": "Kieran" |
21 | 25 … | } |
22 | 26 … | ] |
23 | - } | |
24 | - | |
27 … | + }, | |
28 … | + "private": true | |
25 | 29 … | } |
26 | 30 … | } |
schemas/response.json | ||
---|---|---|
@@ -1,26 +1,35 @@ | ||
1 | 1 … | { |
2 | 2 … | "key": "%rBpGhzSwvhToQJU7cTJfK+qQlMqT//GmLMaAQi0xGKc=.sha256", |
3 | 3 … | "value": { |
4 | 4 … | "previous": "...", |
5 | - "author": "@NeB4q4Hy9IiMxs5L08oevEhivxW+/aDu/s/0SkNayi0=.ed25519", | |
5 … | + "author": "@...", | |
6 | 6 … | "sequence": "...", |
7 | 7 … | "timestamp": "...", |
8 | 8 … | "hash": "sha256", |
9 | 9 … | "content": { |
10 | - "type": "secret_response", | |
10 … | + "module": "secrets", | |
11 … | + "type": "response", | |
11 | 12 … | "root": "%qHZCXd0spsGVlEvMrvkZHVtndgYNOHxZFiVZm1+tplA=.sha256", |
12 | - "invite": "%kQL0FcDYPJYVfT6qxV0H7d5ChiCJbdIkdv1yGYKYd8E=.sha256", | |
13 | 13 … | "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 … | + ], | |
15 | 22 … | "mentions": [ |
16 | 23 … | { |
24 … | + "link": "@...", | |
25 … | + "name": "Alice" | |
26 … | + }, | |
27 … | + { | |
17 | 28 … | "link": "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519", |
18 | 29 … | "name": "Kieran" |
19 | 30 … | } |
20 | 31 … | ] |
21 | - } | |
32 … | + }, | |
33 … | + "private": true | |
22 | 34 … | } |
23 | 35 … | } |
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.json | ||
---|---|---|
@@ -6,19 +6,13 @@ | ||
6 | 6 … | "sequence": "...", |
7 | 7 … | "timestamp": "...", |
8 | 8 … | "hash": "sha256", |
9 | 9 … | "content": { |
10 | - "type": "secret_root" | |
11 | - } | |
10 … | + "module": "secrets", | |
11 … | + "type": "root", | |
12 … | + "recps": [ | |
13 … | + "@MpDd66GPXgN1+eMNrZInHkWq1THMurWwLdMx8BZ1ncw=.ed25519" | |
14 … | + ] | |
15 … | + }, | |
16 … | + "private": true | |
12 | 17 … | } |
13 | 18 … | } |
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.json | ||
---|---|---|
@@ -6,32 +6,26 @@ | ||
6 | 6 … | "sequence": "...", |
7 | 7 … | "timestamp": "...", |
8 | 8 … | "hash": "sha256", |
9 | 9 … | "content": { |
10 … | + "module": "secrets", | |
10 | 11 … | "type": "secret", |
11 | 12 … | "root": "%qHZCXd0spsGVlEvMrvkZHVtndgYNOHxZFiVZm1+tplA=.sha256", |
12 | 13 … | "response": "%rBpGhzSwvhToQJU7cTJfK+qQlMqT//GmLMaAQi0xGKc=.sha256", |
13 | 14 … | "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 | |
19 | 23 … | } |
20 | 24 … | } |
21 | 25 … | |
22 | -// Perhaps "response" is unnecessary? | |
23 | - | |
24 | 26 … | // A secret is in effect a private message between: |
25 | 27 … | // - the author (the holder of the secret) |
26 | 28 … | // - the trustee (the holder of the secret shard) |
27 | 29 … | |
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 | |
37 | 31 … | // Secret shard is no longer compromised to the author of the secret sharing process... |
schemas/announcement.json | ||
---|---|---|
@@ -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.json | ||
---|---|---|
@@ -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.json | ||
---|---|---|
@@ -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