diff --git a/.gitignore b/.gitignore index e986907..c698652 100644 --- a/.gitignore +++ b/.gitignore @@ -6,18 +6,8 @@ target/ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html Cargo.lock - -# These are backup files generated by rustfmt -**/*.rs.bk - -# MSVC Windows builds of rustc generate these, which store debugging information -*.pdb -doc/diagrams/.$WalletCreate.drawio.bkp -doc/diagrams/.$WalletRecover.drawio.bkp -doc/diagrams/.$Messages.drawio.bkp -doc/diagrams/.$PRD.drawio.bkp -doc/diagrams/.$PRDKeyBackup.drawio.bkp -doc/diagrams/.$PRDConfirm.drawio.bkp -doc/diagrams/.$PRDKeyHello.drawio.bkp -doc/diagrams/.$Login-Wireframes.drawio.dtmp -doc/diagrams/.$Login-Wireframes.drawio.bkp +**/*.bk +**/*.pdb +**/*.pkp +**/*.tmp +**/*.dtmp diff --git a/doc/Data-Specs.md b/doc/Data-Specs.md index 3338472..da150e7 100644 --- a/doc/Data-Specs.md +++ b/doc/Data-Specs.md @@ -623,7 +623,12 @@ pseudo-code: ### 4.4. Messages +pseudo-code: +```json + + +``` ### 4.5. RequestPrd @@ -644,7 +649,7 @@ pseudo-code: "keyrecoverSpend": { "seed_rand_1": "", "seed_rand_2": "", - "part_enc": "" + "part1_enc": "" }, "key_recover_scan": "", "process_shards_backup_list": [ diff --git a/doc/PRD-PCD-Specs.md b/doc/PRD-PCD-Specs.md index b6bbcb8..98224b5 100644 --- a/doc/PRD-PCD-Specs.md +++ b/doc/PRD-PCD-Specs.md @@ -57,6 +57,10 @@ Voir [_Doc_references.md](_Doc_references.md). ## 4. Commun aux `RequestPcd` et RequestPrd +Encryption : + +![PCD_PRD_encryption](diagrams/PCD_PRD_encryption.png "PCD_PRD_encryption") + ### 4.1. Création et envoi Les `RequestPcd` et les `RequestPrd` sont envoyés sous forme de `message` (JSON) depuis les websockets des relais. diff --git a/doc/Specs-Datamodel.md b/doc/Specs-Datamodel.md index 68b1c4d..da0a364 100644 --- a/doc/Specs-Datamodel.md +++ b/doc/Specs-Datamodel.md @@ -734,43 +734,43 @@ The `request_pcdItemEnc` struct encapsulates encrypted RequestPcd items, detaili 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 | -| RequestPcd_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_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. | ### 11.1. RequestPrdResponse `request_prd` and its variations represent different aspects and actions related to Portable Request Documents ( RequestPrd), covering everything from confirmation to updates, key management, and messaging, essential for managing and processing RequestPrds securely and efficiently. -| Attribute Name | Type | Option | Description | -|---------------------------------|--------------------|--------|------------------------------------------------------------| -| `request_prd` | ```request_prd``` | | Represents a Request. | -| `sig_value` | ```String``` | | The signature value for the response. | -| `shared_secret_key` | ```eyEncryption``` | Yes | Optional encryption key used for shared secrets. | -| `shard_enc_by_sp_shared_secret` | ```String``` | Yes | The shard encrypted by a service provider's shared secret. | +| Attribute Name | Type | Option | Description | +|---------------------------------------------|-------------------|--------|------------------------------------------------------------| +| `request_prd` | ```request_prd``` | | Represents a Request. | +| `sig_value` | ```String``` | | The signature value for the response. | +| `shared_secret_key_enc_by_sp_shared_secret` | ```Encryption``` | Yes | Optional encryption key used for shared secrets. | +| `shard_enc_by_sp_shared_secret` | ```String``` | Yes | The shard encrypted by a service provider's shared secret. | ### 11.2. RequestPrdConfirm diff --git a/doc/diagrams/.$Login-Wireframes.drawio.bkp b/doc/diagrams/.$Login-Wireframes.drawio.bkp new file mode 100644 index 0000000..34d1869 --- /dev/null +++ b/doc/diagrams/.$Login-Wireframes.drawio.bkp @@ -0,0 +1,1018 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/diagrams/.$PCD_PRD_encryption.drawio.bkp b/doc/diagrams/.$PCD_PRD_encryption.drawio.bkp new file mode 100644 index 0000000..061a143 --- /dev/null +++ b/doc/diagrams/.$PCD_PRD_encryption.drawio.bkp @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/diagrams/.$WalletCreate.drawio.bkp b/doc/diagrams/.$WalletCreate.drawio.bkp new file mode 100644 index 0000000..ef8ea2f --- /dev/null +++ b/doc/diagrams/.$WalletCreate.drawio.bkp @@ -0,0 +1,776 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/diagrams/.$WalletRecover.drawio.bkp b/doc/diagrams/.$WalletRecover.drawio.bkp new file mode 100644 index 0000000..35b422b --- /dev/null +++ b/doc/diagrams/.$WalletRecover.drawio.bkp @@ -0,0 +1,840 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/diagrams/PCD_PRD_encryption.drawio b/doc/diagrams/PCD_PRD_encryption.drawio new file mode 100644 index 0000000..b9e6216 --- /dev/null +++ b/doc/diagrams/PCD_PRD_encryption.drawio @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/diagrams/PCD_PRD_encryption.png b/doc/diagrams/PCD_PRD_encryption.png new file mode 100644 index 0000000..e733183 Binary files /dev/null and b/doc/diagrams/PCD_PRD_encryption.png differ