From 8b34cd39eb5285f16a80f06f590164c935d04afd Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Fri, 8 Mar 2024 12:06:23 +0100 Subject: [PATCH] prd storage format (doc) --- doc/Data-Specs.md | 101 +++++++++++++++++++++++++---------------- doc/Specs-Datamodel.md | 53 ++++++++++----------- 2 files changed, 88 insertions(+), 66 deletions(-) diff --git a/doc/Data-Specs.md b/doc/Data-Specs.md index 45f6f1a..896838f 100644 --- a/doc/Data-Specs.md +++ b/doc/Data-Specs.md @@ -39,6 +39,7 @@ pseudo-code: ```json [ { + "hash": "", "label": "", "device_footprint": "", "third_party_list": [ @@ -59,6 +60,7 @@ pseudo-code: ```json [ { + "hash": "", "shared_peer": { "domain": "String", "address_ip": "String", @@ -624,6 +626,7 @@ pseudo-code: ```json [{ + "hash": "", "me_sender": false, "process_hash": "", "item_name": "", @@ -661,6 +664,7 @@ pseudo-code: ```json [ { + "hash": "", "request": { "item_name": "", "request_type": "", @@ -707,6 +711,7 @@ pseudo-code: ```json [ { + "hash": "", "request": { "item_name": "", "request_type": "", @@ -718,43 +723,31 @@ pseudo-code: "request_prd_origin_hash": "", "item_reference_hash": "" }, - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", - "": "", + "request_pcd_reference_keys_role_confidential_list_enc_by_shared_secret": "", + "request_pcd_origin_hash_keys_role_confidential_list_enc_by_shared_secret": "", + "message_public": "", + "message_confidential": "", + "message_private": "", + "sp_address_to": "", + "sp_address_from": "", + "sp_address_reply": "", + "timestamp_declared": 0, + "role_name_from": "", + "role_name_to": "", + "payment_method_enc_by_shared_secret": "", + "deposit_method_enc_by_shared_secret": "", + "commitment_method_enc_by_shared_secret": "", + "payment_request_pcd_hash_list_enc_by_shared_secret": [""], + "cap_request_pcd_hash_list_enc_by_shared_secret": [""], + "deposit_request_pcd_hash_list_enc_by_shared_secret": [""], + "commitment_request_pcd_hash_list_enc_by_shared_secret": [""], + "ask_payment_method_enc_by_shared_secret": "", + "ask_deposit_method_enc_by_shared_secret": "", + "ask_commitment_method_enc_by_shared_secret": "", + "certif_key_enc_by_shared_secret": "", + "device_footprint_enc_by_sp_shared_secret": "", + "validation_status": "pending|ok|ko" + } ] ``` @@ -767,6 +760,7 @@ pseudo-code: ```json [ { + "hash_public": "", "label": "", "keyrecoverSpend": { "seed_rand_1": "", @@ -791,6 +785,7 @@ pseudo-code: ```json [ { + "hash_public": "", "shared_peer": { "domain": "", "address_ip": "", @@ -841,7 +836,7 @@ pseudo-code: ```json [ { - "hash": "", + "hash_public": "", "item": { "metadata_private": { "metadata": { @@ -949,9 +944,35 @@ pseudo-code: ```json [{ - "pcd_hash": "", - "pcd_aes_key_decrypted_list": [""] + "hash_public": "", + "pcd_aes_key_list_decrypted": [""] }] ``` ### 5.5. RequestPrd + +```json +[ + { + "hash_public": "", + "sig_value": "", + "request_pcd_reference_keys_role_confidential_list_decrypted": "", + "request_pcd_origin_hash_keys_role_confidential_listdecrypted": "", + "message_public_decrypted": "", + "message_confidential_decrypted": "", + "message_private_decrypted": "", + "payment_method_decrypted": "", + "deposit_method_decrypted": "", + "commitment_method_decrypted": "", + "payment_request_pcd_hash_list_decrypted": [""], + "cap_request_pcd_hash_list_decrypted": [""], + "deposit_request_pcd_hash_list_decrypted": [""], + "commitment_request_pcd_hash_list_decrypted": [""], + "ask_payment_method_decryptedt": "", + "ask_deposit_method_decrypted": "", + "ask_commitment_method_decrypted": "", + "certif_key_decrypted": "", + "device_footprint_decrypted": "" + } +] +``` diff --git a/doc/Specs-Datamodel.md b/doc/Specs-Datamodel.md index 79ecd7f..6e9eca9 100644 --- a/doc/Specs-Datamodel.md +++ b/doc/Specs-Datamodel.md @@ -721,32 +721,33 @@ It specifies private encrypted attributes for `request_pcd` items, protecting th Encapsulates a detailed request within the system, focusing on the interaction with Portable Request Documents ( RequestPrd) and specifying various levels of message confidentiality and intended service provider (SP) communication details. -| Attribute Name | Type | Option | Description | -|----------------------------------------------------------------|-------------------|--------|-----------------------------------------------------------------------------------------------| -| `request` | ```Request``` | | A predefined struct representing the basic request information. | -| `sig_value` | ```String``` | | Valeur associée à la signature | -| `request_pcd_keys_role_confidential_list_enc_by_shared_secret` | ```String``` | | Encrypted list of RequestPcd keys for role-confidential data, encrypted with a shared secret. | -| `message_public` | ```String``` | Yes | Optionally specifies a public message associated with the request. | -| `message_confidential` | ```String``` | Yes | Optionally specifies a confidential message associated with the request. | -| `message_private` | ```String``` | Yes | Optionally specifies a private message associated with the request. | -| `sp_address_to` | ```String``` | | The service provider address to which the request is directed. | -| `sp_address_from` | ```String``` | | The service provider address from which the request originates. | -| `sp_address_reply` | ```String``` | | The service provider address for replies to the request. | -| `timestamp_declared` | ```u64``` | | A Unix timestamp indicating when the request was declared. | -| `role_name_from` | ```String``` | | The name of the role from which the request originates. | -| `role_name_to` | ```String``` | | The name of the role to which the request is directed. | -| `payment_method_enc_by_shared_secret` | ```String``` | Yes | Encrypted payment method, encrypted with a shared secret. | -| `deposit_method_enc_by_shared_secret` | ```String``` | Yes | Encrypted deposit method, encrypted with a shared secret. | -| `commitment_method_enc_by_shared_secret` | ```String``` | Yes | Encrypted commitment method, encrypted with a shared secret. | -| `payment_request_pcd_hash_list_enc_by_shared_secret` | ```Vec``` | Yes | A list of hashes for payment-related RequestPcds. | -| `cap_request_pcd_hash_list_enc_by_shared_secret` | ```Vec``` | Yes | A list of hashes for capability-related RequestPcds. | -| `deposit_request_pcd_hash_list_enc_by_shared_secret` | ```Vec``` | Yes | A list of hashes for deposit-related RequestPcds. | -| `commitment_request_pcd_hash_list_enc_by_shared_secret` | ```Vec``` | Yes | A list of hashes for commitment-related RequestPcds. | -| `ask_payment_method_enc_by_shared_secret` | ```String``` | Yes | The requested payment method. | -| `ask_deposit_method_enc_by_shared_secret` | ```String``` | Yes | The requested deposit method. | -| `ask_commitment_method_enc_by_shared_secret` | ```String``` | Yes | The requested commitment method. | -| `certif_key_enc_by_shared_secret` | ```String``` | Yes | Encrypted certification key, encrypted with a shared secret. | -| `device_footprint_enc_by_sp_shared_secret` | ```String``` | | The device footprint encrypted by a service provider's shared secret. | +| Attribute Name | Type | Option | Description | +|----------------------------------------------------------------------------|-------------------|--------|--------------------------------------------------------------------------| +| `request` | ```Request``` | | A predefined struct representing the basic request information. | +| `sig_value` | ```String``` | | Valeur associée à la signature | +| `request_pcd_reference_keys_role_confidential_list_enc_by_shared_secret` | ```Vec``` | | | +| `request_pcd_origin_hash_keys_role_confidential_list_enc_by_shared_secret` | ```Vec``` | | | +| `message_public` | ```String``` | Yes | Optionally specifies a public message associated with the request. | +| `message_confidential` | ```String``` | Yes | Optionally specifies a confidential message associated with the request. | +| `message_private` | ```String``` | Yes | Optionally specifies a private message associated with the request. | +| `sp_address_to` | ```String``` | | The service provider address to which the request is directed. | +| `sp_address_from` | ```String``` | | The service provider address from which the request originates. | +| `sp_address_reply` | ```String``` | | The service provider address for replies to the request. | +| `timestamp_declared` | ```u64``` | | A Unix timestamp indicating when the request was declared. | +| `role_name_from` | ```String``` | | The name of the role from which the request originates. | +| `role_name_to` | ```String``` | | The name of the role to which the request is directed. | +| `payment_method_enc_by_shared_secret` | ```String``` | Yes | Encrypted payment method, encrypted with a shared secret. | +| `deposit_method_enc_by_shared_secret` | ```String``` | Yes | Encrypted deposit method, encrypted with a shared secret. | +| `commitment_method_enc_by_shared_secret` | ```String``` | Yes | Encrypted commitment method, encrypted with a shared secret. | +| `payment_request_pcd_hash_list_enc_by_shared_secret` | ```Vec``` | Yes | A list of hashes for payment-related RequestPcds. | +| `cap_request_pcd_hash_list_enc_by_shared_secret` | ```Vec``` | Yes | A list of hashes for capability-related RequestPcds. | +| `deposit_request_pcd_hash_list_enc_by_shared_secret` | ```Vec``` | Yes | A list of hashes for deposit-related RequestPcds. | +| `commitment_request_pcd_hash_list_enc_by_shared_secret` | ```Vec``` | Yes | A list of hashes for commitment-related RequestPcds. | +| `ask_payment_method_enc_by_shared_secret` | ```String``` | Yes | The requested payment method. | +| `ask_deposit_method_enc_by_shared_secret` | ```String``` | Yes | The requested deposit method. | +| `ask_commitment_method_enc_by_shared_secret` | ```String``` | Yes | The requested commitment method. | +| `certif_key_enc_by_shared_secret` | ```String``` | Yes | Encrypted certification key, encrypted with a shared secret. | +| `device_footprint_enc_by_sp_shared_secret` | ```String``` | | The device footprint encrypted by a service provider's shared secret. | ### 11.1. RequestPrdResponse