I was treating the signature as encoded bytes and the modulus as a hexadecimal integer. unhexlifying the integer would require conversion back to int (in addition to being longer since it'd be the encoding of the string representation) and treating the signature as an int would require conversion back to bytes.