Congrats on implementing Textbook RSA. Unfortunately as implemented this isn't really secure in any sense.
I'd encourage you to start reading here: http://crypto.stackexchange.com/questions/1448/definition-of...
And here is a full explanation: http://www.di.ens.fr/~pnguyen/pub_BoJoNg00.htm