RSA implemented in C