A method of secure generation by a client device and a server device of an RSA signature (H ^d) of a message to be signed with a private exponent component d of an RSA key (p, q, N, d, e), where e is a public exponent component, N is a RSA modulus, p, q primes such N = p.q and e.d = 1 modulo phi with phi Euler's function, wherein said client device stores a client device private key equal to (N, dA) with dA a client device private exponent component, a client value (pvA), and a client dynamic offset (hA), and wherein said server device stores a server device private key equal to (N, dB) with dB a server device private exponent component, where dB = d - dA modulo phi, a server value (pvB), a server dynamic offset (hB) and a failure counter, said method comprising the following steps performed by the server device: a. receiving from the client device a client part of said RSA signature of said message to be signed generated by the client device, after incrementing its client value (pvA) by a first predetermined step, from the client device private exponent component (dA), and from an updated client dynamic offset (hA'), said updated client dynamic offset (hA') being function of said client dynamic offset (hA) and of a client shift value (cA), said client shift value (cA) being function of said client value (pvA), b. setting said failure counter to a first default value, c. incrementing said server value (pvB) by a second predetermined step (E'), d. generating a server part of said RSA signature of said message to be signed, from the server device private exponent component (dB), and from an updated server dynamic offset (hB'), said updated server dynamic offset (hB') being function of said server dynamic offset (hB) and of a server shift value (cB), said server shift value (cB) being function of said server value (pvB), e. generating said RSA signature by combining said client part of said RSA signature and said server part of said RSA signature, f. checking if the generation of the RSA signature was a failure or a success and when it was a failure, incrementing said failure counter, g. when the generation of the RSA signature was a failure, iteratively repeating above steps c\ to f\, until said RSA signature of said message to be signed M is successfully generated or said failure counter reaches a first predetermined threshold. a. receiving from the client device a client part of said RSA signature of said message to be signed generated by the client device, after incrementing its client value (pvA) by a first predetermined step, from the client device private exponent component (dA), and from an updated client dynamic offset (hA'), said updated client dynamic offset (hA') being function of said client dynamic offset (hA) and of a client shift value (cA), said client shift value (cA) being function of said client value (pvA), b. setting said failure counter to a first default value, c. incrementing said server value (pvB) by a second predetermined step (E'), d. generating a server part of said RSA signature of said message to be signed, from the server device private exponent component (dB), and from an updated server dynamic offset (hB'), said updated server dynamic offset (hB') being function of said server dynamic offset (hB) and of a server shift value (cB), said server shift value (cB) being function of said server value (pvB), e. generating said RSA signature by combining said client part of said RSA signature and said server part of said RSA signature, f. checking if the generation of the RSA signature was a failure or a success and when it was a failure, incrementing said failure counter, g. when the generation of the RSA signature was a failure, iteratively repeating above steps c\ to f\, until said RSA signature of said message to be signed M is successfully generated or said failure counter reaches a first predetermined threshold.