A method of using a distributed computing system that comprises a first device and a second device coupled by a communication network, to securely compute a product or other function of a first value Vi and a second value Wi, associated with a discrete number in an intersection of a first and second set of discrete numbers Xi, Xi', or a record of an intersection table that contains Vi and Wi,, wherein the numbers Xi from the first set and its associated first value Vi are accessed or computed by the first device and the numbers Xi' from the second set and its associated second values Wi are accessed or computed by the second device, the method comprising - the first device computing encrypted coefficients of a first polynomial P and a second polynomial Q from the numbers Xi from the first set and their associated first values Vi, the first polynomial having all numbers Xi from the first set as roots, the second polynomial Q values Q(Xi)=Vi for the numbers Xi from the first set; - the first device transmitting the encrypted coefficients of the first and second polynomial P, Q to the second device via the communication network; - the second device computing encrypted values <P(Xi')> and <Q(Xi')> of the first and second polynomial P, Q for a number Xi' in the second set from the encrypted coefficients; - the second device using a secure multiparty equality protocol to compute an encrypted binary value <di> from the encrypted value <p(Xi')> of the first polynomial p, having a first and second binary value when the value p(Xi) of the first polynomial p is zero and not zero respectively; - the second device using a secure multiparty multiplication protocol or secure function value computation protocol to compute an encrypted value of a product <di Q(Xi') Wi > or function value <di f(Q(Xi'), Wi) >, or record (di, Q(Xi'), Wi) of the intersection table, from the encrypted binary value <di> computed for the number Xi' from the second set, the encrypted value <Q(Xi')> of the second polynomial Q computed for the number Xi' from the second set and the second value Wi associated with the number Xi' of the second set. - the first device computing encrypted coefficients of a first polynomial P and a second polynomial Q from the numbers Xi from the first set and their associated first values Vi, the first polynomial having all numbers Xi from the first set as roots, the second polynomial Q values Q(Xi)=Vi for the numbers Xi from the first set; - the first device transmitting the encrypted coefficients of the first and second polynomial P, Q to the second device via the communication network; - the second device computing encrypted values <P(Xi')> and <Q(Xi')> of the first and second polynomial P, Q for a number Xi' in the second set from the encrypted coefficients; - the second device using a secure multiparty equality protocol to compute an encrypted binary value <di> from the encrypted value <p(Xi')> of the first polynomial p, having a first and second binary value when the value p(Xi) of the first polynomial p is zero and not zero respectively; - the second device using a secure multiparty multiplication protocol or secure function value computation protocol to compute an encrypted value of a product <di Q(Xi') Wi > or function value <di f(Q(Xi'), Wi) >, or record (di, Q(Xi'), Wi) of the intersection table, from the encrypted binary value <di> computed for the number Xi' from the second set, the encrypted value <Q(Xi')> of the second polynomial Q computed for the number Xi' from the second set and the second value Wi associated with the number Xi' of the second set.