ó πöVc@s5dZddlmZd„Zd„Zd„ZdS(s}Core mathematical operations. This is the actual core RSA implementation, which is only defined mathematically on integers. i˙˙˙˙(t is_integercCs-t|ƒrdStd||jfƒ‚dS(Ns%s should be an integer, not %s(Rt TypeErrort __class__(tvartname((s3/opt/awscli/lib/python2.7/site-packages/rsa/core.pyt assert_ints cCswt|dƒt|dƒt|dƒ|dkrBtdƒ‚n||krgtd||fƒ‚nt|||ƒS(s@Encrypts a message using encryption key 'ekey', working modulo ntmessagetekeytnis'Only non-negative numbers are supporteds#The message %i is too long for n=%i(Rt ValueErrort OverflowErrortpow(RRR((s3/opt/awscli/lib/python2.7/site-packages/rsa/core.pyt encrypt_int!s     cCs=t|dƒt|dƒt|dƒt|||ƒ}|S(sHDecrypts a cypher text using the decryption key 'dkey', working modulo nt cyphertexttdkeyR(RR (R RRR((s3/opt/awscli/lib/python2.7/site-packages/rsa/core.pyt decrypt_int1s    N(t__doc__t rsa._compatRRR R(((s3/opt/awscli/lib/python2.7/site-packages/rsa/core.pyts