-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a modification suggest #1045
Comments
Feel free to make a Pull Request with the proposed change, so we can discuss it there. |
In order to support multidevices, I suggest to implement it in two phases. Multidevices mean a real PK with several DHT(facade) device PKs. Each DHT(facade) PK corresponds to one device, they share the same real PK. Phase #1: change 0x83 & 0x84 messages, this modification makes effectively no change. I will explain later. Phase #1: Phase #2: for 0x84 message, its current format is for 0x85 message, its current format is for 0x86 message, it follows from 0x85 message. epkTargetReal is defined as follows: any comments? Jack |
My original post was incomplete. I am sorry. And I did not mention what further improvement was planned. Further improvements are to support multidevices, and to support 512bits real(onion) PK or other type curve. |
Furthermore, I guess then the multiple devices support is complete. One Onion_Friend(one tox ID) will be mapped to several DHT_Friends(one for each device, i.e. one for each Crypto_Connection). |
A little bit more explanation. Since I do not know how familiar readers are with the source code, let me put into two sections: section I --- single device, section II --- multidevices. Since before fully understands the mechanism of current single device, there is no point to talk about extension to multidevices. suppose 2 users: user A with two devices(device_a1, device_a2), user X with 1 single device(device_x). Section I --- single device. device_x(of User X) announce the dhtpk which the user X wants to use. The user X should send this announce to user A. This announcement is the 0x9C message, which is wrapped into 0x85 message. Before device_x sends 0x85(0x9C) message to P, device_x asked P whether P can forward messages to user A. device_x asked P with message 0x83, P responded with message 0x84. P can respond with yes/no. If P responded yes, then user A must have had made the arrangement. the arrangement request is 0x83 message, and P responds with 0x84 message. Now it is the time to investigate the structure/format of 0x83,0x84,0x85,0x86, and 0x9C messages in chronical order as follows. User A arranges message forwarding with P with 0x83 message, user A has to send 0x83 message twice. User X asks P whether P can forward messages to user A with 0x83 message user X announce its dhtpk with 0x9C message, User X sends 0x85 message to P P processes 0x85 message, turns it to 0x86, and sends 0x86 to user A. Through the above process, the map between DHTPK and realPK(userID) is established. Section II -- multiple devices In the section I, wheverver the userIDs take place, should be replaced for(with) userID and deviceID(a string will be good), and default single device is the case of empty deviceID. And wherever the dhtpk takes place, should be replaced for(with) dhtpk and deviceID. With these replacement, the map between (deviceID,DHTPK) and (userID,deviceID) is established. When user X asks P whether P can forward messages to user A, P responds with 0x84. Hope what I presented is understandable. |
@iphydf says:
If it is wiki, yes, I can participate. and I can learn a bit from example. Seems that I am not able to formulate a proposal in the form of a design document. I feel what I suggest is a simple thing(just a little extension), there is no need to have a design document. I think that the little extension I proposed is easy to understand if you understand the mechanism to be extended. So maybe what is needed is an explanation of the original mechanism. I can write a word or pdf document, or html document. Jack |
Please write a markdown document and make a PR into this repository with that document. Put the file into docs/ in this repository. |
I hope someone can take this over, and I do not have to participate any more. |
It's unclear to me where to go with this. #1108 is unsafe. Closing this for now. Reopen if you have specific things you want to change. |
In the file onion_announe.c, in the handle_announce_request function, there are following lines:
I hope that packet_public_key could be replaced with plain+ONION_PING_ID_SIZE. For tox, it does not change anything effectively. Since when the first case is executed, they are exactly same! In fact, when the first case is executed, the message being handled is sent by onion_client.c(method client_send_announce_request) and there for the case num==0 to call create_announce_request.
Even though effectively, this proposed change does not change anything for tox. But it provides some consistency: either cases, entry is identified by 32 bytes starts at plain + ONION_PING_ID_SIZE. Furthermore, with this modification, further improvement becomes possible.
With the above change, to distinguish setting up an entry from detecting an entry is purely by the pingid. Then I can use packet_public_key for some other purpose since it is not tied to identifier of the entry.
so please!
Jack
The text was updated successfully, but these errors were encountered: