/opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey
Edit: /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyo (6137B)
Ñò
Â/¾Oc @ sÚ d Z d Z d g Z d d k Z e i d d j o" e i d d j o d d k Tn d d k l Z l Z l Z d
e
f d „ ƒ YZ d e f d
„ ƒ YZ
d d d d d „ Z d e f d „ ƒ YZ d d „ Z d S( sU Pure Python implementation of the RSA-related portions of Crypto.PublicKey._fastmath.s $Id$t
rsa_constructiÿÿÿÿNi i i ( t *( t sizet inverset GCDt errorc B s e Z RS( ( t __name__t
__module__( ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyR % s t _RSAKeyc B sP e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C s | t | | i | i ƒ S( N( t powt et n( t selft mt r( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyt _blind) s c C s t | | i ƒ | | i S( N( R R ( R R
R ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyt _unblind- s c C sõ | i ƒ p t d ƒ ‚ n t | d ƒ o² t | d ƒ o¢ t | d ƒ o’ t | | i | i d | i ƒ } t | | i | i d | i ƒ } | | } | d j o | | i } n | | i | i } | | i | St | | i | i ƒ S( Ns No private keyt pt qt ui i ( t has_privatet TypeErrort hasattrR t dR R R R ( R t ct m1t m2t h( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyt _decrypt1 s
0##
c C s t | | i | i ƒ S( N( R R
R ( R R
( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyt _encrypt? s c C s* | i ƒ p t d ƒ ‚ n | i | ƒ S( Ns No private key( R R R ( R R
( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyt _signC s
c C s | i | ƒ | j S( N( R ( R R
t sig( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyt _verifyH s c C s
t | d ƒ S( NR ( R ( R ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyR K s c C s t | i ƒ d S( s7 Return the maximum number of bits that can be encryptedi ( R R ( R ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyR N s (
R R R R R R R R R R ( ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyR ( s c
C sÎ t ƒ } | | _ | | _ | d j o | S| | _ | d j o# | d j o | | _ | | _ n3| | d } | } x) | d d j o t | d ƒ d } q} Wd } d }
x³ | oª |
d j o | } x† | | j ox t |
| | ƒ } | d j oK | | d j o: t | d | ƒ d j o! t | d | ƒ | _ d } Pn | d } qÓ W|
d }
qµ W| p t
d ƒ ‚ n t | | i ƒ d | _ | d j o
| | _ n t | i | i ƒ | _ | S( s Construct an RSAKey objecti i i id s2 Unable to compute factors p and q from exponent d.N(
R R R
t NoneR R R t divmodR R t
ValueErrorR R (
R R
R R R R t objt ktott tt spottedt at kt cand( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyR R sF
7
t _DSAKeyc B s, e Z d „ Z d „ Z d „ Z d „ Z RS( c C s t | i ƒ d S( s7 Return the maximum number of bits that can be encryptedi ( R R ( R ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyR s c C s
t | d ƒ S( Nt x( R ( R ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyR “ s c C s¥ | i ƒ p t d ƒ ‚ n d | j o
| i j n p t d ƒ ‚ n t | | i ƒ } t | i | | i ƒ | i } | | | i | | i } | | f S( Ns No private keyl s k is not between 2 and q-1( R R R R# R R t gR R, ( R R
R) t inv_kR t s( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyR – s
!c C sà d | j o
| i j n p" d | j o
| i j n o t St | | i ƒ } | | | i } | | | i } t | i | | i ƒ t | i | | i ƒ | i | i } | | j S( Ni ( R t FalseR R R- R t y( R R
R R/ t wt u1t u2t v( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyR ¡ s D<( R R R R R R ( ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyR+ Ž s c C sK t ƒ } | | _ | | _ | | _ | | _ | d j o
| | _ n | S( N( R+ R1 R- R R R! R, ( R1 R- R R R, R$ ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyt
dsa_construct« s
( t __doc__t __revision__t __all__t syst version_infot Crypto.Util.py21compatt Crypto.Util.numberR R R t ExceptionR t objectR R! R R+ R6 ( ( ( sM /opt/alt/python27/lib64/python2.7/site-packages/Crypto/PublicKey/_slowmath.pyt
s (*<