refactor rsa signature/verification logic to remove duplication (#3903)

1 file changed