hash public key modulus as raw (in agreement with client). And some cleanups