ÿØÿà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Áß_ÿÙ /Oc@sdZdZddlZddlZejddkrWejddkrWddlTnddlTddlZddlm Z m Z m Z d Z d ej fd YZd efd YZdefdYZidZedkr dZejddndS(s(Self-test suite for Crypto.PublicKey.DSAs$Id$iNiii(t*(tlist_test_casesta2b_hextb2a_hexcCs?t|tr"dj|jStdj|jSdS(s,Remove whitespace from a text or byte stringtN(t isinstancetstrtjointsplittb(ts((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyt_sws&stDSATestcBseZedZedZedZedZedZedZedZ e e dZ edZ ed Zed Zd Zd Zd ZdZdZdZdZdZdZRS(s19131871 d75b1612 a819f29d 78d1b0d7 346f7aa7 7bb62a85 9bfd6c56 75da9d21 2d3a36ef 1672ef66 0b8c7c25 5cc0ec74 858fba33 f44c0669 9630a76b 030ee333s626d0278 39ea0a13 413163a5 5b4cb500 299d5522 956cefcb 3bff10f3 99ce2c2e 71cb9de5 fa24babf 58e5b795 21925c9c c42e9f6f 464b088c c572af53 e6d78802s8df2a494 492276aa 3d25759b b06869cb eac0d83a fb8d0cf7 cbb8324f 0d7882e5 d0762fc5 b7210eaf c2e9adac 32ab7aac 49693dfb f83724c2 ec0736ee 31c80291s,c773218c 737ec8ee 993b4f2d ed30f48e dace915fs,2070b322 3dba372f de1c0ffc 7b2e3b49 8b260614s,358dad57 1462710f 50e254cf 1a376b2b deaadfbfs,0d516729 8202e49b 4116ac10 4fc3f415 ae52f917tabcs,a9993e36 4706816a ba3e2571 7850c26c 9cd0d89ds,8bac1ab6 6410435c b7181f95 b16ab97c 92b341c0s,41e2345f 1f56df24 58f426d1 55b4ba2d b6dcd8c8cCsIddlmaddlmaddlmam}mat|_dS(Ni(tDSA(tRandom(t bytes_to_longtinversetsize( tCrypto.PublicKeyRtCryptoRtCrypto.Util.numberRRRtdsa(tselfR((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pytsetUpKscCs<|jjd}|j||j}|j|dS(s7DSA (default implementation) generated key (1 argument)iN(Rtgeneratet_check_private_keyt publickeyt_check_public_key(RtdsaObjtpub((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyttest_generate_1argSs  cCsH|jjdtjj}|j||j}|j|dS(s8DSA (default implementation) generated key (2 arguments)iN(RRRtnewtreadRRR(RRR((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyttest_generate_2argZs  cCsxg|j|j|j|jfD]}tt|^q\}}}}|jj||||f}|j|dS(s6DSA (default implementation) constructed key (4-tuple)N( tytgtptqRRRt constructt_test_verification(RtparamR#R$R%R&R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyttest_construct_4tupleasIcCsg|j|j|j|j|jfD]}tt|^q%\}}}}}|jj|||||f}|j ||j |dS(s6DSA (default implementation) constructed key (5-tuple)N( R#R$R%R&txRRRR't _test_signingR((RR)R#R$R%R&R+R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyttest_construct_5tuplegsR! cCs|jd|j|jd|j|jd|j|jd|j|j|j|jj|j|j|jj|j|j|jj|j|j |jj |j|j |jj |jd|j|j k|jdt |j |jd|jd|j |j|jt |j|j |j|jdd|j kov|j kndS(Niii( t assertEqualt has_privatetcan_signt can_encryptt can_blindR#tkeyR$R%R&R+Rtpow(RR((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyRns(cCst|j}t|j}|jd|j|jd|j|jd|j|jd|j|j|j|j j|j|j |j j |j|j |j j |j|j |j j |jdt |d|jdt |j d|jd|j |j k|jdt|j |jd|j d|j |jt|j|||j|j|jkt|j|j|jktdS(NiiR+i(Rtktm_hashR.R/R0R1R2R#R3R$R%R&thasattrRt assertRaisest TypeErrortsignRtTruetFalse(RRR5R6((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyRs$"cCst|j}t|j}tt|j}tt|j}|j||\}}|j||f||fdS(N(RR5R6RtrR R:R.(RRR5R6R=R tr_outts_out((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyR,s cCst|j}tt|j}tt|j}|jd|j|||f|jd|j|td||fdS(Niis(RR6RR=R R.tverifyR (RRR6R=R ((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyR(s "(t__name__t __module__R R#R$R%R&R+R5t k_inverseRR tmR6R=R RRR"R*R-RRR,R((((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyR -s.                 tDSAFastMathTestcBs5eZdZdZdZdZdZRS(cCs&tj|tjdt|_dS(Nt use_fast_math(R RRtDSAImplementationR;R(R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyRs cCstj|dS(s9DSA (_fastmath implementation) generated key (1 argument)N(R R(R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyRscCstj|dS(s:DSA (_fastmath implementation) generated key (2 arguments)N(R R"(R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyR"scCstj|dS(s8DSA (_fastmath implementation) constructed key (4-tuple)N(R R*(R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyR*scCstj|dS(s8DSA (_fastmath implementation) constructed key (5-tuple)N(R R-(R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyR-s(RARBRRR"R*R-(((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyREs     tDSASlowMathTestcBs5eZdZdZdZdZdZRS(cCs&tj|tjdt|_dS(NRF(R RRRGR<R(R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyRs cCstj|dS(s9DSA (_slowmath implementation) generated key (1 argument)N(R R(R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyRscCstj|dS(s:DSA (_slowmath implementation) generated key (2 arguments)N(R R"(R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyR"scCstj|dS(s8DSA (_slowmath implementation) constructed key (4-tuple)N(R R*(R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyR*scCstj|dS(s8DSA (_slowmath implementation) constructed key (5-tuple)N(R R-(R((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyR-s(RARBRRR"R*R-(((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyRHs     cCsg}|tt7}y$ddlm}|tt7}Wntk rddlm}ddl}t j j t j j t j j |j|jd|d}t j j|rtddd|qnX|tt7}|S( Ni(t _fastmath(tget_config_vars/../../PublicKey/_fastmathtSOs-While the _fastmath module exists, importing s<it failed. This may point to the gmp or mpir shared library s.not being in the path. _fastmath was found at (RR RRIREt ImportErrortdistutils.sysconfigRJtinspecttostpathtnormpathtdirnametabspathtgetfilet currentframetexistsRH(tconfigttestsRIRJRNt_fm_path((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyt get_testss   >t__main__cCstjtS(N(tunittestt TestSuiteRZ(((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pytRt defaultTesttsuite(t__doc__t __revision__tsysROt version_infotCrypto.Util.py21compattCrypto.Util.py3compatR\tCrypto.SelfTest.st_commonRRRR tTestCaseR RERHRZRAR`tmain(((sU/opt/alt/python27/lib64/python2.7/site-packages/Crypto/SelfTest/PublicKey/test_DSA.pyts   &