text stringlengths 1 330k |
|---|
Are there any algorithm to achieve this goal? One that will calculate the number of common elements using data from which it is very difficult to compute elements of our sets? Or its just impossible? |
All elements of our sets are integers so we can use algorithms of computational number theory. |
share|improve this question |
3 Answers 3 |
up vote 5 down vote accepted |
Answer. Yes! It is possible to do this, using the magic of secure multi-party computation. The security property we get is basically the best one could possibly hope for: namely, your friend learns nothing more about your set of numbers than the maximum he could have learned by choosing his set in a clever way and lear... |
The particular problem you list is known as the cardinality set intersection problem or cardinality private set intersection problem, and there has been considerable research on protocols for this problem. |
One way to solve this problem is using the standard general-purpose machinery for secure two-party computation. The general-purpose tools for secure two-party computation can be applied directly to this problem, giving one way to do what you want. |
Alternatively, researchers have devised special-purpose protocols designed especially to solve the cardinality set intersection problem. These special-purpose protocols are considerably more efficient than what you get if you apply the general-purpose methods. Here are some some pointers into the research literature in... |
Mathematical details. Here's the basic idea behind Kissner and Song's approach: |
1. They encode each set as a polynomial: for example, the set S = {3,5,17} is encoded as the polynomial s(x) = (x-3)(x-5)(x-17), the set T = {4,12,17} is represented as t(x) = (x-4)(x-12)(x-17), and so on. In general, a polynomial p(x) represents the set of roots of p(x), i.e., the set {a : p(a)=0}. |
2. Given polynomials s(x),t(x) representing the sets S,T, we can compute a polynomial u(x) representing the intersection U = S ∩ T, by picking random polynomials q(x),r(x) and computing |
u(x) = q(x)*s(x) + r(x)*t(x). |
Note that the roots of u(x) are (with high probability) exactly the common roots of s(x),t(x), i.e., u(a)=0 usually happens only when s(a)=t(a)=0. |
For example, if with sets S,T defined as in 1 above, we might pick q(x) = 2x^3 + 7x^2 + x - 3 and r(x) = 14x^3 + 3x^2 - 2x + 5. Then we can calculate u(x) = 16 x^6 - 502 x^5 + ... - 3315, whose only integer root is x=17. This corresponds to the fact that U = S ∩ T = {17}. |
3. They use Pallier's additively homomorphic public-key encryption scheme. In particular, you and your friend jointly generate a Paillier public/private keypair, so that both of you know the public key but the private key is shared between you (it is only possible to decrypt if both of you jointly participate). There... |
4. You take your set S, encode it as a polynomial s(x), and encrypt each coefficient under the Paillier public key, and send the resulting encrypted polynomial to your friend. Your friend takes his set T, encodes it as a polynomial t(x), encrypt each coefficient under the Paillier public key, and send the resulting e... |
5. For each element a of your set S, you evaluate the encrypted polynomial at a, thus learning the encryption of u(a), call it E(u(a)) (the additively homomorphic properties of Paillier encryption allow you to do this), and then you pick a random non-zero value c and multiply to get E(c*u(a)). You do this separately ... |
In the running example, you'd learn the encryption of u(3), u(5), and u(17), you'd pick random non-zero values, say 8, 2, 5, and you'd share E(8*u(3)), E(2*u(5)), and E(5*u(17)) with your friend in random order. In this case u(3)=-50904, u(5)=152880, u(17)=0, so you'd be sharing E(8*-50904), E(2*152880), and E(0), ... |
6. Finally, you and your friend jointly decrypt the encrypted values you've shared with each other, using the shared private key. You count how many zeros you see in the decrypted values your friend sent you. Your friend counts how many zeros are present in the decrypted values you sent him. This is the number of val... |
I've introduced some simplifications (e.g., all computations have to be done in an appropriate group, and many others). Please don't try to implement based upon this description alone. See Kissner and Song's paper for the full details. You might also look into the subsequent literature; there have been some follow-on p... |
Summary. As you can see, this gets highly technical -- but the bottom line is that this problem has been studied in detail before, and there exist clever, beautiful, efficient solutions to it. |
share|improve this answer |
Not a complete answer, but it seems like the possible range of numbers needs to be very large and the actual numbers highly unpredictable. Otherwise, regardless of the specific algorithm, your "friend" could claim to have many or all of the numbers in his set and then learn information about how many you have in yours.... |
share|improve this answer |
Yes, this is unavoidable. However: it is possible to limit the information leakage, simply by limiting the number of times you will run the protocol. Moreover: There exist protocols that achieve the best security that is achievable, i.e., that leak nothing more than this information (a fact that I find rather amazing a... |
How about this idea: |
• We'll assume that the integers in the sets are all in the range [2, N] for some agreed-upon N. (why is the start of the range '2'? Because the below protocol doesn't work with the element 1; if the set has a different range, it is straight-forward to have a public mapping between the values that the set can be, and... |
We'll call side 1's set E_i, and side 2's set F_i. |
• Both sides agree on a prime p with the properties: |
• Both p and (p-1)/2 are prime |
• (p-1)/2 > N |
• p is large enough that the decisional Diffie-Hellman problem is infeasible (decisional DH problem? Well, if the dDH problem was feasible, someone could attempt to attempt to use it to find matching pairs). |
Phase 1: |
• Side 1 select a random value 1 <= e < (p-1)/2, computes the values P_i = (E_i)^(2e) mod p, shuffle those values into random order, and sends those values to side 2. (why 2e? Well, it's so that someone won't be able to use whether the elements were Quadratic Residues as a tag) |
• Similarly, side 2 selects a random 1 <= f < (p-1)/2, computes the values Q_i = (F_i)^(2f) mod p, shuffles those values, and sends those values to side 1. |
Phase 2: |
• Side 1 takes the values it gets from side 2 Q_i, computes R_i = (Q_i)^e mod p, shuffles those values into random order, and sends those values to side 2 |
• Similarly, side 2 takes the values it gets from side 1 P_i, computes S_i = (P_i)^f mod p, shuffles those values into random order, and sends those values to side 1. |
• Both sides count how many values occur in common between R_i and S_i; that's how many common elements there were in the original sets. |
share|improve this answer |
A very clever attempt!, but unfortunately your scheme is not secure: it leaks partial information about the sets. For instance, if side 1's set is of the form {a,a^2}, then side 2 can learn this fact (by noticing that P_2 = (P_1)^2 mod p). Or if side 1's set is of the form {a,b,a*b}, then side 2 can detect this. I don'... |
Your Answer |
Wednesday, March 19, 2008 |
Ruling on celebrating the Propphet PBUH birthday |
Praise be to Allaah the Lord of the Worlds, and blessings and peace be upon our Prophet Muhammad and all his family and companions. |
The commands mentioned in the Qur'aan and Sunnah to follow the laws of Allaah and His Messenger, and the prohibitions on introducing innovations into the religion are quite clear. Allaah says (interpretation of the meaning): |
"Say (O Muhammad to mankind): 'If you (really) love Allaah, then follow me (i.e. accept Islamic Monotheism, follow the Qur'aan and the Sunnah), Allaah will love you and forgive you your sins'" |
[Aal 'Imraan 3:31] |
"Follow what has been sent down unto you from your Lord (the Qur'aan and Prophet Muhammad's Sunnah), and follow not any Awliyaa' (protectors and helpers who order you to associate partners in worship with Allaah), besides Him (Allaah). Little do you remember!" |
[al-A'raaf 7:3] |
[al-A'naam 6:153] |
And the Prophet (peace and blessings of Allaah be upon him) said: "The most truthful of speech is the Book of Allaah and the best of guidance is the guidance of Muhammad, and the most evil of things are those which are newly-invented." And he (peace and blessings of Allaah be upon him) said: "Whoever innovates anything... |
Among the reprehensible innovations that people have invented is the celebration of the birthday of the Prophet (peace and blessings of Allaah be upon him) in the month of Rabee' al-Awwal. They celebrate this occasion in various ways: |
Whatever form it takes and whatever the intentions of those who do this are, there is no doubt whatsoever that it is an invented, haraam innovation which was introduced by the Shi'a Faatimids after the three best centuries, in order to corrupt the religion of the Muslims. The first person to do this after them was the ... |
Al-Haafiz Ibn Katheer said in al-Bidaayah wa'l-Nihaayah (13/137), in his biography of Abu Sa'eed Kazkaboori: "He used to observe the Mawlid in Rabee' al-Awwal and hold a huge celebration on that occasion… some of those who were present at the feast of al-Muzaffar on some occasions of the Mawlid said that he used to off... |
Ibn Khalkaan said in Wafiyaat al-A'yaan (3/274): "When it is the first of Safar they decorate those domes with various kinds of fancy adornments, and in every dome there sits a group of singers and a group of puppeteers and players of musical instruments, and they do not leave any one of those domes without setting up ... |
And We have also sent down to you the Reminder (Adh-Dhikr) that you may explain clearly to men what is sent down to them, and that they may give thought. [ Soorah An-Nahl Aayah 44] |
Anas (RA) narrates that Nabi (Sallallahu Alayhi Wasalaam) said, "Such a time will come upon people that it will be as difficult for them to remain on Deen as it is for a person to hold a burning coal in his hand." |
Ka'b Ibn Iyaadh (RA) narrates "I heard Rasulullah (Sallallahu Alayhi Wasalaam) saying, "Every Ummat had some trial (Fitnah) and that Fitnah of my Ummah is wealth. |
Tuesday, January 15, 2008 |
Blessing in Rain |
Since all we people here in the emirates are talking about the rain - a post about it was a must. |
Enjoy the rain and make dua for yourself and others |
there is blessing in the rain |
Our beloved Prophet (peace & blessings of Allaah be upon him) said:"Two are the du'as that are never returned: the du'a made when the prayer is being called, and at the time of rainfall." (Abu Dawud). |
So makes lots of duas for yourself and family and whoever needs them. Make dua for your parents. For yourself...for success in deen duniya and akhirah....basically put your heart in it....and ask the Almighty...:) |
During rain: |
Allahumma sayyiban naaf'ian. |
(O Allah, (bring) beneficial rain clouds) |
After Rain: |
MuTirnaa bi Fadhlil-Llahi wa Rahmatihi. |
(It has rained by the Bounty of Allah and His Mercy) |
When it thunders: |
Subhanah alldhi yusabbihur-ra'du bi hamdihi wal malaa'ikatu min khifaatihi |
Glory to Him whom thunder and angels glorify due to fear of fear) |
Sunday, January 6, 2008 |
Funeral Rites in Islam |
Based on the hadith of Umm Salamah: |
"Allahummagh-fir li Abi Salamah warfa'darajatahu fil-mahdiyin |
wakhlufhu fi áqibihi filghabirin |
and let his remianing offspring be like him |
waghfir laná walahú yá Rabbal- Álamin |
Forgive us and forgive him O Lord of the worlds |
wafsah lahu fi qabrihi wa nawwir lahu fih |
and expand his grave and illuminate it for him |
Facing the Qiblah [ before burial] |
Preparing food by the family of the deceased |
[Sunan Abu Dawud] |
Tuesday, January 1, 2008 |
Interview of Imam Anwar Al-Awlaki |
Iman Anwar alawlaki - was Alhamdullilah recently released from prison. He was interviewed by Moazzam Begg. |
Moazzam Begg: When were you arrested? On what grounds were you held? Were there any charges made against you? |
Anwar Al-Awlaki: Bismillahir-Rahmanir-Raheem[i]. I was arrested in mid-2006. Initially I was held because I entered as an arbitrator in a local issue here, a tribal issue. I was an arbitrator in that issue and I was arrested until that issue… because the government wanted to solve that issue rather than have it solved ... |
MB: Right. |
AA: After that, they began asking me questions about my local Islamic activities here, and later on it was becoming clear that I was being held due to the request of the US government. That was what they were telling me here, and that the Americans wanted to meet me. |
MB: Subhan Allah[ii]. Well, that’s something that we can share together. I’ve also been held at the request of the Americans for quite some time. |
The other question is that the media reported that your incarceration was due to having some knowledge, or some people who were involved in 9/11 at your sermons. Could you clarify any of this at all? |
AA: That was one of the issues that the Americans asked about but I don’t know if I was held because of that, or because of the other issues that they presented. But it was one of the issues that they enquired about. |
MB: Can you describe a little bit about what your prison conditions were like? What was your individual cell was like? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.