3

I am newbie so please pardon my naivete. I was wondering if there is any cryptographic procedure that allows for peer to peer matching.

Perhaps to illustrate my question I will use an example. Say I am in a country where marijuana is banned. I cannot put a post or advertise that I need marijuana. However, there exists a matcher. This matcher takes individual requests and attempts to match them up. However, I do not want the matcher to know my request else he/she will report me to the authorities.

Is it possible to cryptographically encode an order request such that this order can be matched but the matcher algorithm is unable to decode the information which is being matched. Thus, only the two matched peers can know what they want and understand the matching since they both created the request. Is this possible? Something tells me there might be a solution for peer matching/finding.

  • 1
    You're probably looking for a one-way hash... two hashes of the same password will result in the same hash. However, there is no way of getting the password from the hash. [Security Exchange: One way hash](https://security.stackexchange.com/questions/80623/hashing-vs-one-way-encryption) – RubberStamp Nov 28 '17 at 02:28
  • @RubberStamp thank you for you swift response. But if the hashes of the password are the same, wont they be encoding the same message which won't work in this case. That is, the matcher could match my order with another order from another guy also wanting marijuana, since his hash will also be the same as mine. That will be a bad match as I would want to be matched with a marijuana seller and not another marijuana buyer. Do I make sense? – Chukwunonso Arinze Nov 28 '17 at 03:25
  • Just pair two hashes... one hash for type A, and one for type B. Type A looks for Type B, and vice-versa... the store of hashes doesn't know what is in either, but can match them to each other with a pre-determined rule... is your question *how to create the rule with nothing pre-determined?* – RubberStamp Nov 28 '17 at 03:32
  • @RubberStamp I did not know that hashes could be correlated. I had thought that since they are intractable. Forgive me as I am a learner. So are the hashes of two correlated passwords also correlated? By pre-determination do you mean having a rule for pairing hashes? To have such a rule would it not mean mapping back to the password? If that is the case, the objective is failed as the matcher would be able to decode the matching – Chukwunonso Arinze Nov 28 '17 at 03:49
  • I didn't say anything about correlated hashes in the mathematical sense. By pre-determined, I mean user A knows user B's hash type, and so looks for it in the table of hashes. The hash store doesn't need to know anything about what the hashes mean... A single hash could be used, you could play it backwards for Type B and forwards for Type A... but there will probably be collisions in that scenario. – RubberStamp Nov 28 '17 at 03:54
  • @RubberStamp Well now I see what you mean. But in this case it is no longer a peer discovery. Remember in the real life analogy I gave, there is no way I know a marijuana seller. So I cannot even reach a pre determined set of rules with someone I do not even know . Now I see what you mean by pre determination. So yes the question is " how to create the rule with nothing pre-determined?" How will this be possible or is it impossible? – Chukwunonso Arinze Nov 28 '17 at 03:58
  • The idea could be developed into a peer discovery protocol, where each type (searcher and searchee) use the same password with the same hash as the first step in the protocol. Followed by a binary indicator which would match zero to one... or something like that. – RubberStamp Nov 28 '17 at 04:05
  • Oh nice. I see now. Yh this may work. Do you know if there any protocols such as this? Yes I am interested in peer discovery protocols. I searched the internet and could not find much. Most were referring to the usual node discovery on P2P networks which is different from what I intend here. – Chukwunonso Arinze Nov 28 '17 at 04:16
  • @RubberStamp But on second thought, how will two unknown parties come up with a password if they have not met each other before. I had thought in this case the password could be marijuana then the hash will spit out and be matched. But then the word marijuana cannot be a password since all and sundry will be aware of it. So we are back to square one cause having a common password among matched peers can only be achieved if both peers know each other. – Chukwunonso Arinze Nov 28 '17 at 04:40
  • I would think that in order for something to be matched with something else, there needs to be some shared information in common. Whether speaking about networks or just saying "hello" to someone in person, there is a prerequisite of a common piece information. The system through which the commonly held information travels doesn't need to know the primary message... but the end points need to know. – RubberStamp Nov 28 '17 at 04:46
  • 1
    @RubberStamp Yh that what I thought. The common feature will be the password. But I guess that such a common feature cannot in itself be a secret if the two parties are unknown to each other. Thank you for this response. It is very helpful. I guess perhaps the question i had asked in itself is logically inconsistent – Chukwunonso Arinze Nov 28 '17 at 04:50

0 Answers0