Correct generation of message stamp and signature