Using a data structure (Com) to abstract message signing and sign a hash of the message rather than the message itself