Signing a binary hash vs character representation of the same hash I have a hash that I want to sign, with the hexadecimal representation: hash_bin=0x11223344 (length 4 bytes).
The same hash also has a character representation hash_text=”11223344”, which is the binary stream {0x31, 0x31, 0x32, 0x32, 0x33, 0x33, 0x34, 0x34} (length 8 bytes).

Which of the hash versions (hash_bin – 4 bytes / hash_text – 8 bytes) is better to use for signing the hash by RSA, security-wise?
Which of the hash versions (hash_bin – 4 bytes / hash_text – 8 bytes) is better to use for signing the hash by RSA, security-wise?


Doesn't matter; as long as there is a 1:1 relationship between versions, it doesn't matter which representation you sign.

The only situation where you might run into a problem is if two different hashes (with version A) mapped to the same hash (with version B) - that doesn't happen here.

Now, with RSA, we (almost) always hash the message being performing the actual low-level RSA operation - are you doing the traditional RSA signature method here (which would involve computing a hash of your hash)?  Or, are you expecting to take the hash you have, do RSA padding (you are doing RSA padding, aren't you), and then doing the RSA private operation)?