Secure data processing method, implemented by a system comprising a server unit holding N reference data (X 1,...,X N), a client unit having a datum to be compared (y), and the index c of a datum of the base, and a secure electronic component, the method comprising the calculation of a function (f) between the datum to be compared and at least one reference datum (x c) indexed by the index c, the function being of the type able to be written in the form of a sum: - of a term (f 1) that depends solely on the datum to be compared, - of a term (f 2) that depends solely on the reference datum, and - of a polynomial of which the variables are the coordinates of the datum to be compared (y) and of the reference datum (x c) indexed by the index c, such that all the monomials of the polynomial include at least one coordinate of each datum, the method comprising a step of initialisation, which comprises: - generating masking data by the server unit, or jointly by the server unit and the secure electronic component, in such a way that masking data is held by the server unit and masking data is held by the secure component, - integrating the secure electronic component into the client unit, - scrambling reference data (X 1,...,X N) by the server unit on the basis of masking data, and - calculating, by the client unit, the term (f 2) of the function that depends solely on the datum (y) to be compared, and the method further comprising steps for executing the calculation of the function between the datum (y) to be compared of the client unit and the reference datum (x c) indexed by the index c, during which: - the client unit sends the coordinates of the datum to be compared (y) to the secure component, which returns said datum in a masked form on the basis of the masking data that it holds, - the client unit retrieves, from the server unit, the reference datum indexed by the index c scrambled by the masking data, and - on the basis of the data obtained from the secure electronic component and from the server unit, the client unit calculates the sum of the term of the function that depends solely on the reference datum and the polynomial term, and adds to said sum the term that depends solely on the datum to be compared such as to obtain the result of the function. - of a term (f 1) that depends solely on the datum to be compared, - of a term (f 2) that depends solely on the reference datum, and - of a polynomial of which the variables are the coordinates of the datum to be compared (y) and of the reference datum (x c) indexed by the index c, such that all the monomials of the polynomial include at least one coordinate of each datum, - generating masking data by the server unit, or jointly by the server unit and the secure electronic component, in such a way that masking data is held by the server unit and masking data is held by the secure component, - integrating the secure electronic component into the client unit, - scrambling reference data (X 1,...,X N) by the server unit on the basis of masking data, and - calculating, by the client unit, the term (f 2) of the function that depends solely on the datum (y) to be compared, - the client unit sends the coordinates of the datum to be compared (y) to the secure component, which returns said datum in a masked form on the basis of the masking data that it holds, - the client unit retrieves, from the server unit, the reference datum indexed by the index c scrambled by the masking data, and - on the basis of the data obtained from the secure electronic component and from the server unit, the client unit calculates the sum of the term of the function that depends solely on the reference datum and the polynomial term, and adds to said sum the term that depends solely on the datum to be compared such as to obtain the result of the function.