From 75460255a8b65cda409797e18961ca63bb80522a Mon Sep 17 00:00:00 2001 From: zver Date: Tue, 2 Jul 2024 09:00:55 +0100 Subject: [PATCH] moving keys --- technical.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/technical.md b/technical.md index 4915ec9..353a1b2 100644 --- a/technical.md +++ b/technical.md @@ -32,7 +32,6 @@ The Creator prepares an Agreement by creating and signing (but NOT publishing) a * `viewers` (array) - list of npubs which can view the Agreement * `filehashes` (array) - series of objects containing the file name and file hash * `zipUrl` (string) - the location of the encrypted zip file (blossom server) -* `keys` (object) - for each counterparty, a NIP-44 encrypted string containing the decryption key for the zip file * `markConfig` (object) - the template by which counterparties will make [Annotations](/#annotations) in any PDFs This object is formed as follows: @@ -46,16 +45,16 @@ This object is formed as follows: "hash":"8c4f41e76be536a4d6cc180cf1a6014fa0bacbb6cc5e7a1e12dde41f8f5158a8" }], "title": "our amazing agreement", - "zipUrl":"https://blossom.one/asdfafafaer23wsdf343fff4343fs", - "keys": ["npub1nqulz...":"ENCRYPTD","npub1d0csynr...":"ENCRYPTD","npub1viewr..":"ENCRYPTD"] + "zipUrl":"https://blossom.one/asdfafafaer23wsdf343fff4343fs" } ``` -Once the creator has signed, the `meta.json` file will appear as follows: +Once the creator has signed, the `meta.json` file will contain the `createObject` (above) and a `keys` object that contains the decryption key for the zip file, NIP-44 encrypted to each counterparty. ```json { "createSignature": "{\n \"kind\": 938,\n \"content\": \"{\\\"signers\\\":[\\\"npub1d0csynr..\\\",\\\"npub1nqulz..\\\"],\\\"viewers\\\":[\\\"npub1viewr..\\\"]...}\",\n \"created_at\": 1716564780,\n \"tags\": [],\n \"pubkey\": \"6bf1024...\",\n \"id\": \"...\",\n \"sig\": \"...\"\n}", + "keys": {"npub1nqulz...":"ENCRYPTD","npub1d0csynr...":"ENCRYPTD","npub1viewr..":"ENCRYPTD"}, "docSignatures": { } } @@ -81,6 +80,7 @@ After signing, the `meta.json` can now be updated, eg as follows: ```json { "createSignature": "{\n \"kind\": 938,\n \"content\": \"{\\\"signers\\\":[\\\"npub1d0csynr..\\\",\\\"npub1nqulz..\\\"],\\\"viewers\\\":[\\\"npub1viewr..\\\"]...}\",\n \"created_at\": 1716564780,\n \"tags\": [],\n \"pubkey\": \"6bf1024...\",\n \"id\": \"...\",\n \"sig\": \"...\"\n}", + "keys": {"npub1nqulz...":"ENCRYPTD","npub1d0csynr...":"ENCRYPTD","npub1viewr..":"ENCRYPTD"}, "docSignatures": { "npub1d0csynrrxcynkcedktdzrdj6gnras2psg48mf46kxjazs8skrjgq9uzhlq": "{\n \"kind\": 938,\n \"content\": \"{\\\"prevSig\\\":\\\"a76fdd0..", "npub1nqulzcxcj0d2uesusstgupl5du8pa96xl6uy8xndweeckjkn964qjs23sn": "{\n \"kind\": 938,\n \"content\": \"{\\\"prevSig\\\":\\\"585c134.."