MA437-RSA is a project mainly written in C, it's free.
An implementation of RSA in and the Pollard Rho algorithm in C
See the wiki if you are having trouble or need help.
http://wiki.github.com/clholgat/MA437-RSA/