longer by adding zeroes choose r to be a secure hash of the resulting mixture the secure hash is preferably sha 1 but may be any other cryptographically secure hash function as will be understood by those skilled in the art if hashing the entire message is a computationally expensive operation the mixture can be reduced to a single hash sized block by folding one block into the next block starting with the most significant block suitably padded out with zeroes if needed and continuing down to the least significant block the final block is then hashed and the resulting value used for r in general a suitable hash function may be applied to the message the exponentiation method of this embodiment may be summarized as follows referring to fig3 an example of the main steps of a signature protocol is shown generally by the numeral 40 this protocol contemplates an attacker 45 monitoring exponentiation operations performed by one of the correspondents 12 a it will be understood that the presence of the attacker 45 is presumed for security purposes when implementing the protocol but that in normal use the attacker 45 will not be present the first correspondent 12 a obtains a message m at step 42 which it would like to sign and send to the second correspondent 12 b the first correspondent then obtain the private key d which is used to sign messages from its cryptographic parameters 16 a the first correspondent performs an exponentiation operation on m to obtain v 1 m d mod p at step 46 using the method described above with reference to fig2 with the accumulator a performing computations modulo p the first correspondent performs another exponentiation.