mirror of
https://github.com/status-im/specs.git
synced 2025-02-05 19:04:18 +00:00
Merge pull request #75 from status-im/request-encrypted
Request contains encrypted data instead of signed
This commit is contained in:
commit
a5a1a1ec7f
@ -51,7 +51,7 @@ In the Whisper envelope's payload section, there MUST be RLP-encoded information
|
|||||||
|
|
||||||
The `Cursor` field SHOULD be filled in if a number of envelopes between `Lower` and `Upper` is greater than `Limit` so that the requester can send another request using the obtained `Cursor` value. What exactly is in the `Cursor` is up to the implementation. The requester SHOULD NOT use a `Cursor` obtained from one mailserver in a request to another mailserver because the format or the result MAY be different.
|
The `Cursor` field SHOULD be filled in if a number of envelopes between `Lower` and `Upper` is greater than `Limit` so that the requester can send another request using the obtained `Cursor` value. What exactly is in the `Cursor` is up to the implementation. The requester SHOULD NOT use a `Cursor` obtained from one mailserver in a request to another mailserver because the format or the result MAY be different.
|
||||||
|
|
||||||
The envelope MUST be signed with a symmetric key agreed between the requester and Mailserver.
|
The envelope MUST be encrypted with a symmetric key agreed between the requester and Mailserver.
|
||||||
|
|
||||||
### Receiving historic messages
|
### Receiving historic messages
|
||||||
|
|
||||||
@ -59,19 +59,19 @@ Historic messages MUST be sent to a peer as a packet with a P2P Message code (`0
|
|||||||
|
|
||||||
In order to receive historic messages from a mailserver, a node MUST trust the selected mailserver, that is allow to receive packets with the P2P Message code. By default, such packets are discarded.
|
In order to receive historic messages from a mailserver, a node MUST trust the selected mailserver, that is allow to receive packets with the P2P Message code. By default, such packets are discarded.
|
||||||
|
|
||||||
Received envelopes MUST be passed through the Whisper envelopes pipelines so that they are picked up by registered filters and passed to subscribers.
|
Received envelopes MUST be passed through the Whisper envelope pipelines so that they are picked up by registered filters and passed to subscribers.
|
||||||
|
|
||||||
For a requester, to know that all messages have been sent by mailserver, it SHOULD handle P2P Request Complete code (`0x7d`). This code is followed by a a byte array with:
|
For a requester, to know that all messages have been sent by mailserver, it SHOULD handle P2P Request Complete code (`0x7d`). This code is followed by the following parameters:
|
||||||
|
|
||||||
```
|
```
|
||||||
[ RequestID, LastEnvelopeHash, Cursor ]
|
[ RequestID, LastEnvelopeHash, Cursor ]
|
||||||
```
|
```
|
||||||
|
|
||||||
`RequestID`: 32-byte wide array with a hash of the envelope containing request details
|
`RequestID`: 32-byte wide array with a Keccak-256 hash of the envelope containing the original request
|
||||||
`LastEnvelopeHash`: 32-byte wide array with a has of the last set envelope for the request
|
`LastEnvelopeHash`: 32-byte wide array with a Keccak-256 hash of the last sent envelope for the request
|
||||||
`Cursor`: an array of a cursor returned from the previous request (optional)
|
`Cursor`: an array of a cursor returned from the previous request (optional)
|
||||||
|
|
||||||
If `Cursor` is not empty, it means that not all messages were sent due to the set `Limit` in the request. One or more consecutive requests MAY be sent with `Cursor` field filled in in order to receive the rest of messages.
|
If `Cursor` is not empty, it means that not all messages were sent due to the set `Limit` in the request. One or more consecutive requests MAY be sent with `Cursor` field filled in order to receive the rest of the messages.
|
||||||
|
|
||||||
## Security considerations
|
## Security considerations
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user