Method for computing a probabilistic encryption scheme for encrypting a data item in an electronic device comprising the steps of: a) computing a plurality of random bit strings i r 1,..., r m, m being the number of random bit strings, in a computation cluster; and processing the plurality of random bit strings with a randomness preparation function f in the computation cluster to obtain a plurality of processed random bit strings f(r 1),..., f(r m); b) sending, by the computation cluster, the processed plurality of random bit strings (f(r 1),..., f(r m)) to the electronic device; c) generating, by the electronic device, a random string r E for using in the probabilistic encryption scheme in the electronic device using a subset of the plurality of the random bit strings computed in the computation cluster; and d) encrypting the data item using the random string r E generated in the electronic device; and wherein generating the random string r E consists in recombining of the subset of the plurality of processed random bit strings using a recombination function c; and wherein the generation of the random string r E for using in the encryption scheme in the electronic device is performed using the following function: r E = c f r 1,..., f r m, r, and r being a random bit string generated in the electronic device of length q•log 2 (m) with q being a predefined parameter; and wherein the probabilistic encryption scheme is defined as follows: E d, g n, R = g d · R n mod n 2, with d being the data item, the pair (g,n) being the key, R being the random string for using in the encryption scheme, g is a generator and n is the size of the plain text space; and wherein the function f is based on modular exponentiation and defined as f(r)=r n (mod n 2); and c(f(r 1),...,f(r m),r) is defined so as to split the random bit string r into q pieces of length log 2 (m) which corresponds to q indices into the list of the m processed random bit strings f(r 1),...,f(r m) and to multiply the corresponding q processed random bit strings, thereby obtaining the random string r E. a) computing a plurality of random bit strings i r 1,..., r m, m being the number of random bit strings, in a computation cluster; and processing the plurality of random bit strings with a randomness preparation function f in the computation cluster to obtain a plurality of processed random bit strings f(r 1),..., f(r m); b) sending, by the computation cluster, the processed plurality of random bit strings (f(r 1),..., f(r m)) to the electronic device; c) generating, by the electronic device, a random string r E for using in the probabilistic encryption scheme in the electronic device using a subset of the plurality of the random bit strings computed in the computation cluster; and d) encrypting the data item using the random string r E generated in the electronic device; and wherein generating the random string r E consists in recombining of the subset of the plurality of processed random bit strings using a recombination function c; and wherein the generation of the random string r E for using in the encryption scheme in the electronic device is performed using the following function: r E = c f r 1,..., f r m, r, and r being a random bit string generated in the electronic device of length q•log 2 (m) with q being a predefined parameter;