I'm trying to study a simplified TLS-style protocol, including verifying RSA signatures. It's an attempt to verify using only a valid certificate. However, I can't manage to get anything to verify properly. I have a modulus, exponent, signature, and hash of the message. With the following parameters:
modulus = 28459 = n
exponent = 7 = e
signature = 5128 = s
hash(m) = 4085 = x
As I see it, I should be able to take the following
s^e mod n = 5128^7 mod 28459
and see if it equals
x mod n = 4085 mod 28459
If the equations are equal, I'm all set. However, they're not equal! I get 18044 != 4085. Am I missing something here?