A method for providing a digital signature to a message, M, in accordance with a digital signature algorithm, DSA, or an elliptic curve digital signature algorithm, ECDSA, the method comprising the steps of: - providing a generator, g, for a cyclic group, G, of order q, where g∈G, a function, F, and a function, H, where g, G, F and H are specified by the DSA or ECDSA, - generating a secret key, x, as a random secret sharing [x] among at least two parties, - generating random secret sharings, [a] and [k], among the at least two parties and computing [w]=[a][k], - computing a value, R, as R=g k, without revealing k, by performing the steps of: - each of the at least two parties computing a share, R j, of the value, R, as R j =g k_j, and distributing the share to each of the other parties, and - computing the value, R, from the shares, R j, - ensuring that R is correct by verifying that R=g k is computed from at least t+1 shares of [k] originating from honest parties, by each of the parties checking that R is correct, based on the shares, R j, received from the other parties, - computing an authenticator, W, as W=g ak, by computing R a, without revealing a or k, by performing the steps of: - each of the at least two parties computing a share, W j, of the authenticator, W, as W j =R a_j, and distributing the share to each of the other parties, and - computing the authenticator, W, from the shares, W j, - ensuring that W is correct by verifying that W=R a is computed from at least t+1 shares of [a] originating from honest parties, by each of the parties checking that W is correct, based on the shares, W j, received from the other parties, - verifying [w] by checking whether or not g w =W, and - signing the message, M, by computing [k -1]=[a]·w -1, computing [x.k -1]=[x]·[k -1], and generating a sharing, [s], among the at least two parties, as a function of M, R, [k -1] and [x·k -1], by computing [s]=m·w -1 ·[a] + r·w -1 ·[a]·[x] + [d], where r=F, m=H, and [d] is a random sharing of zero, where s forms part of a signature pair (r, s). - providing a generator, g, for a cyclic group, G, of order q, where g∈G, a function, F, and a function, H, where g, G, F and H are specified by the DSA or ECDSA, - generating a secret key, x, as a random secret sharing [x] among at least two parties, - generating random secret sharings, [a] and [k], among the at least two parties and computing [w]=[a][k], - computing a value, R, as R=g k, without revealing k, by performing the steps of: - each of the at least two parties computing a share, R j, of the value, R, as R j =g k_j, and distributing the share to each of the other parties, and - computing the value, R, from the shares, R j, - each of the at least two parties computing a share, R j, of the value, R, as R j =g k_j, and distributing the share to each of the other parties, and - computing the value, R, from the shares, R j, - ensuring that R is correct by verifying that R=g k is computed from at least t+1 shares of [k] originating from honest parties, by each of the parties checking that R is correct, based on the shares, R j, received from the other parties, - computing an authenticator, W, as W=g ak, by computing R a, without revealing a or k, by performing the steps of: - each of the at least two parties computing a share, W j, of the authenticator, W, as W j =R a_j, and distributing the share to each of the other parties, and - computing the authenticator, W, from the shares, W j, - each of the at least two parties computing a share, W j, of the authenticator, W, as W j =R a_j, and distributing the share to each of the other parties, and - computing the authenticator, W, from the shares, W j, - ensuring that W is correct by verifying that W=R a is computed from at least t+1 shares of [a] originating from honest parties, by each of the parties checking that W is correct, based on the shares, W j, received from the other parties, - verifying [w] by checking whether or not g w =W, and - signing the message, M, by computing [k -1]=[a]·w -1, computing [x.k -1]=[x]·[k -1], and generating a sharing, [s], among the at least two parties, as a function of M, R, [k -1] and [x·k -1], by computing [s]=m·w -1 ·[a] + r·w -1 ·[a]·[x] + [d], where r=F, m=H, and [d] is a random sharing of zero, where s forms part of a signature pair (r, s).