split out rsa internals into seperate file