Hardware architecture for RSA cryptography based on residue number system