ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ Bd\Rc@sdZdZddlZejddkrKejddkrKddlTnddlZdejfd YZid Ze d krd Z ej d dndS(s+Self-tests for (some of) Crypto.Util.numbers$Id$iNiii(t*t MiscTestscBsbeZdZdZdZdZdZdZdZdZ dZ d Z RS( cCs ddlmaddladS(Ni(tnumber(t Crypto.UtilRtmath(tself((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pytsetUp'scCs|jttjdd|jttjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjd d|jdtjd d|jdtjd dxtdddD]x}|jdtjd|d }xM|d|dkrt|dd|\}}|t| }|j|d||f|d|tj|d|ft|d|\}}|t| }|j|||f||tj||ft|dd|\}}|t| }|j|d||f|d|tj|d|f|d9}qhWq=WdS(sUtil.number.ceil_shiftiiiiiiiiiii illNi(t assertRaisestAssertionErrorRt ceil_shiftt assertEqualtrangetdivmodtint(Rtbtntqtrtexpected((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyttest_ceil_shift,sJ$$cCs|jttjdd|jttjdd|jttjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjd d|jdtjd d|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjd d|jdtjd d|jdtjd d|jdtjd d|jdtjdd |jdtjdd |jdtjdd |jdtjdd |jdtjd d |jdtjd d |jdtjd d |jdtjd d |jdtjd d |jdtjdd |jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jdtjd d|jdtjd d|jdtjd d|jdtjd d|jdtjd d|jdtjdddS(sUtil.number.ceil_divt1iiiiiiiiiiiii iiiiiiN(Rt TypeErrorRtceil_divtZeroDivisionErrorR (R((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyt test_ceil_div_slcCs|jttjd|jttjd|jttjd|jdtjd|jdtjd|jttjd|jdtjd|jttjd|jttjd |jttjd d}d }xs|d krf|d|krC|j|tj|d ||f|d7}n|jttj||d7}qWxstd ddD]_}|jttjd|d|j|tjd||jttjd|dqzWdS(sUtil.number.exact_log2t0iiiiiiiiiiisexpected=2**%d, n=%di@lNiA(RRRt exact_log2t ValueErrorR R (RteR((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyttest_exact_log2s,& cCs|jdtjdd|jttjdd|jdtjdd|jttjdd|jdtjdd|jdtjdd|jdtjdd|jttjdd|jdtjdd|jdtjdd|jdtjdd|jdtjdd|jttjdd|jttjdd|jdtjddd t|jttjddd td S( sUtil.number.exact_diviiiiiiiit allow_divzeroN(R Rt exact_divRRRtTrue(R((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyttest_exact_divs "c Cs|jttjddxtddD]}xtddD]u}|dkrm|jttj||q?|j||ttj t ||f||tj||fq?Wq)WdS(sUtil.number.floor_divRiii iN( RRRt floor_divR RR R Rtfloortfloat(RtaR((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyttest_floor_divs +cCs|jttjd|jttjdd}tj|}|j|dd|j|d|d>dkd|j|d|>kdd }tj||}|jtj|d|d|j|dd|j|d|d>dkd|j|d|>kdd }tj||}|jtj|dd?|d|j|dd|j|d|d>dkd|j|d|>kdd S(sUtil.number.getStrongPrimeiiiiiliiNiiii(RRRtgetStrongPrimetassertNotEqualR tGCD(RtbitstxR((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyttest_getStrongPrimes&" "$"c Cs |jtjdt|jtjdt|jtjdt|jtjdt|jtjdt|jtjdt|jtjd$t|jtjd'txQd)d+d,d-d.d/d0d1d2d3d4d5f D]%}|jtjt|tqWd"S(6sUtil.number.isPrimeiiiiiilii+iii=ii;i5wlH l9l^l<=leEml l&l5L(l)SlSlZ8l5q:l? rl}elB sl=fl^;l=wNlVlVlVlVliUii#iidlu^l+%!alMnz]lg4+lI>6lS{AKW lb\\QNlzIlv3l_VB;.((R RtisPrimetFalseR tlong(Rt composite((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyt test_isPrimes  cCs|jtjdd|jtjdd|jtjdd|jtjdd|jtjdddS( Niiiii@lE)8^n, n:zb|DELU"N79Y Sh "*f8<>ktk26"zBT6 VRNcc\]]rX" Sw~o 8I(jO32 ii(R Rtsize(R((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyt test_sizes cCsKd}d}tjj||}|j||j|j||jdS(sbTest that mpzToLongObj and longObjToMPZ (internal functions) roundtrip negative numbers correctly.l?<\"XX\ lN(Rt _fastmatht rsa_constructR RR(RRRtk((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyt8test_negative_number_roundtrip_mpzToLongObj_longObjToMPZs ( t__name__t __module__RRRRR!R&R,R1R3R7(((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyR&s  3 E     cCsddlm}|tS(Ni(tlist_test_cases(tCrypto.SelfTest.st_commonR:R(tconfigR:((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyt get_testsst__main__cCstjtS(N(tunittestt TestSuiteR=(((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyt$tt defaultTesttsuite( t__doc__t __revision__tsyst version_infotCrypto.Util.py21compatR?tTestCaseRR=R8RDtmain(((sS/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/Util/test_number.pyts &