pcd simplification wip (doc)

This commit is contained in:
NicolasCantu 2024-03-08 11:55:30 +01:00
parent a593ea24ee
commit 48691b7abe
2 changed files with 248 additions and 128 deletions

View File

@ -34,8 +34,6 @@ Voir [_Doc_references.md](_Doc_references.md).
### 4.1. <a name='Cls'></a>Clés ### 4.1. <a name='Cls'></a>Clés
Base "key_recover_spend_list"
pseudo-code: pseudo-code:
```json ```json
@ -56,8 +54,6 @@ pseudo-code:
### 4.2. <a name='Peers'></a>Peers ### 4.2. <a name='Peers'></a>Peers
shared_peer_list_merged
pseudo-code: pseudo-code:
```json ```json
@ -121,6 +117,7 @@ pseudo-code:
### 4.3. <a name='Process'></a>Process ### 4.3. <a name='Process'></a>Process
pseudo-code:
```json ```json
[ [
@ -626,20 +623,145 @@ pseudo-code:
pseudo-code: pseudo-code:
```json ```json
[{
"me_sender": false,
"process_hash": "",
"item_name": "",
"request_type": "",
"timestamp": 0,
"message_hash":"pending|",
"pcd_hash": "pending|",
"prd_hash": "pending|",
"request_pcd_reference_hash": "pending|",
"request_pcd_origin_hash": "pending|",
"request_prd_reference_hash": "pending|",
"request_prd_origin_hash": "pending|",
"item_reference_hash": "pending|",
"prd_sig_value": "",
"prd_sp_address_from": "",
"prd_role_from": "",
"prd_sp_address_to": "",
"prd_role_to": "",
"prd_tx_sp": "pending|",
"peer_list": [{
"domain": "",
"ip": "",
"port": "",
"timestamp": 0,
"sender": false
}],
}]
```
### 4.6. <a name='RequestPcd'></a>RequestPcd
pseudo-code:
```json
[
{
"request": {
"item_name": "",
"request_type": "",
"version": 0,
"process_hash": "",
"request_pcd_reference_hash": "",
"request_pcd_origin_hash": "",
"request_prd_reference_hash": "",
"request_prd_origin_hash": "",
"item_reference_hash": ""
},
"item_list": [{
"version": "",
"item_type": "",
"name": "",
"request_pcd_item_enc_attribute_public_list": [{
"attribute_name": "",
"data_enc": ""
}],
"request_pcd_item_enc_attribute_role_confidential_list": [{
"attribute_name": "",
"data_enc": "",
}],
"request_pcd_item_enc_attribute_private_list": [{
"attribute_name": "",
"data_enc": ""
}],
}],
"pagination": {
"start": 0,
"number": 0,
"page_index": 0,
"page_total": 0
},
"validation_status": "pending|ok|ko"
}
]
``` ```
### 4.5. <a name='RequestPrd'></a>RequestPrd ### 4.5. <a name='RequestPrd'></a>RequestPrd
### 4.6. <a name='RequestPcd'></a>RequestPcd pseudo-code:
```json
[
{
"request": {
"item_name": "",
"request_type": "",
"version": 0,
"process_hash": "",
"request_pcd_reference_hash": "",
"request_pcd_origin_hash": "",
"request_prd_reference_hash": "",
"request_prd_origin_hash": "",
"item_reference_hash": ""
},
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
"": "",
]
```
## 5. <a name='Dataprive'></a>Data privée ## 5. <a name='Dataprive'></a>Data privée
### 5.1. <a name='Cls-1'></a>Clés ### 5.1. <a name='Cls-1'></a>Clés
Base "key_recover_spend_list"
pseudo-code: pseudo-code:
```json ```json
@ -664,6 +786,8 @@ pseudo-code:
### 5.2. <a name='Peers-1'></a>Peers ### 5.2. <a name='Peers-1'></a>Peers
pseudo-code:
```json ```json
[ [
{ {
@ -712,6 +836,8 @@ pseudo-code:
### 5.3. <a name='Process-1'></a>Process ### 5.3. <a name='Process-1'></a>Process
pseudo-code:
```json ```json
[ [
{ {
@ -817,8 +943,15 @@ pseudo-code:
] ]
``` ```
### 5.4. <a name='Messages-1'></a>Messages ### 5.6. <a name='RequestPcd-1'></a>RequestPcd
pseudo-code:
```json
[{
"pcd_hash": "",
"pcd_aes_key_decrypted_list": [""]
}]
```
### 5.5. <a name='RequestPrd-1'></a>RequestPrd ### 5.5. <a name='RequestPrd-1'></a>RequestPrd
### 5.6. <a name='RequestPcd-1'></a>RequestPcd

View File

@ -54,11 +54,10 @@
* 9. [Request](#Request) * 9. [Request](#Request)
* 10. [RequestPcd](#RequestPcd) * 10. [RequestPcd](#RequestPcd)
* 10.1. [Pagination](#Pagination) * 10.1. [Pagination](#Pagination)
* 10.2. [RequestPcdItemEncAttributePublic](#RequestPcdItemEncAttributePublic) * 10.2. [RequestPcdItemGenericEnc](#RequestPcdItemGenericEnc)
* 10.3. [RequestPcdItemEncAttributeRoleConfidential](#RequestPcdItemEncAttributeRoleConfidential) * 10.2.1. [RequestPcdItemEncAttributePublic](#RequestPcdItemEncAttributePublic)
* 10.4. [RequestPcdItemEncAttributePrivate](#RequestPcdItemEncAttributePrivate) * 10.2.2. [RequestPcdItemEncAttributeRoleConfidential](#RequestPcdItemEncAttributeRoleConfidential)
* 10.5. [RequestPcdItemGenericEnc](#RequestPcdItemGenericEnc) * 10.2.3. [RequestPcdItemEncAttributePrivate](#RequestPcdItemEncAttributePrivate)
* 10.6. [RequestPcdItemEnc](#RequestPcdItemEnc)
* 11. [RequestPrd](#RequestPrd) * 11. [RequestPrd](#RequestPrd)
* 11.1. [RequestPrdResponse](#RequestPrdResponse) * 11.1. [RequestPrdResponse](#RequestPrdResponse)
* 11.2. [RequestPrdConfirm](#RequestPrdConfirm) * 11.2. [RequestPrdConfirm](#RequestPrdConfirm)
@ -662,9 +661,9 @@ Defines a general request structure within the system, encapsulating details abo
The `request_pcd` struct integrates a request with a list of generic encrypted items and pagination details, facilitating the handling of encrypted RequestPcd requests within the system. The `request_pcd` struct integrates a request with a list of generic encrypted items and pagination details, facilitating the handling of encrypted RequestPcd requests within the system.
| Attribute Name | Type | Option | Description | | Attribute Name | Type | Option | Description |
|----------------|--------------------------------------|--------|-------------------------------------------------------------------| |-----------------|--------------------------------------|--------|-------------------------------------------------------------------|
| `request` | ```Request``` | | The request, assuming `Request` is a predefined struct. | | `request` | ```Request``` | | The request, assuming `Request` is a predefined struct. |
| `item_list` | ```Vec< RequestPcdItemGenericEnc>``` | | List of generic encrypted items. | | `item_enc_list` | ```Vec< RequestPcdItemGenericEnc>``` | | List of generic encrypted items. |
| `pagination` | ```Pagination``` | Yes | Pagination details, assuming `Pagination` is a predefined struct. | | `pagination` | ```Pagination``` | Yes | Pagination details, assuming `Pagination` is a predefined struct. |
### 10.1. <a name='Pagination'></a>Pagination ### 10.1. <a name='Pagination'></a>Pagination
@ -676,8 +675,22 @@ The `Pagination` struct is essential for managing large datasets, detailing the
| `start` | ```usize``` | | L'indice de départ pour la pagination. | | `start` | ```usize``` | | L'indice de départ pour la pagination. |
| `number` | ```usize``` | | Le nombre d'éléments par page. | | `number` | ```usize``` | | Le nombre d'éléments par page. |
| `page_index` | ```usize``` | | L'indice de la page actuelle pour la pagination. | | `page_index` | ```usize``` | | L'indice de la page actuelle pour la pagination. |
| `page_total` | ```usize``` | | |
### 10.2. <a name='RequestPcdItemEncAttributePublic'></a> RequestPcdItemEncAttributePublic ### 10.2. <a name='RequestPcdItemGenericEnc'></a> RequestPcdItemGenericEnc
`request_pcdItemGenericEnc` encompasses encrypted items with optional lists of public, role-confidential, and private encrypted attributes, offering a flexible encryption model for diverse data types.
| Attribute Name | Type | Option | Description |
|---------------------------------------------------------|--------------------------------------------------------|--------|----------------------------------------------------------|
| `version` | ```i64``` | | The version of the item. |
| `item_type` | ```String``` | | The type of the item. |
| `name` | ```String``` | | The name of the item. |
| `request_pcd_item_enc_attribute_public_list` | ```Vec< RequestPcdItemEncAttributePublic>``` | Yes | Optional list of public encrypted attributes. |
| `request_pcd_item_enc_attribute_role_confidential_list` | ```Vec< RequestPcdItemEncAttributeRoleConfidential>``` | Yes | Optional list of role-confidential encrypted attributes. |
| `request_pcd_item_enc_attribute_private_list` | ```Vec< RequestPcdItemEncAttributePrivate>``` | Yes | Optional list of private encrypted attributes. |
#### 10.2.1. <a name='RequestPcdItemEncAttributePublic'></a> RequestPcdItemEncAttributePublic
This struct outlines public encrypted attributes for RequestPcd items, ensuring the secure transmission of public attribute data. This struct outlines public encrypted attributes for RequestPcd items, ensuring the secure transmission of public attribute data.
@ -686,17 +699,16 @@ This struct outlines public encrypted attributes for RequestPcd items, ensuring
| `attribute_name` | ```String``` | | The name of the attribute. | | `attribute_name` | ```String``` | | The name of the attribute. |
| `data_enc` | ```String``` | | The encrypted data associated with the attribute. | | `data_enc` | ```String``` | | The encrypted data associated with the attribute. |
### 10.3. <a name='RequestPcdItemEncAttributeRoleConfidential'></a> RequestPcdItemEncAttributeRoleConfidential #### 10.2.2. <a name='RequestPcdItemEncAttributeRoleConfidential'></a> RequestPcdItemEncAttributeRoleConfidential
`request_pcdItemEncAttributeRoleConfidential` deals with role-specific confidential encrypted attributes, securing sensitive data while allowing role-based access. `request_pcdItemEncAttributeRoleConfidential` deals with role-specific confidential encrypted attributes, securing sensitive data while allowing role-based access.
| Attribute Name | Type | Option | Description | | Attribute Name | Type | Option | Description |
|------------------|---------------------|--------|---------------------------------------------------| |------------------|--------------|--------|---------------------------------------------------|
| `attribute_name` | ```String``` | | The name of the attribute. | | `attribute_name` | ```String``` | | The name of the attribute. |
| `data_enc` | ```String``` | Yes | The encrypted data associated with the attribute. | | `data_enc` | ```String``` | Yes | The encrypted data associated with the attribute. |
| `key` | ```KeyEncryption``` | Yes | The key used for encrypting the data. |
### 10.4. <a name='RequestPcdItemEncAttributePrivate'></a> RequestPcdItemEncAttributePrivate #### 10.2.3. <a name='RequestPcdItemEncAttributePrivate'></a> RequestPcdItemEncAttributePrivate
It specifies private encrypted attributes for `request_pcd` items, protecting the most sensitive information with encryption. It specifies private encrypted attributes for `request_pcd` items, protecting the most sensitive information with encryption.
@ -705,31 +717,6 @@ It specifies private encrypted attributes for `request_pcd` items, protecting th
| `attribute_name` | ```String``` | | The name of the attribute. | | `attribute_name` | ```String``` | | The name of the attribute. |
| `data_enc` | ```String``` | Yes | The encrypted data associated with this attribute name. | | `data_enc` | ```String``` | Yes | The encrypted data associated with this attribute name. |
### 10.5. <a name='RequestPcdItemGenericEnc'></a> RequestPcdItemGenericEnc
`request_pcdItemGenericEnc` encompasses encrypted items with optional lists of public, role-confidential, and private encrypted attributes, offering a flexible encryption model for diverse data types.
| Attribute Name | Type | Option | Description |
|---------------------------------------------------------|--------------------------------------------------------|--------|----------------------------------------------------------|
| `item_enc` | ```RequestPcdItemEnc``` | | The encrypted item. |
| `request_pcd_item_enc_attribute_public_list` | ```Vec< RequestPcdItemEncAttributePublic>``` | Yes | Optional list of public encrypted attributes. |
| `request_pcd_item_enc_attribute_role_confidential_list` | ```Vec< RequestPcdItemEncAttributeRoleConfidential>``` | Yes | Optional list of role-confidential encrypted attributes. |
| `request_pcd_item_enc_attribute_private_list` | ```Vec< RequestPcdItemEncAttributePrivate>``` | Yes | Optional list of private encrypted attributes. |
### 10.6. <a name='RequestPcdItemEnc'></a> RequestPcdItemEnc
The `request_pcdItemEnc` struct encapsulates encrypted RequestPcd items, detailing the version, type, and name of the item, alongside encrypted attributes segregated into public, role-confidential, and private categories, ensuring comprehensive encryption coverage.
| Attribute Name | Type | Option | Description |
|---------------------------------------------------------|--------------------------------------------------------|--------|-------------------------------------------------|
| `version` | ```i64``` | | The version of the item. |
| `item_type` | ```String``` | | The type of the item. |
| `name` | ```String``` | | The name of the item. |
| `pagination_number_per_request_pcd` | ```u32``` | | The pagination number per RequestPcd. |
| `request_pcd_item_enc_attribute_public_list` | ```Vec< RequestPcdItemEncAttributePublic>``` | | List of public encrypted attributes. |
| `request_pcd_item_enc_attribute_role_confidential_list` | ```Vec< RequestPcdItemEncAttributeRoleConfidential>``` | | List of role-confidential encrypted attributes. |
| `request_pcd_item_enc_attribute_private_list` | ```Vec< RequestPcdItemEncAttributePrivate>``` | | List of private encrypted attributes. |
## 11. <a name='RequestPrd'></a>RequestPrd ## 11. <a name='RequestPrd'></a>RequestPrd
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. 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.