+Here's the math. RSA PKCS#1 v1.5 signing computes `sig = pad(SHA256(msg))^d mod n`, where `pad()` is the deterministic EMSA-PKCS1-v1.5 encoding (a fixed ASN.1 prefix + the hash, right-padded into a full block). Verification checks `sig^e mod n == pad(SHA256(msg))`. We know `e` (65537 is the standard RSA public exponent used by most implmenetations), we can compute `pad(SHA256(msg))` ourselves (it's deterministic given the query string), and we know the signature as it is included in the REST request. What we don't know is `n` — the RSA modulus, which is the public key.
0 commit comments