/* Generated by Pyrex 0.9.4.1 on Thu Jun  1 14:19:50 2006 */

#include "Python.h"
#include "structmember.h"
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
__PYX_EXTERN_C double pow(double, double);
#include "string.h"
#include "stdio.h"
#include "stdlib.h"
#include "openssl/crypto.h"
#include "openssl/bn.h"
#include "openssl/dh.h"
#include "openssl/blowfish.h"
#include "openssl/rsa.h"
#include "openssl/dsa.h"
#include "openssl/rand.h"
#include "openssl/objects.h"
#include "pyrex_fixup.h"


typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
static PyObject *__Pyx_UnpackItem(PyObject *, int); /*proto*/
static int __Pyx_EndUnpack(PyObject *, int); /*proto*/
static int __Pyx_PrintItem(PyObject *); /*proto*/
static int __Pyx_PrintNewline(void); /*proto*/
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static void __Pyx_ReRaise(void); /*proto*/
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
static PyObject *__Pyx_GetExcValue(void); /*proto*/
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/
static void __Pyx_WriteUnraisable(char *name); /*proto*/
static void __Pyx_AddTraceback(char *funcname); /*proto*/
static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size);  /*proto*/
static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/
static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static PyObject *__pyx_m;
static PyObject *__pyx_b;
static int __pyx_lineno;
static char *__pyx_filename;
static char **__pyx_f;

static char __pyx_mdoc[] = "\nSSLCrypto - partial Python wrapper for SSL crypto\n\nContains an abstract class called <b>key</b>, which provides\nan effortlessly simple API for most common crypto operations.<br>\n\nAn almost totally-compatible replacement for ezPyCrypto\n\nAlso, features an implementation of ElGamal\n";

/* Declarations from SSLCrypto */


struct __pyx_obj_9SSLCrypto_dh {
  PyObject_HEAD
  DH (*myDH);
};


struct __pyx_obj_9SSLCrypto_blowfish {
  PyObject_HEAD
  BF_KEY keyStruct;
  char (iv[8]);
  int counter;
  char (*key);
  int keylen;
};


struct __pyx_obj_9SSLCrypto_rsa {
  PyObject_HEAD
  RSA (*rsaObj);
  BN_CTX (*bnCtx);
};


struct __pyx_obj_9SSLCrypto_dsa {
  PyObject_HEAD
  DSA (*dsaObj);
  BN_CTX (*bnCtx);
};

static PyTypeObject *__pyx_ptype_9SSLCrypto_dh = 0;
static PyTypeObject *__pyx_ptype_9SSLCrypto_blowfish = 0;
static PyTypeObject *__pyx_ptype_9SSLCrypto_rsa = 0;
static PyTypeObject *__pyx_ptype_9SSLCrypto_dsa = 0;
static BIGNUM (*__pyx_v_9SSLCrypto_BN_NULL);
static PyObject *__pyx_k32;
static PyObject *__pyx_k33;
static PyObject *__pyx_k34;
static PyObject *__pyx_k35;
static PyObject *__pyx_k36;
static PyObject *__pyx_k37;
static PyObject *__pyx_k38;
static PyObject *__pyx_k39;
static PyObject *__pyx_k40;
static PyObject *__pyx_k41;
static PyObject *__pyx_k47;
static PyObject *__pyx_k48;
static PyObject *__pyx_k49;
static PyObject *__pyx_k50;
static PyObject *__pyx_k51;
static PyObject *__pyx_k63;
static PyObject *__pyx_k64;
static PyObject *__pyx_k65;
static PyObject *__pyx_k66;
static PyObject *__pyx_k67;
static PyObject *__pyx_k68;
static PyObject *__pyx_k70;
static PyObject *__pyx_k72;
static PyObject *__pyx_k73;
static PyObject *__pyx_k74;
static PyObject *__pyx_k75;
static PyObject *__pyx_k76;
static PyObject *__pyx_k77;
__PYX_EXTERN_C DL_EXPORT(void) (callback(int ,int ,void (*))); /*proto*/
__PYX_EXTERN_C DL_EXPORT(PyObject) *(bn2pyLong(BIGNUM (*))); /*proto*/
__PYX_EXTERN_C DL_EXPORT(BIGNUM) (*(pyLong2bn(PyObject *))); /*proto*/
__PYX_EXTERN_C void (_c_die(void)); /*proto*/

/* Implementation of SSLCrypto */

static char (__pyx_k11[]) = "Attempt to import invalid key";
static char (__pyx_k13[]) = "Cannot decrypt - private key not present";
static char (__pyx_k15[]) = "Key object has no private key";
static char (__pyx_k17[]) = "Ciphertext was not produced with SSLCrypto";
static char (__pyx_k19[]) = "Signature text was not produced with SSLCrypto";
static char (__pyx_k21[]) = "Invalid k parameter for ElGamal operation";
static char (__pyx_k22[]) = "0.2.3";
static char (__pyx_k31[]) = "93B4EA988D8FDDC186FFB7DC90A6C08F4DF435C93402849236C3FAB4D27C7026C1D4DCB2602646DEC9751E763DBA37BDF8FF9406AD9E530EE5DB382F413001AEB06A53ED9027D831179727B0865A8918DA3EDBEBCF9B14ED44CE6CBACED4BB1BDB7F1447E6CC254B332051512BD7AF426FB8F401378CD2BF5983CA01C64B92ECF032EA15D1721D03F482D7CE6E74FEF6D55E702F46980C82B5A84031900B1C9E59E7C97FBEC7E8F323A97A7E36CC88BE0F1D45B7FF585AC54BD407B22B4154AACC8F6D7EBF48E1D814CC5ED20F8037E0A79715EEF29BE32806A1D58BB7C5DA76F550AA3D8A1FBFF0EB19CCB1A313D55CDA56C9EC2EF29632387FE8D76E3C0468043E8F663F4860EE12BF2D5B0B7474D6E694F91E6DBE115974A3926F12FEE5E438777CB6A932DF8CD8BEC4D073B931BA3BC832B68D9DD300741FA7BF8AFC47ED2576F6936BA424663AAB639C5AE4F5683423B4742BF1C978238F16CBE39D652DE3FDB8BEFC848AD922222E04A4037C0713EB57A81A23F0C73473FC646CEA306B4BCBC8862F8385DDFA9D4B7FA2C087E879683303ED5BDD3A062B3CF5B3A278A66D2A13F83F44F82DDF310EE074AB6A364597E899A0255DC164F31CC50846851DF9AB48195DED7EA1B1D510BD7EE74D73FAF36BC31ECFA268359046F4EB879F924009438B481C6CD7889A002ED5EE382BC9190DA6FC026E479558E4475677E9AA9E3050E2765694DFC81F56E880B96E7160C980DD98EDD3DFFFFFFFFFFFFFFFFF";
static char (__pyx_k53[]) = "\n    key - simple crypto API object.<br><br>\n    \n    This may well be the only crypto class for Python that you\'ll ever need.\n    Think of this class, and the ezPyCrypto module, as \'cryptography for\n    the rest of us\'.<br><br>\n    \n    Designed to strike the optimal balance between ease of use, features\n    and performance.<br><br>\n    \n    Basic High-level methods:\n    <ul>\n     <li>encString - encrypt a string</li>\n     <li>decString - decrypt a string</li>\n     <li>encStringToAscii - encrypt a string to a printable, mailable format</li>\n     <li>decStringFromAscii - decrypt an ascii-format encrypted string<br><br></li>\n\n     <li>signString - produce ascii-format signature of a string</li>\n     <li>verifyString - verify a string against a signature<br><br></li>\n\n     <li>importKey - import public key (and possibly private key too)</li>\n     <li>exportKey - export public key only, as printable mailable string</li>\n     <li>exportKeyPrivate - same, but export private key as well</li>\n     <li>makeNewKeys - generate a new, random private/public key pair</li>\n    </ul>\n\n    Middle-level (stream-oriented) methods:\n    <ul>\n     <li>encStart - start a stream encryption session</li>\n     <li>encNext - encrypt another piece of data</li>\n     <li>encEnd} - finalise stream encryption session</li>\n     <li>decStart} - start a stream decryption session</li>\n     <li>decNext} - decrypt the next piece of available data</li>\n     <li>decEnd} - finalise stream decryption session</li>\n     </ul>\n\n    Low-level methods:<ul>\n    <li>refer to the source code</li>\n    </ul>\n    ";
static char (__pyx_k61[]) = "w@8.~Z4(";
static char (__pyx_k62[]) = "";
static char (__pyx_k69[]) = "";
static char (__pyx_k71[]) = "$Id: number.py,v 1.13 2003/04/04 18:21:07 akuchling Exp $";
static char (__pyx_k88[]) = "(0|-?[1-9][0-9]*)e";
static char (__pyx_k89[]) = "(0|[1-9][0-9]*):";

static PyObject *__pyx_n_base64;
static PyObject *__pyx_n_zlib;
static PyObject *__pyx_n_md5;
static PyObject *__pyx_n_sha;
static PyObject *__pyx_n_types;
static PyObject *__pyx_n_traceback;
static PyObject *__pyx_n_struct;
static PyObject *__pyx_n_random;
static PyObject *__pyx_n_math;
static PyObject *__pyx_n_CryptoKeyError;
static PyObject *__pyx_n_CryptoCannotDecrypt;
static PyObject *__pyx_n_CryptoNoPrivateKey;
static PyObject *__pyx_n_CryptoInvalidCiphertext;
static PyObject *__pyx_n_CryptoInvalidSignature;
static PyObject *__pyx_n_CryptoInvalidElGamalK;
static PyObject *__pyx_n__True;
static PyObject *__pyx_n__False;
static PyObject *__pyx_n_version;
static PyObject *__pyx_n_hardPrimes;
static PyObject *__pyx_n_ElGamal;
static PyObject *__pyx_n_key;
static PyObject *__pyx_n_rndfunc;
static PyObject *__pyx_n___revision__;
static PyObject *__pyx_n_size;
static PyObject *__pyx_n_GCD;
static PyObject *__pyx_n_inverse;
static PyObject *__pyx_n_long_to_bytes;
static PyObject *__pyx_n_bytes_to_long;
static PyObject *__pyx_n_genprime;
static PyObject *__pyx_n_genrandom;
static PyObject *__pyx_n_randomseed;
static PyObject *__pyx_n__exctest;
static PyObject *__pyx_n__die;
static PyObject *__pyx_n_IntType;
static PyObject *__pyx_n_LongType;
static PyObject *__pyx_n_StringType;
static PyObject *__pyx_n_ListType;
static PyObject *__pyx_n_TupleType;
static PyObject *__pyx_n_DictType;
static PyObject *__pyx_n_re;
static PyObject *__pyx_n_StringIO;
static PyObject *__pyx_n_int_filter;
static PyObject *__pyx_n_string_filter;
static PyObject *__pyx_n_decode_int;
static PyObject *__pyx_n_decode_string;
static PyObject *__pyx_n_decode_list;
static PyObject *__pyx_n_decode_dict;
static PyObject *__pyx_n_bdecode_rec;
static PyObject *__pyx_n_bdecode;
static PyObject *__pyx_n_bencode_rec;
static PyObject *__pyx_n_bencode;
static PyObject *__pyx_n_Exception;
static PyObject *__pyx_n_long;
static PyObject *__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199FFFFFFFFFFFFFFFF;
static PyObject *__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF;
static PyObject *__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF;
static PyObject *__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF;
static PyObject *__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF;
static PyObject *__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C93402849236C3FAB4D27C7026C1D4DCB2602646DEC9751E763DBA37BDF8FF9406AD9E530EE5DB382F413001AEB06A53ED9027D831179727B0865A8918DA3EDBEBCF9B14ED44CE6CBACED4BB1BDB7F1447E6CC254B332051512BD7AF426FB8F401378CD2BF5983CA01C64B92ECF032EA15D1721D03F482D7CE6E74FEF6D55E702F46980C82B5A84031900B1C9E59E7C97FBEC7E8F323A97A7E36CC88BE0F1D45B7FF585AC54BD407B22B4154AACC8F6D7EBF48E1D814CC5ED20F8037E0A79715EEF29BE32806A1D58BB7C5DA76F550AA3D8A1FBFF0EB19CCB1A313D55CDA56C9EC2EF29632387FE8D76E3C0468043E8F663F4860EE12BF2D5B0B7474D6E694F91E6DCC4024FFFFFFFFFFFFFFFF;
static PyObject *__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9;
static PyObject *__pyx_n_keydata;
static PyObject *__pyx_n___init__;
static PyObject *__pyx_n_generateKey;
static PyObject *__pyx_n_genk;
static PyObject *__pyx_n_construct;
static PyObject *__pyx_n___getstate__;
static PyObject *__pyx_n___setstate__;
static PyObject *__pyx_n_encrypt;
static PyObject *__pyx_n_decrypt;
static PyObject *__pyx_n_sign;
static PyObject *__pyx_n_verify;
static PyObject *__pyx_n_importPubKey;
static PyObject *__pyx_n_importPrivKey;
static PyObject *__pyx_n_hasPrivateKey;
static PyObject *__pyx_n_pubKey;
static PyObject *__pyx_n_privKey;
static PyObject *__pyx_n_maxSize;
static PyObject *__pyx_n___eq__;
static PyObject *__pyx_n_p;
static PyObject *__pyx_n_g;
static PyObject *__pyx_n_y;
static PyObject *__pyx_n_x;
static PyObject *__pyx_n__algosPub;
static PyObject *__pyx_n__algosPub1;
static PyObject *__pyx_n__algosSes;
static PyObject *__pyx_n__algosSes1;
static PyObject *__pyx_n__algosSes2;
static PyObject *__pyx_n__algosSes3;
static PyObject *__pyx_n__passIV;
static PyObject *__pyx_n__encBuf;
static PyObject *__pyx_n_makeNewKeys;
static PyObject *__pyx_n_importKey;
static PyObject *__pyx_n_exportKey;
static PyObject *__pyx_n_exportKeyPrivate;
static PyObject *__pyx_n_encString;
static PyObject *__pyx_n_encStringToAscii;
static PyObject *__pyx_n_decString;
static PyObject *__pyx_n_decStringFromAscii;
static PyObject *__pyx_n_signString;
static PyObject *__pyx_n_verifyString;
static PyObject *__pyx_n_getSessKey;
static PyObject *__pyx_n_getSessIV;
static PyObject *__pyx_n_setSessKey;
static PyObject *__pyx_n_genSessKey;
static PyObject *__pyx_n_encStringSess;
static PyObject *__pyx_n_decStringSess;
static PyObject *__pyx_n_test;
static PyObject *__pyx_n_testAscii;
static PyObject *__pyx_n_encStart;
static PyObject *__pyx_n_encNext;
static PyObject *__pyx_n_encEnd;
static PyObject *__pyx_n_decStart;
static PyObject *__pyx_n_decNext;
static PyObject *__pyx_n_decEnd;
static PyObject *__pyx_n__wrap;
static PyObject *__pyx_n__unwrap;
static PyObject *__pyx_n__calcPubBlkSize;
static PyObject *__pyx_n__encRawPub;
static PyObject *__pyx_n__decRawPub;
static PyObject *__pyx_n__initBlkCipher;
static PyObject *__pyx_n__calcSesBlkSize;
static PyObject *__pyx_n__testPubKey;
static PyObject *__pyx_n__rawPubKey;
static PyObject *__pyx_n__rawPrivKey;
static PyObject *__pyx_n__random;
static PyObject *__pyx_n__genNewSessKey;
static PyObject *__pyx_n__setNewSessKey;
static PyObject *__pyx_n_RSA;
static PyObject *__pyx_n_Blowfish;
static PyObject *__pyx_n_cStringIO;
static PyObject *__pyx_n_compile;

static PyObject *__pyx_k11p;
static PyObject *__pyx_k13p;
static PyObject *__pyx_k15p;
static PyObject *__pyx_k17p;
static PyObject *__pyx_k19p;
static PyObject *__pyx_k21p;
static PyObject *__pyx_k22p;
static PyObject *__pyx_k31p;
static PyObject *__pyx_k53p;
static PyObject *__pyx_k71p;
static PyObject *__pyx_k88p;
static PyObject *__pyx_k89p;

static int __pyx_f_9SSLCrypto_2dh___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_9SSLCrypto_2dh___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
int __pyx_r;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":581 */
((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":582 */

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto.dh.__new__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static void __pyx_f_9SSLCrypto_2dh___dealloc__(PyObject *__pyx_v_self); /*proto*/
static char __pyx_doc_9SSLCrypto_2dh___dealloc__[] = "Destructor";
static void __pyx_f_9SSLCrypto_2dh___dealloc__(PyObject *__pyx_v_self) {
int __pyx_1;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":587 */
__pyx_1 = (((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH != 0);
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":588 */
DH_free(((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH);
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":589 */

goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto.dh.__dealloc__");
__pyx_L0:;
Py_DECREF(__pyx_v_self);
}

static PyObject *__pyx_f_9SSLCrypto_2dh_genParms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_2dh_genParms[] = "\n        <b>generateParms</b><br>\n        <br>\n        Generate random modulus for DH key generation<br>\n        <br>\n        Arguments:<ul>\n         <li><b>prime_len</b> - length of modulus (n) in bits, default 1024</li>\n         <li><b>generator</b> - g, as in pub = g^x mod n. Default 5</li>\n         <li><b>myCallback</b> - a python func for status callbacks. Must accept 2 args,\n           \'type\' and \'num\'. \'type\' is a number from 0 to 3. Default is no callback</li>\n        </ul>\n        Returns:<ul>\n         <li>None</li></ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_2dh_genParms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_prime_len = 0;
PyObject *__pyx_v_generator = 0;
PyObject *__pyx_v_myCallback = 0;
PyObject *__pyx_r;
int __pyx_1;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {"prime_len","generator","myCallback",0};
__pyx_v_prime_len = __pyx_k32;
__pyx_v_generator = __pyx_k33;
__pyx_v_myCallback = __pyx_k34;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_prime_len, &__pyx_v_generator, &__pyx_v_myCallback)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_prime_len);
Py_INCREF(__pyx_v_generator);
Py_INCREF(__pyx_v_myCallback);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":607 */
__pyx_1 = (((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH != 0);
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":608 */
DH_free(((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH);
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":609 */
__pyx_1 = PyInt_AsLong(__pyx_v_prime_len); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; goto __pyx_L1;}
__pyx_2 = PyInt_AsLong(__pyx_v_generator); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; goto __pyx_L1;}
((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH = DH_generate_parameters(__pyx_1,__pyx_2,callback,((void (*))__pyx_v_myCallback));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":612 */
callback((-1),0,((void (*))__pyx_v_myCallback));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":613 */
__pyx_3 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH->g); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L1;}
__pyx_4 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH->p); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L1;}
__pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4);
__pyx_3 = 0;
__pyx_4 = 0;
__pyx_r = __pyx_5;
__pyx_5 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.dh.genParms");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_prime_len);
Py_DECREF(__pyx_v_generator);
Py_DECREF(__pyx_v_myCallback);
return __pyx_r;
}

static PyObject *__pyx_n_type;

static PyObject *__pyx_f_9SSLCrypto_2dh_importParms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_2dh_importParms[] = "\n        <b>importParms</b><br>\n        <br>\n        Imports DH key generation parameters into this DH object.<br>\n        <br>\n        Arguments - choice of:<ul>\n         <li><b>tuple</b> - (generator, modulus)<br>\n             <b>OR:</b><br><li>\n         <li><b>generator</b></li>\n         <li><b>modulus</b> (as separate arguments)</ul>\n    \n        Returns:<ul>\n         <li>None</li></ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_2dh_importParms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_generator = 0;
PyObject *__pyx_v_modulus = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"generator","modulus",0};
__pyx_v_modulus = __pyx_k35;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_generator, &__pyx_v_modulus)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_generator);
Py_INCREF(__pyx_v_modulus);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":632 */
((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH = DH_new();

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":634 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;}
Py_INCREF(__pyx_v_generator);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_generator);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_5 = __pyx_3 == __pyx_2;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":635 */
__pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
__pyx_4 = PyObject_GetItem(__pyx_v_generator, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_modulus);
__pyx_v_modulus = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":636 */
__pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;}
__pyx_2 = PyObject_GetItem(__pyx_v_generator, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_generator);
__pyx_v_generator = __pyx_2;
__pyx_2 = 0;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":637 */
((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH->g = pyLong2bn(__pyx_v_generator);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":638 */
((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH->p = pyLong2bn(__pyx_v_modulus);

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.dh.importParms");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_generator);
Py_DECREF(__pyx_v_modulus);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_2dh_exportParms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_2dh_exportParms[] = "\n        <b>exportParms</b><br>\n        <br>\n        Returns the DH key generation parameters required for a peer to generate pub keys<br>\n        <br>\n        Arguments:<ul>\n         <li><b>None</b></li>\n        </ul>\n        Returns:<ul>\n         <li><b>tuple</b> - (generator, modulus)</ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_2dh_exportParms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":653 */
__pyx_1 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH->g); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;}
__pyx_2 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH->p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.dh.exportParms");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_k90p;

static char (__pyx_k90[]) = "Can't generate public key: DH object has no generation parameters";

static PyObject *__pyx_f_9SSLCrypto_2dh_genPubKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_2dh_genPubKey[] = "\n        <b>genPubKey</b><br>\n        <br>\n        Generates a public key from generated (or imported) parameters<br>\n        <br>\n        Arguments:<ul>\n         <li>None</li>\n         </ul>\n        Returns:<ul>\n         <li><b>public key</b>, as a long int\n         </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_2dh_genPubKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":670 */
__pyx_1 = (((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH == 0);
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":671 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; goto __pyx_L1;}
Py_INCREF(__pyx_k90p);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k90p);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__Pyx_Raise(__pyx_4, 0, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":673 */
DH_generate_key(((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":674 */
__pyx_2 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH->pub_key); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.dh.genPubKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_k91p;

static char (__pyx_k91[]) = "DH object has no public or private keys";

static PyObject *__pyx_f_9SSLCrypto_2dh_privKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_2dh_privKey[] = "\n        <b>privKey</b><br>\n        <br>\n        Returns the private key as a long int\n        ";
static PyObject *__pyx_f_9SSLCrypto_2dh_privKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":683 */
__pyx_1 = (((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH == 0);
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":684 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
Py_INCREF(__pyx_k91p);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k91p);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__Pyx_Raise(__pyx_4, 0, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":685 */
__pyx_2 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH->priv_key); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.dh.privKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_k92p;
static PyObject *__pyx_k93p;

static char (__pyx_k92[]) = "Can't generate public key: DH object has no generation parameters";
static char (__pyx_k93[]) = "Can't generate session key: DH object has no public key";

static PyObject *__pyx_f_9SSLCrypto_2dh_genSessKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_2dh_genSessKey[] = "\n        <br>genSessKey</b><br><br>\n    \n        Calculates and returns the session key.<br><br>\n    \n        Arguments:<ul>\n          <li><b>peerKey</b> - peer\'s public key, as returned from <b>genPubKey</b></li>\n          </ul>\n        Returns:<ul>\n          <li>None</li>\n          </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_2dh_genSessKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_peerKey = 0;
PyObject *__pyx_v_keySize;
BIGNUM (*__pyx_v_peerKeyBN);
char (*__pyx_v_key);
PyObject *__pyx_v_s;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"peerKey",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_peerKey)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_peerKey);
__pyx_v_keySize = Py_None; Py_INCREF(Py_None);
__pyx_v_s = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":701 */
__pyx_1 = (((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH == 0);
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":702 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; goto __pyx_L1;}
Py_INCREF(__pyx_k92p);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k92p);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__Pyx_Raise(__pyx_4, 0, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":703 */
__pyx_1 = (((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH->pub_key == 0);
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":704 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; goto __pyx_L1;}
Py_INCREF(__pyx_k93p);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k93p);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__Pyx_Raise(__pyx_4, 0, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; goto __pyx_L1;}
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":710 */
__pyx_v_peerKeyBN = pyLong2bn(__pyx_v_peerKey);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":711 */
__pyx_2 = PyInt_FromLong(DH_size(((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; goto __pyx_L1;}
Py_DECREF(__pyx_v_keySize);
__pyx_v_keySize = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":712 */
__pyx_1 = PyInt_AsLong(__pyx_v_keySize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; goto __pyx_L1;}
__pyx_v_key = ((char (*))malloc(__pyx_1));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":714 */
DH_compute_key(((unsigned char (*))__pyx_v_key),__pyx_v_peerKeyBN,((struct __pyx_obj_9SSLCrypto_dh *)__pyx_v_self)->myDH);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":716 */
BN_free(__pyx_v_peerKeyBN);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":717 */
__pyx_1 = PyInt_AsLong(__pyx_v_keySize); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; goto __pyx_L1;}
__pyx_3 = PyString_FromStringAndSize(__pyx_v_key,__pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; goto __pyx_L1;}
Py_DECREF(__pyx_v_s);
__pyx_v_s = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":718 */
free(__pyx_v_key);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":720 */
Py_INCREF(__pyx_v_s);
__pyx_r = __pyx_v_s;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.dh.genSessKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_keySize);
Py_DECREF(__pyx_v_s);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_peerKey);
return __pyx_r;
}

static PyObject *__pyx_n_setKey;
static PyObject *__pyx_n_setIV;

static int __pyx_f_9SSLCrypto_8blowfish___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_9SSLCrypto_8blowfish___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_key = 0;
PyObject *__pyx_v_iv = 0;
int __pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"key","iv",0};
__pyx_v_key = __pyx_k36;
__pyx_v_iv = __pyx_k37;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OO", __pyx_argnames, &__pyx_v_key, &__pyx_v_iv)) return -1;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_key);
Py_INCREF(__pyx_v_iv);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":746 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_setKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; goto __pyx_L1;}
Py_INCREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_key);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":747 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_setIV); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; goto __pyx_L1;}
Py_INCREF(__pyx_v_iv);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_iv);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":750 */
((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->counter = 0;

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.blowfish.__new__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_key);
Py_DECREF(__pyx_v_iv);
return __pyx_r;
}

static void __pyx_f_9SSLCrypto_8blowfish___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_f_9SSLCrypto_8blowfish___dealloc__(PyObject *__pyx_v_self) {
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":754 */

goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto.blowfish.__dealloc__");
__pyx_L0:;
Py_DECREF(__pyx_v_self);
}

static PyObject *__pyx_n_len;

static PyObject *__pyx_k94p;

static char (__pyx_k94[]) = "Key length is zero";

static PyObject *__pyx_f_9SSLCrypto_8blowfish_setKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_8blowfish_setKey[] = "\n        <b>setKey</b><br><br>\n    \n        Sets the session key for the Blowfish cipher object.<br><br>\n    \n        Arguments:<ul>\n          <li><b>key</b> - blowfish encryption key, as a string. For acceptable\n              security, this should be at least 16 characters</li>\n          <li><b>iv</b> - cipher <b>initial value</b>, as used in the chaining feedback.<br>\n              Not essential, default nothing</li>\n          </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_8blowfish_setKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_key = 0;
PyObject *__pyx_v_iv = 0;
char (*__pyx_v_keyBuf);
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
char (*__pyx_5);
static char *__pyx_argnames[] = {"key","iv",0};
__pyx_v_iv = __pyx_k38;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_key, &__pyx_v_iv)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_key);
Py_INCREF(__pyx_v_iv);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":773 */
if (PyObject_Cmp(__pyx_v_key, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; goto __pyx_L1;}
__pyx_1 = __pyx_1 == 0;
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":774 */
((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->key = ((char (*))0);
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":776 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;}
Py_INCREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_key);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->keylen = __pyx_1;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":777 */
__pyx_1 = (((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->keylen == 0);
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":778 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; goto __pyx_L1;}
Py_INCREF(__pyx_k94p);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k94p);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__Pyx_Raise(__pyx_4, 0, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; goto __pyx_L1;}
goto __pyx_L3;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":780 */
((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->key = ((char (*))malloc(((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->keylen));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":781 */
__pyx_5 = PyString_AsString(__pyx_v_key); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; goto __pyx_L1;}
__pyx_v_keyBuf = __pyx_5;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":782 */
memcpy(((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->key,__pyx_v_keyBuf,((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->keylen);
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":785 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_setIV); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;}
Py_INCREF(__pyx_v_iv);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_iv);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.blowfish.setKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_key);
Py_DECREF(__pyx_v_iv);
return __pyx_r;
}

static PyObject *__pyx_k95p;

static char (__pyx_k95[]) = "Blowfish IV length=%d, should be 8";

static PyObject *__pyx_f_9SSLCrypto_8blowfish_setIV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_8blowfish_setIV[] = "\n        <b>setIV</b> - sets the cipher chaining <b>initial value</b><br><br>\n    \n        Arguments:<ul>\n          <li><b>iv</b> - 8-byte initial value, as a python string</li>\n          </ul>\n        Returns:<ul>\n          <li>None</li>\n          </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_8blowfish_setIV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_iv = 0;
char (*__pyx_v_ivBuf);
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
char (*__pyx_6);
static char *__pyx_argnames[] = {"iv",0};
__pyx_v_iv = __pyx_k39;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_iv)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_iv);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":802 */
if (PyObject_Cmp(__pyx_v_iv, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; goto __pyx_L1;}
__pyx_1 = __pyx_1 == 0;
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":803 */
memset(((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->iv,0,8);
goto __pyx_L2;
}
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;}
Py_INCREF(__pyx_v_iv);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_iv);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyInt_FromLong(8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_4, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;}
__pyx_1 = __pyx_1 != 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":805 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; goto __pyx_L1;}
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;}
Py_INCREF(__pyx_v_iv);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_iv);
__pyx_5 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_4 = PyNumber_Remainder(__pyx_k95p, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 806; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
__pyx_4 = 0;
__pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__Pyx_Raise(__pyx_5, 0, 0);
Py_DECREF(__pyx_5); __pyx_5 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; goto __pyx_L1;}
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":808 */
__pyx_6 = PyString_AsString(__pyx_v_iv); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; goto __pyx_L1;}
__pyx_v_ivBuf = __pyx_6;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":809 */
memcpy(((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->iv,__pyx_v_ivBuf,8);
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":811 */
((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->counter = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":812 */
BF_set_key((&((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->keyStruct),((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->keylen,((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->key);

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.blowfish.setIV");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_iv);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_8blowfish_encrypt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_8blowfish_encrypt[] = "\n        <b>encrypt</b> - encrypt a block of data<br><br>\n    \n        Arguments:<ul>\n          <li><b>inbuf</b> - plaintext to be encrypted, as a string</li>\n          </ul>\n    \n        Returns:<ul>\n          <li>Encrypted ciphertext, as a string</li>\n          </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_8blowfish_encrypt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_inbuf = 0;
char (*__pyx_v_inbufC);
char (*__pyx_v_outbufC);
int __pyx_v_blklen;
PyObject *__pyx_v_outbuf;
PyObject *__pyx_r;
char (*__pyx_1);
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"inbuf",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_inbuf)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_inbuf);
__pyx_v_outbuf = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":831 */
__pyx_1 = PyString_AsString(__pyx_v_inbuf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;}
__pyx_v_inbufC = __pyx_1;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":832 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
Py_INCREF(__pyx_v_inbuf);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_inbuf);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_v_blklen = __pyx_5;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":834 */
__pyx_v_outbufC = ((char (*))malloc(__pyx_v_blklen));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":837 */
BF_cfb64_encrypt(__pyx_v_inbufC,__pyx_v_outbufC,__pyx_v_blklen,(&((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->keyStruct),((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->iv,(&((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->counter),BF_ENCRYPT);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":840 */
__pyx_2 = PyString_FromStringAndSize(__pyx_v_outbufC,__pyx_v_blklen); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; goto __pyx_L1;}
Py_DECREF(__pyx_v_outbuf);
__pyx_v_outbuf = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":841 */
free(__pyx_v_outbufC);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":842 */
Py_INCREF(__pyx_v_outbuf);
__pyx_r = __pyx_v_outbuf;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.blowfish.encrypt");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_outbuf);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_inbuf);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_8blowfish_decrypt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_8blowfish_decrypt[] = "\n        <b>decrypt</b> - decrypt a block of data<br><br>\n    \n        Arguments:<ul>\n          <li><b>inbuf</b> - ciphertext to be decrypted, as a string</li>\n          </ul>\n    \n        Returns:<ul>\n          <li>Decrypted plaintext, as a string</li>\n          </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_8blowfish_decrypt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_inbuf = 0;
char (*__pyx_v_inbufC);
char (*__pyx_v_outbufC);
int __pyx_v_blklen;
PyObject *__pyx_v_outbuf;
PyObject *__pyx_r;
char (*__pyx_1);
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"inbuf",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_inbuf)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_inbuf);
__pyx_v_outbuf = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":861 */
__pyx_1 = PyString_AsString(__pyx_v_inbuf); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; goto __pyx_L1;}
__pyx_v_inbufC = __pyx_1;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":862 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
Py_INCREF(__pyx_v_inbuf);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_inbuf);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_v_blklen = __pyx_5;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":863 */
__pyx_v_outbufC = ((char (*))malloc(__pyx_v_blklen));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":865 */
BF_cfb64_encrypt(__pyx_v_inbufC,__pyx_v_outbufC,__pyx_v_blklen,(&((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->keyStruct),((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->iv,(&((struct __pyx_obj_9SSLCrypto_blowfish *)__pyx_v_self)->counter),BF_DECRYPT);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":868 */
__pyx_2 = PyString_FromStringAndSize(__pyx_v_outbufC,__pyx_v_blklen); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; goto __pyx_L1;}
Py_DECREF(__pyx_v_outbuf);
__pyx_v_outbuf = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":869 */
free(__pyx_v_outbufC);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":870 */
Py_INCREF(__pyx_v_outbuf);
__pyx_r = __pyx_v_outbuf;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.blowfish.decrypt");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_outbuf);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_inbuf);
return __pyx_r;
}

static int __pyx_f_9SSLCrypto_3rsa___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_9SSLCrypto_3rsa___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
RSA (*__pyx_v_rsaC);
int __pyx_r;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":891 */
__pyx_v_rsaC = RSA_new();

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":892 */
((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj = __pyx_v_rsaC;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":893 */
((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->bnCtx = BN_CTX_new();

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":894 */
BN_CTX_init(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->bnCtx);

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto.rsa.__new__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static void __pyx_f_9SSLCrypto_3rsa___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_f_9SSLCrypto_3rsa___dealloc__(PyObject *__pyx_v_self) {
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":899 */
BN_CTX_free(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->bnCtx);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":900 */
RSA_free(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj);

goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto.rsa.__dealloc__");
__pyx_L0:;
Py_DECREF(__pyx_v_self);
}

static PyObject *__pyx_n_get;
static PyObject *__pyx_n_e;
static PyObject *__pyx_n_myCallback;


static PyObject *__pyx_f_9SSLCrypto_3rsa_generateKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_generateKey[] = "\n        Generate a fresh RSA keypair<br><br>\n    \n        Arguments:\n         - bits</b> - length of required key in bits, >=1024 recommended, default 1024\n    \n        Keywords:\n         - e - exponent for key generation, default 5\n         - myCallback - a Python callback function which accepts\n           2 arguments - level and num. Default None\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_generateKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_nbits = 0;
PyObject *__pyx_v_kw = 0;
PyObject *__pyx_v_e;
PyObject *__pyx_v_myCallback;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
unsigned long __pyx_5;
static char *__pyx_argnames[] = {"nbits",0};
__pyx_v_nbits = __pyx_k40;
if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 1, 0, &__pyx_v_kw) < 0) return 0;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_nbits)) {
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
Py_XDECREF(__pyx_v_kw);
return 0;
}
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_nbits);
__pyx_v_e = Py_None; Py_INCREF(Py_None);
__pyx_v_myCallback = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":916 */
__pyx_1 = PyObject_GetAttr(__pyx_v_kw, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
Py_INCREF(__pyx_n_e);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_e);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_e);
__pyx_v_e = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":917 */
__pyx_1 = PyObject_GetAttr(__pyx_v_kw, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; goto __pyx_L1;}
Py_INCREF(__pyx_n_myCallback);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_myCallback);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_3, 1, Py_None);
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_myCallback);
__pyx_v_myCallback = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":920 */
__pyx_4 = (((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj != 0);
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":921 */
RSA_free(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj);
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":924 */
__pyx_4 = PyInt_AsLong(__pyx_v_nbits); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; goto __pyx_L1;}
__pyx_5 = PyInt_AsUnsignedLongMask(__pyx_v_e); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; goto __pyx_L1;}
((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj = RSA_generate_key(__pyx_4,__pyx_5,callback,((void (*))__pyx_v_myCallback));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":927 */
RSA_blinding_on(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj,((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->bnCtx);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":929 */
callback((-1),0,((void (*))__pyx_v_myCallback));

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.rsa.generateKey");
__pyx_r = 0;
__pyx_L0:;
Py_XDECREF(__pyx_v_kw);
Py_DECREF(__pyx_v_e);
Py_DECREF(__pyx_v_myCallback);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_nbits);
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3rsa_pubKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_pubKey[] = "\n        Returns the public key for this object.<br><br>\n    \n        Arguments:\n          - None\n    \n        Returns:\n          - Public key, as a tuple (e, n) (refer: Applied Cryptography)\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_pubKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":943 */
__pyx_1 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->e); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; goto __pyx_L1;}
__pyx_2 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 944; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.rsa.pubKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3rsa_privKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_privKey[] = "\n        Returns the public key for this object.<br><br>\n    \n        Arguments:<ul>\n        <li>None</li>\n        </ul>\n    \n        Returns:<ul>\n        <li><b>Public and Private key</b>, as a tuple (e, n, d) (refer: Applied Cryptography)</li>\n        </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_privKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":961 */
__pyx_1 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->e); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; goto __pyx_L1;}
__pyx_2 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->n); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; goto __pyx_L1;}
__pyx_3 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->d); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; goto __pyx_L1;}
__pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2);
PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_3 = 0;
__pyx_r = __pyx_4;
__pyx_4 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.rsa.privKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3rsa_rawprimes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_rawprimes[] = "\n        Returns the p and q for this RSA key.<br><br>\n    \n        Arguments:<ul>\n        <li>None</li>\n        </ul>\n    \n        Returns:<ul>\n        <li><b>p and q as a tuple (refer: Applied Cryptography)</li>\n        </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_rawprimes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":980 */
__pyx_1 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; goto __pyx_L1;}
__pyx_2 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->q); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.rsa.rawprimes");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_k98p;

static char (__pyx_k98[]) = "Invalid public key parameters";

static PyObject *__pyx_f_9SSLCrypto_3rsa_importPubKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_importPubKey[] = "\n        Import someone else\'s public key\n    \n        Arguments:\n          - (e, n), a tuple (as returned by pubKey()),\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_importPubKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_parms = 0;
PyObject *__pyx_v_e;
PyObject *__pyx_v_n;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
int __pyx_6;
static char *__pyx_argnames[] = {"parms",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_parms)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_parms);
__pyx_v_e = Py_None; Py_INCREF(Py_None);
__pyx_v_n = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":993 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
Py_INCREF(__pyx_v_parms);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_parms);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
__pyx_4 = PyList_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
__pyx_4 = 0;
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_1 = PyList_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
PyList_SET_ITEM(__pyx_1, 0, __pyx_2);
PyList_SET_ITEM(__pyx_1, 1, __pyx_4);
__pyx_2 = 0;
__pyx_4 = 0;
__pyx_6 = PySequence_Contains(__pyx_1, __pyx_3); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; goto __pyx_L1;}
__pyx_6 = !__pyx_6;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_6) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":994 */
__pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; goto __pyx_L1;}
Py_INCREF(__pyx_k98p);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k98p);
__pyx_4 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__Pyx_Raise(__pyx_4, 0, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":995 */
__pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;}
__pyx_1 = PyObject_GetItem(__pyx_v_parms, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_e);
__pyx_v_e = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":996 */
__pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;}
__pyx_2 = PyObject_GetItem(__pyx_v_parms, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_v_n);
__pyx_v_n = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1001 */
((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->e = pyLong2bn(__pyx_v_e);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1002 */
((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->n = pyLong2bn(__pyx_v_n);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1003 */
((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->d = ((BIGNUM (*))0);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1006 */
RSA_blinding_on(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj,((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->bnCtx);

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.rsa.importPubKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_e);
Py_DECREF(__pyx_v_n);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_parms);
return __pyx_r;
}

static PyObject *__pyx_k99p;

static char (__pyx_k99[]) = "Invalid private key parameters";

static PyObject *__pyx_f_9SSLCrypto_3rsa_importPrivKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_importPrivKey[] = "\n        importPubKey - import private key parameters\n    \n        Arguments:\n         - (e, n, d), as a tuple (as returned by privKey())\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_importPrivKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_parms = 0;
PyObject *__pyx_v_e;
PyObject *__pyx_v_n;
PyObject *__pyx_v_d;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
int __pyx_6;
static char *__pyx_argnames[] = {"parms",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_parms)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_parms);
__pyx_v_e = Py_None; Py_INCREF(Py_None);
__pyx_v_n = Py_None; Py_INCREF(Py_None);
__pyx_v_d = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1018 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
Py_INCREF(__pyx_v_parms);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_parms);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
__pyx_4 = PyList_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
__pyx_4 = 0;
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_1 = PyList_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
PyList_SET_ITEM(__pyx_1, 0, __pyx_2);
PyList_SET_ITEM(__pyx_1, 1, __pyx_4);
__pyx_2 = 0;
__pyx_4 = 0;
__pyx_6 = PySequence_Contains(__pyx_1, __pyx_3); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; goto __pyx_L1;}
__pyx_6 = !__pyx_6;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_6) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1019 */
__pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; goto __pyx_L1;}
Py_INCREF(__pyx_k99p);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k99p);
__pyx_4 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__Pyx_Raise(__pyx_4, 0, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1020 */
__pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; goto __pyx_L1;}
__pyx_1 = PyObject_GetItem(__pyx_v_parms, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_e);
__pyx_v_e = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1021 */
__pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; goto __pyx_L1;}
__pyx_2 = PyObject_GetItem(__pyx_v_parms, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_v_n);
__pyx_v_n = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1022 */
__pyx_4 = PyInt_FromLong(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; goto __pyx_L1;}
__pyx_3 = PyObject_GetItem(__pyx_v_parms, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_v_d);
__pyx_v_d = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1028 */
((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->e = pyLong2bn(__pyx_v_e);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1029 */
((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->n = pyLong2bn(__pyx_v_n);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1030 */
((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->d = pyLong2bn(__pyx_v_d);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1033 */
RSA_blinding_on(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj,((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->bnCtx);

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.rsa.importPrivKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_e);
Py_DECREF(__pyx_v_n);
Py_DECREF(__pyx_v_d);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_parms);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3rsa_hasPrivateKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_hasPrivateKey[] = "\n        Returns <b>True</b> if private key is present in this key object (and therefore the\n        key object is capable of decryption), or <b>False</b> if not.\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_hasPrivateKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1041 */
__pyx_1 = (((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->d == ((BIGNUM (*))0));
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1042 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1044 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("SSLCrypto.rsa.hasPrivateKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_k100p;

static char (__pyx_k100[]) = "Plaintext exceeds maximum %d bytes";

static PyObject *__pyx_f_9SSLCrypto_3rsa_encrypt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_encrypt[] = "\n        Encrypts a block of data.<br><br>\n    \n        Arguments:<ul>\n        <li><b>plain</b> - plaintext to be encrypted, as a string</li>\n        </ul>\n    \n        Returns:<ul>\n        <li><b>ciphertext</b> - encrypted data, as a string</b></li>\n        </ul>\n    \n        <b>Note:</b> This method has a strict limit as to the size of the block which can\n        be encrypted. To determine the limit, call the <b>maxSize</b> method.\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_encrypt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_pPlain = 0;
char (*__pyx_v_cPlain);
int __pyx_v_cPlainLen;
char (*__pyx_v_cCipher);
int __pyx_v_cCipherLen;
int __pyx_v_cRsaSize;
PyObject *__pyx_v_pCipher;
PyObject *__pyx_r;
char (*__pyx_1);
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
PyObject *__pyx_6 = 0;
static char *__pyx_argnames[] = {"pPlain",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pPlain)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_pPlain);
__pyx_v_pCipher = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1068 */
__pyx_v_cRsaSize = RSA_size(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1070 */
__pyx_1 = PyString_AsString(__pyx_v_pPlain); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; goto __pyx_L1;}
__pyx_v_cPlain = __pyx_1;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1071 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;}
Py_INCREF(__pyx_v_pPlain);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_pPlain);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_v_cPlainLen = __pyx_5;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1075 */
__pyx_2 = PyInt_FromLong(__pyx_v_cPlainLen); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_maxSize); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; goto __pyx_L1;}
__pyx_4 = PyTuple_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; goto __pyx_L1;}
__pyx_6 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (PyObject_Cmp(__pyx_2, __pyx_6, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; goto __pyx_L1;}
__pyx_5 = __pyx_5 > 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1076 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_maxSize); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
__pyx_6 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_4 = PyNumber_Remainder(__pyx_k100p, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_4);
__pyx_4 = 0;
__pyx_6 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__Pyx_Raise(__pyx_6, 0, 0);
Py_DECREF(__pyx_6); __pyx_6 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1078 */
__pyx_v_cCipher = ((char (*))malloc(__pyx_v_cRsaSize));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1080 */
__pyx_v_cCipherLen = RSA_public_encrypt(__pyx_v_cPlainLen,((unsigned char (*))__pyx_v_cPlain),((unsigned char (*))__pyx_v_cCipher),((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj,RSA_PKCS1_PADDING);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1085 */
__pyx_4 = PyString_FromStringAndSize(__pyx_v_cCipher,__pyx_v_cCipherLen); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; goto __pyx_L1;}
Py_DECREF(__pyx_v_pCipher);
__pyx_v_pCipher = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1087 */
free(((char (*))__pyx_v_cCipher));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1088 */
Py_INCREF(__pyx_v_pCipher);
__pyx_r = __pyx_v_pCipher;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("SSLCrypto.rsa.encrypt");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_pCipher);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_pPlain);
return __pyx_r;
}

static PyObject *__pyx_k101p;

static char (__pyx_k101[]) = "Private key not present";

static PyObject *__pyx_f_9SSLCrypto_3rsa_decrypt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_decrypt[] = "\n        decrypt a previously encrypted block<br><br>\n    \n        Arguments:<ul>\n        <li><b>cipher</b> - ciphertext to be decrypted, as a string</li>\n        </ul>\n        \n        Returns:<ul>\n        <li><b>plaintext</b> - decrypted asa python string</li>\n        </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_decrypt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_pCipher = 0;
char (*__pyx_v_cPlain);
int __pyx_v_cPlainLen;
char (*__pyx_v_cCipher);
int __pyx_v_cCipherLen;
PyObject *__pyx_v_pPlain;
PyObject *__pyx_r;
char (*__pyx_1);
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"pCipher",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_pCipher)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_pCipher);
__pyx_v_pPlain = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1108 */
__pyx_1 = PyString_AsString(__pyx_v_pCipher); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; goto __pyx_L1;}
__pyx_v_cCipher = __pyx_1;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1109 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
Py_INCREF(__pyx_v_pCipher);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_pCipher);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_v_cCipherLen = __pyx_5;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1111 */
__pyx_v_cPlain = ((char (*))malloc(RSA_size(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj)));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1113 */
__pyx_5 = (((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj->d == ((BIGNUM (*))0));
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1114 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_CryptoCannotDecrypt); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;}
Py_INCREF(__pyx_k101p);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k101p);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__Pyx_Raise(__pyx_4, 0, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1116 */
__pyx_v_cPlainLen = RSA_private_decrypt(__pyx_v_cCipherLen,((unsigned char (*))__pyx_v_cCipher),((unsigned char (*))__pyx_v_cPlain),((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj,RSA_PKCS1_PADDING);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1121 */
__pyx_2 = PyString_FromStringAndSize(__pyx_v_cPlain,__pyx_v_cPlainLen); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1121; goto __pyx_L1;}
Py_DECREF(__pyx_v_pPlain);
__pyx_v_pPlain = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1123 */
free(((char (*))__pyx_v_cPlain));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1124 */
Py_INCREF(__pyx_v_pPlain);
__pyx_r = __pyx_v_pPlain;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.rsa.decrypt");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_pPlain);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_pCipher);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3rsa_maxSize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_maxSize[] = "\n        Returns the maximum allowable size of plaintext strings which can\n        be encrypted\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_maxSize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1133 */
__pyx_1 = PyInt_FromLong((RSA_size(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj) - 11)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("SSLCrypto.rsa.maxSize");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3rsa_sign(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_sign[] = "\n        Signs an MD5 message digest<br><br>\n    \n        Arguments:<ul>\n        <li><b>digest</b> - MD5 digest of data, as a string</li>\n        </ul>\n    \n        Returns:<ul>\n        <li><b>signature</b>, as a MIME-friendly, base64-encoded string</li>\n        </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_sign(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_digest = 0;
char (*__pyx_v_cSigBuf);
int __pyx_v_cSigLen;
char (*__pyx_v_cDigestBuf);
int __pyx_v_cDigestLen;
PyObject *__pyx_v_pSig;
PyObject *__pyx_r;
char (*__pyx_1);
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"digest",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_digest)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_digest);
__pyx_v_pSig = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1153 */
__pyx_v_cSigBuf = ((char (*))malloc(RSA_size(((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj)));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1154 */
__pyx_1 = PyString_AsString(__pyx_v_digest); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; goto __pyx_L1;}
__pyx_v_cDigestBuf = __pyx_1;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1155 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;}
Py_INCREF(__pyx_v_digest);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_digest);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_v_cDigestLen = __pyx_5;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1157 */
RSA_sign(NID_md5,((unsigned char (*))__pyx_v_cDigestBuf),((unsigned int )__pyx_v_cDigestLen),((unsigned char (*))__pyx_v_cSigBuf),((unsigned int (*))(&__pyx_v_cSigLen)),((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1162 */
__pyx_2 = PyString_FromStringAndSize(__pyx_v_cSigBuf,__pyx_v_cSigLen); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; goto __pyx_L1;}
Py_DECREF(__pyx_v_pSig);
__pyx_v_pSig = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1163 */
free(__pyx_v_cSigBuf);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1164 */
Py_INCREF(__pyx_v_pSig);
__pyx_r = __pyx_v_pSig;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.rsa.sign");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_pSig);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_digest);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3rsa_verify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3rsa_verify[] = "\n        Verify a digest against a signature<li><li>\n    \n        Arguments:<ul>\n        <li><b>digest</b> - digest against which signature is to be checked.</b></li>\n        <li><b>signature</b> - signature as returned from the <b>sign()</b> method</li>\n        </ul>\n    \n        Returns:<ul>\n        <li><b>True</b> if signature is valid, or <b>False</b> if not.</li>\n        </ul>\n    \n        Note:<ul>\n        <li>To pass as valid, the key object must contain the same public key as was used\n            in creating the original signature</li>\n        </ul>\n        ";
static PyObject *__pyx_f_9SSLCrypto_3rsa_verify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_digest = 0;
PyObject *__pyx_v_sig = 0;
char (*__pyx_v_cSigBuf);
int __pyx_v_cSigLen;
char (*__pyx_v_cDigestBuf);
int __pyx_v_cDigestLen;
int __pyx_v_result;
PyObject *__pyx_r;
char (*__pyx_1);
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"digest","sig",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_digest, &__pyx_v_sig)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_digest);
Py_INCREF(__pyx_v_sig);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1191 */
__pyx_1 = PyString_AsString(__pyx_v_sig); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; goto __pyx_L1;}
__pyx_v_cSigBuf = __pyx_1;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1192 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;}
Py_INCREF(__pyx_v_sig);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_sig);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_v_cSigLen = __pyx_5;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1193 */
__pyx_1 = PyString_AsString(__pyx_v_digest); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; goto __pyx_L1;}
__pyx_v_cDigestBuf = __pyx_1;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1194 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; goto __pyx_L1;}
Py_INCREF(__pyx_v_digest);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_digest);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_v_cDigestLen = __pyx_5;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1196 */
__pyx_v_result = RSA_verify(NID_md5,((unsigned char (*))__pyx_v_cDigestBuf),((unsigned int )__pyx_v_cDigestLen),((unsigned char (*))__pyx_v_cSigBuf),((unsigned int )__pyx_v_cSigLen),((struct __pyx_obj_9SSLCrypto_rsa *)__pyx_v_self)->rsaObj);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1200 */
__pyx_2 = PyInt_FromLong(__pyx_v_result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1200; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.rsa.verify");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_digest);
Py_DECREF(__pyx_v_sig);
return __pyx_r;
}

static int __pyx_f_9SSLCrypto_3dsa___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_9SSLCrypto_3dsa___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
DSA (*__pyx_v_dsaC);
int __pyx_r;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1217 */
__pyx_v_dsaC = DSA_new();

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1218 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj = __pyx_v_dsaC;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1219 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->bnCtx = BN_CTX_new();

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1220 */
BN_CTX_init(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->bnCtx);

__pyx_r = 0;
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto.dsa.__new__");
__pyx_r = -1;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static void __pyx_f_9SSLCrypto_3dsa___dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_f_9SSLCrypto_3dsa___dealloc__(PyObject *__pyx_v_self) {
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1226 */
BN_CTX_free(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->bnCtx);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1227 */
DSA_free(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj);

goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto.dsa.__dealloc__");
__pyx_L0:;
Py_DECREF(__pyx_v_self);
}

static PyObject *__pyx_n_callback;


static PyObject *__pyx_f_9SSLCrypto_3dsa_generateParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3dsa_generateParameters[] = "\n        Generate a set of DSA parameters, as with\n        DSA_generate_parameters()\n        \n        Arguments:\n            - seed - a string to use for seeding the PRNG, optional\n            - func - a callback func which is periodically invoked to\n              report generation progress, optional\n        ";
static PyObject *__pyx_f_9SSLCrypto_3dsa_generateParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_seed = 0;
PyObject *__pyx_v_kw = 0;
DSA (*__pyx_v_dobj);
char (*__pyx_v_c_seed);
int __pyx_v_c_seed_len;
PyObject *__pyx_v_myCallback;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
static char *__pyx_argnames[] = {"seed",0};
__pyx_v_seed = __pyx_k41;
if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 1, 0, &__pyx_v_kw) < 0) return 0;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_seed)) {
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
Py_XDECREF(__pyx_v_kw);
return 0;
}
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_seed);
__pyx_v_myCallback = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1245 */
__pyx_1 = PyObject_GetAttr(__pyx_v_kw, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; goto __pyx_L1;}
Py_INCREF(__pyx_n_callback);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_callback);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1245; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_myCallback);
__pyx_v_myCallback = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1247 */
__pyx_4 = PyObject_IsTrue(__pyx_v_seed); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; goto __pyx_L1;}
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1248 */
PyString_AsStringAndSize(__pyx_v_seed,(&__pyx_v_c_seed),(&__pyx_v_c_seed_len));
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1250 */
__pyx_v_c_seed = ((char (*))0);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1251 */
__pyx_v_c_seed_len = 0;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1253 */
__pyx_v_dobj = DSA_generate_parameters(1024,((unsigned char (*))__pyx_v_c_seed),__pyx_v_c_seed_len,((int (*))0),((unsigned long (*))0),callback,((void (*))__pyx_v_myCallback));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1259 */
__pyx_4 = (((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj != ((DSA (*))0));
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1260 */
DSA_free(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj);
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1262 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj = __pyx_v_dobj;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.dsa.generateParameters");
__pyx_r = 0;
__pyx_L0:;
Py_XDECREF(__pyx_v_kw);
Py_DECREF(__pyx_v_myCallback);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_seed);
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3dsa_generateKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3dsa_generateKey[] = "\n        Given that generateParameters has already been called,\n        generates the private/public keys\n        ";
static PyObject *__pyx_f_9SSLCrypto_3dsa_generateKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1271 */
__pyx_1 = PyInt_FromLong(DSA_generate_key(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1271; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("SSLCrypto.dsa.generateKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3dsa_pubKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3dsa_pubKey[] = "\n        Returns the public key for this object.<br><br>\n    \n        Arguments:\n          - None\n    \n        Returns:\n          - Public key, as a tuple (p, q, g, y) (refer: Applied Cryptography)\n        ";
static PyObject *__pyx_f_9SSLCrypto_3dsa_pubKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1286 */
__pyx_1 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;}
__pyx_2 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->q); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; goto __pyx_L1;}
__pyx_3 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->g); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1288; goto __pyx_L1;}
__pyx_4 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->pub_key); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1289; goto __pyx_L1;}
__pyx_5 = PyTuple_New(4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1286; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2);
PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3);
PyTuple_SET_ITEM(__pyx_5, 3, __pyx_4);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_3 = 0;
__pyx_4 = 0;
__pyx_r = __pyx_5;
__pyx_5 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.dsa.pubKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3dsa_privKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3dsa_privKey[] = "\n        Returns the private key for this object.<br><br>\n    \n        Arguments:\n          - None\n    \n        Returns:\n          - Private key, as a tuple (p, q, g, y, x) (refer: Applied Cryptography)\n        ";
static PyObject *__pyx_f_9SSLCrypto_3dsa_privKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1304 */
__pyx_1 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; goto __pyx_L1;}
__pyx_2 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->q); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1305; goto __pyx_L1;}
__pyx_3 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->g); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1306; goto __pyx_L1;}
__pyx_4 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->pub_key); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1307; goto __pyx_L1;}
__pyx_5 = bn2pyLong(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->priv_key); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; goto __pyx_L1;}
__pyx_6 = PyTuple_New(5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1304; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_6, 1, __pyx_2);
PyTuple_SET_ITEM(__pyx_6, 2, __pyx_3);
PyTuple_SET_ITEM(__pyx_6, 3, __pyx_4);
PyTuple_SET_ITEM(__pyx_6, 4, __pyx_5);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_3 = 0;
__pyx_4 = 0;
__pyx_5 = 0;
__pyx_r = __pyx_6;
__pyx_6 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("SSLCrypto.dsa.privKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3dsa_importPubKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3dsa_importPubKey[] = "\n        Imports public key parameters\n        \n        params is a tuple (p, q, g, y)\n        ";
static PyObject *__pyx_f_9SSLCrypto_3dsa_importPubKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_params = 0;
PyObject *__pyx_v_p;
PyObject *__pyx_v_q;
PyObject *__pyx_v_g;
PyObject *__pyx_v_y;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {"params",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_params)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_params);
__pyx_v_p = Py_None; Py_INCREF(Py_None);
__pyx_v_q = Py_None; Py_INCREF(Py_None);
__pyx_v_g = Py_None; Py_INCREF(Py_None);
__pyx_v_y = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1319 */
__pyx_1 = PySequence_GetSlice(__pyx_v_params, 0, 4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;}
__pyx_2 = __Pyx_UnpackItem(__pyx_1, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;}
Py_DECREF(__pyx_v_p);
__pyx_v_p = __pyx_2;
__pyx_2 = 0;
__pyx_3 = __Pyx_UnpackItem(__pyx_1, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;}
Py_DECREF(__pyx_v_q);
__pyx_v_q = __pyx_3;
__pyx_3 = 0;
__pyx_4 = __Pyx_UnpackItem(__pyx_1, 2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;}
Py_DECREF(__pyx_v_g);
__pyx_v_g = __pyx_4;
__pyx_4 = 0;
__pyx_5 = __Pyx_UnpackItem(__pyx_1, 3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;}
Py_DECREF(__pyx_v_y);
__pyx_v_y = __pyx_5;
__pyx_5 = 0;
if (__Pyx_EndUnpack(__pyx_1, 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1319; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1321 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->p = pyLong2bn(__pyx_v_p);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1322 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->q = pyLong2bn(__pyx_v_q);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1323 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->g = pyLong2bn(__pyx_v_g);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1324 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->pub_key = pyLong2bn(__pyx_v_y);

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.dsa.importPubKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_p);
Py_DECREF(__pyx_v_q);
Py_DECREF(__pyx_v_g);
Py_DECREF(__pyx_v_y);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_params);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3dsa_importPrivKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3dsa_importPrivKey[] = "\n        Imports public key parameters\n        \n        params is a tuple (p, q, g, y, x)\n        ";
static PyObject *__pyx_f_9SSLCrypto_3dsa_importPrivKey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_params = 0;
PyObject *__pyx_v_p;
PyObject *__pyx_v_q;
PyObject *__pyx_v_g;
PyObject *__pyx_v_y;
PyObject *__pyx_v_x;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {"params",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_params)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_params);
__pyx_v_p = Py_None; Py_INCREF(Py_None);
__pyx_v_q = Py_None; Py_INCREF(Py_None);
__pyx_v_g = Py_None; Py_INCREF(Py_None);
__pyx_v_y = Py_None; Py_INCREF(Py_None);
__pyx_v_x = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1334 */
__pyx_1 = __Pyx_UnpackItem(__pyx_v_params, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;}
Py_DECREF(__pyx_v_p);
__pyx_v_p = __pyx_1;
__pyx_1 = 0;
__pyx_2 = __Pyx_UnpackItem(__pyx_v_params, 1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;}
Py_DECREF(__pyx_v_q);
__pyx_v_q = __pyx_2;
__pyx_2 = 0;
__pyx_3 = __Pyx_UnpackItem(__pyx_v_params, 2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;}
Py_DECREF(__pyx_v_g);
__pyx_v_g = __pyx_3;
__pyx_3 = 0;
__pyx_4 = __Pyx_UnpackItem(__pyx_v_params, 3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;}
Py_DECREF(__pyx_v_y);
__pyx_v_y = __pyx_4;
__pyx_4 = 0;
__pyx_5 = __Pyx_UnpackItem(__pyx_v_params, 4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;}
Py_DECREF(__pyx_v_x);
__pyx_v_x = __pyx_5;
__pyx_5 = 0;
if (__Pyx_EndUnpack(__pyx_v_params, 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1336 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->p = pyLong2bn(__pyx_v_p);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1337 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->q = pyLong2bn(__pyx_v_q);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1338 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->g = pyLong2bn(__pyx_v_g);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1339 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->pub_key = pyLong2bn(__pyx_v_y);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1340 */
((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj->priv_key = pyLong2bn(__pyx_v_x);

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.dsa.importPrivKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_p);
Py_DECREF(__pyx_v_q);
Py_DECREF(__pyx_v_g);
Py_DECREF(__pyx_v_y);
Py_DECREF(__pyx_v_x);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_params);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3dsa_sign(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3dsa_sign[] = "\n        Returns a signature of string \'raw\'\n        ";
static PyObject *__pyx_f_9SSLCrypto_3dsa_sign(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_raw = 0;
char (*__pyx_v_dgst);
int __pyx_v_dgstLen;
char (*__pyx_v_sigret);
unsigned int __pyx_v_siglen;
int __pyx_v_res;
int __pyx_v_sigsize;
PyObject *__pyx_v_sig;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
static char *__pyx_argnames[] = {"raw",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_raw)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
__pyx_v_sig = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1356 */
PyString_AsStringAndSize(__pyx_v_raw,(&__pyx_v_dgst),(&__pyx_v_dgstLen));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1358 */
__pyx_v_sigsize = DSA_size(((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1361 */
__pyx_v_sigret = ((char (*))malloc((__pyx_v_sigsize + 1)));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1364 */
__pyx_v_res = DSA_sign(0,((unsigned char (*))__pyx_v_dgst),__pyx_v_dgstLen,((unsigned char (*))__pyx_v_sigret),(&__pyx_v_siglen),((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1371 */
__pyx_1 = PyString_FromStringAndSize(__pyx_v_sigret,__pyx_v_siglen); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; goto __pyx_L1;}
Py_DECREF(__pyx_v_sig);
__pyx_v_sig = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1374 */
free(__pyx_v_sigret);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1377 */
Py_INCREF(__pyx_v_sig);
__pyx_r = __pyx_v_sig;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("SSLCrypto.dsa.sign");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_sig);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
return __pyx_r;
}

static PyObject *__pyx_n_digest;

static PyObject *__pyx_f_9SSLCrypto_3dsa_signSha(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3dsa_signSha[] = "\n        Convenience method which sha1-hashes the string,\n        then signs it\n        ";
static PyObject *__pyx_f_9SSLCrypto_3dsa_signSha(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_h;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"raw",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_raw)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
__pyx_v_h = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1388 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sha); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_sha); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_raw);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_digest); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1388; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_h);
__pyx_v_h = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1390 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sign); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; goto __pyx_L1;}
Py_INCREF(__pyx_v_h);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_h);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1390; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.dsa.signSha");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_h);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
return __pyx_r;
}

static PyObject *__pyx_n_True;
static PyObject *__pyx_n_False;

static PyObject *__pyx_f_9SSLCrypto_3dsa_verify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3dsa_verify[] = "\n        Attempts to validate signature \'sig\' against string \'raw\',\n        returning True if sig is valid, or False if not\n        ";
static PyObject *__pyx_f_9SSLCrypto_3dsa_verify(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_sig = 0;
char (*__pyx_v_dgst);
int __pyx_v_dgstLen;
char (*__pyx_v_sigbuf);
int __pyx_v_siglen;
int __pyx_v_res;
int __pyx_v_sigsize;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
static char *__pyx_argnames[] = {"raw","sig",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_raw, &__pyx_v_sig)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
Py_INCREF(__pyx_v_sig);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1408 */
PyString_AsStringAndSize(__pyx_v_raw,(&__pyx_v_dgst),(&__pyx_v_dgstLen));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1411 */
PyString_AsStringAndSize(__pyx_v_sig,(&__pyx_v_sigbuf),(&__pyx_v_siglen));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1413 */
__pyx_v_res = DSA_verify(0,((unsigned char (*))__pyx_v_dgst),__pyx_v_dgstLen,((unsigned char (*))__pyx_v_sigbuf),__pyx_v_siglen,((struct __pyx_obj_9SSLCrypto_dsa *)__pyx_v_self)->dsaObj);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1419 */
__pyx_1 = (__pyx_v_res == 1);
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1420 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1420; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1423 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("SSLCrypto.dsa.verify");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
Py_DECREF(__pyx_v_sig);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3dsa_verifySha(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3dsa_verifySha[] = "\n        Convenience method which sha1-hashes the string,\n        then verifies it\n        ";
static PyObject *__pyx_f_9SSLCrypto_3dsa_verifySha(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_sig = 0;
PyObject *__pyx_v_h;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"raw","sig",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_raw, &__pyx_v_sig)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
Py_INCREF(__pyx_v_sig);
__pyx_v_h = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1433 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_sha); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_sha); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_raw);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_2 = PyObject_GetAttr(__pyx_3, __pyx_n_digest); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1433; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_h);
__pyx_v_h = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1435 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_verify); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; goto __pyx_L1;}
__pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; goto __pyx_L1;}
Py_INCREF(__pyx_v_h);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_h);
Py_INCREF(__pyx_v_sig);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_sig);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1435; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.dsa.verifySha");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_h);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
Py_DECREF(__pyx_v_sig);
return __pyx_r;
}

static PyObject *__pyx_n_keysize;

static PyObject *__pyx_f_9SSLCrypto_7ElGamal___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal___init__ = {"__init__", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal___init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_bits = 0;
PyObject *__pyx_v_progressfunc = 0;
PyObject *__pyx_v_kw = 0;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"self","bits","progressfunc",0};
__pyx_v_bits = __pyx_k47;
__pyx_v_progressfunc = __pyx_k48;
if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 3, 0, &__pyx_v_kw) < 0) return 0;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_bits, &__pyx_v_progressfunc)) {
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
Py_XDECREF(__pyx_v_kw);
return 0;
}
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_bits);
Py_INCREF(__pyx_v_progressfunc);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1449 */
__pyx_1 = PyObject_IsTrue(__pyx_v_bits); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1449; goto __pyx_L1;}
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1450 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_keysize, __pyx_v_bits) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1450; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1451 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_generateKey); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; goto __pyx_L1;}
Py_INCREF(__pyx_v_bits);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_bits);
Py_INCREF(__pyx_v_progressfunc);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_progressfunc);
__pyx_4 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_3, __pyx_v_kw); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1452 */

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.ElGamal.__init__");
__pyx_r = 0;
__pyx_L0:;
Py_XDECREF(__pyx_v_kw);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_bits);
Py_DECREF(__pyx_v_progressfunc);
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
return __pyx_r;
}

static PyObject *__pyx_n_privbytes;
static PyObject *__pyx_n_has_key;
static PyObject *__pyx_n_ord;
static PyObject *__pyx_n_pow;

static PyObject *__pyx_k104p;
static PyObject *__pyx_k105p;
static PyObject *__pyx_k106p;
static PyObject *__pyx_k107p;

static char (__pyx_k104[]) = "p\n";
static char (__pyx_k105[]) = "g\n";
static char (__pyx_k106[]) = "x\n";
static char (__pyx_k107[]) = "y\n";

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_generateKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_generateKey[] = "generate(bits:int, progress_func:callable, **kw)\n    \n        Generate an ElGamal key of length \'bits\', using \'randfunc\' to get\n        random data and \'progress_func\', if present, to display\n        the progress of the key generation.\n        \n        Keywords:\n            - privbytes - if given, causes the private key (.x), when represented\n              as a binary string, to be exactly this many bytes long\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_generateKey = {"generateKey", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_generateKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_generateKey};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_generateKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_bits = 0;
PyObject *__pyx_v_progress_func = 0;
PyObject *__pyx_v_kw = 0;
PyObject *__pyx_v_privNumBytes;
PyObject *__pyx_v_size;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
long __pyx_4;
int __pyx_5;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
static char *__pyx_argnames[] = {"self","bits","progress_func",0};
__pyx_v_progress_func = __pyx_k49;
if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 3, 0, &__pyx_v_kw) < 0) return 0;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_self, &__pyx_v_bits, &__pyx_v_progress_func)) {
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
Py_XDECREF(__pyx_v_kw);
return 0;
}
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_bits);
Py_INCREF(__pyx_v_progress_func);
__pyx_v_privNumBytes = Py_None; Py_INCREF(Py_None);
__pyx_v_size = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1467 */
__pyx_1 = PyObject_GetAttr(__pyx_v_kw, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; goto __pyx_L1;}
Py_INCREF(__pyx_n_privbytes);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_privbytes);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_privNumBytes);
__pyx_v_privNumBytes = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1469 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_keysize, __pyx_v_bits) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1469; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1472 */
__pyx_4 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1473 */
__pyx_5 = PyObject_IsTrue(__pyx_v_progress_func); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1473; goto __pyx_L1;}
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1474 */
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; goto __pyx_L1;}
Py_INCREF(__pyx_k104p);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k104p);
__pyx_2 = PyObject_CallObject(__pyx_v_progress_func, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1476 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_genprime); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; goto __pyx_L1;}
Py_INCREF(__pyx_v_bits);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_bits);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_p, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1476; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1478 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_hardPrimes); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_has_key); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; goto __pyx_L1;}
Py_INCREF(__pyx_v_bits);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_bits);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_5 = PyObject_IsTrue(__pyx_3); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1479 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_hardPrimes); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1479; goto __pyx_L1;}
__pyx_2 = PyObject_GetItem(__pyx_1, __pyx_v_bits); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1479; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_p, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1479; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
goto __pyx_L4;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1481 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_genprime); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;}
Py_INCREF(__pyx_v_bits);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_bits);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_p, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1481; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
}
__pyx_L4:;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1484 */
__pyx_5 = PyObject_IsTrue(__pyx_v_progress_func); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1484; goto __pyx_L1;}
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1485 */
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;}
Py_INCREF(__pyx_k105p);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k105p);
__pyx_1 = PyObject_CallObject(__pyx_v_progress_func, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1485; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
goto __pyx_L5;
}
__pyx_L5:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1487 */
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
__pyx_3 = PyNumber_Subtract(__pyx_v_bits, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_rndfunc); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
__pyx_6 = PyInt_FromLong(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
__pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_7, 0, __pyx_6);
__pyx_6 = 0;
__pyx_6 = PyObject_CallObject(__pyx_2, __pyx_7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_6);
__pyx_6 = 0;
__pyx_7 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_6 = PyInt_FromLong(63); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
__pyx_1 = PyNumber_And(__pyx_7, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_2 = PyNumber_Subtract(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1487; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_size);
__pyx_v_size = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1489 */
__pyx_7 = PyInt_FromLong(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_v_size, __pyx_7, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1489; goto __pyx_L1;}
__pyx_5 = __pyx_5 < 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1490 */
__pyx_6 = PyInt_FromLong(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;}
__pyx_3 = PyNumber_Subtract(__pyx_v_bits, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1490; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_v_size);
__pyx_v_size = __pyx_3;
__pyx_3 = 0;
goto __pyx_L6;
}
__pyx_L6:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1491 */
while (1) {
__pyx_L7:;
__pyx_4 = 1;
if (!__pyx_4) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1493 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_genprime); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
__pyx_7 = PyNumber_Divide(__pyx_v_bits, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_6 = PyInt_FromLong(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
__pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_7);
Py_INCREF(__pyx_v_progress_func);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_progress_func);
PyTuple_SET_ITEM(__pyx_3, 2, __pyx_6);
__pyx_7 = 0;
__pyx_6 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_g, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1497 */
__pyx_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_g); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; goto __pyx_L1;}
__pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_7, __pyx_6, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; goto __pyx_L1;}
__pyx_5 = __pyx_5 < 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1498 */
goto __pyx_L8;
goto __pyx_L9;
}
__pyx_L9:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1499 */
__pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; goto __pyx_L1;}
__pyx_3 = PyNumber_Add(__pyx_v_size, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_2 = PyNumber_Remainder(__pyx_3, __pyx_v_bits); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1499; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_size);
__pyx_v_size = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1500 */
__pyx_7 = PyInt_FromLong(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_v_size, __pyx_7, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1501 */
__pyx_6 = PyInt_FromLong(4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1501; goto __pyx_L1;}
Py_DECREF(__pyx_v_size);
__pyx_v_size = __pyx_6;
__pyx_6 = 0;
goto __pyx_L10;
}
__pyx_L10:;
}
__pyx_L8:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1503 */
__pyx_5 = PyObject_IsTrue(__pyx_v_progress_func); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1503; goto __pyx_L1;}
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1504 */
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; goto __pyx_L1;}
Py_INCREF(__pyx_k106p);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k106p);
__pyx_3 = PyObject_CallObject(__pyx_v_progress_func, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1504; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
goto __pyx_L11;
}
__pyx_L11:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1519 */
if (PyObject_Cmp(__pyx_v_privNumBytes, Py_None, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1519; goto __pyx_L1;}
__pyx_5 = __pyx_5 != 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1520 */
__pyx_2 = PyInt_FromLong(8); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; goto __pyx_L1;}
__pyx_7 = PyNumber_Multiply(__pyx_v_privNumBytes, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_6 = PyInt_FromLong(16); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; goto __pyx_L1;}
__pyx_1 = PyNumber_Add(__pyx_7, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1520; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_v_bits);
__pyx_v_bits = __pyx_1;
__pyx_1 = 0;
goto __pyx_L12;
}
__pyx_L12:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1521 */
while (1) {
__pyx_L13:;
__pyx_4 = 1;
if (!__pyx_4) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1522 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_genrandom); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(16); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
__pyx_7 = PyNumber_Subtract(__pyx_v_bits, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_7);
__pyx_7 = 0;
__pyx_1 = PyObject_CallObject(__pyx_3, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_x, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1522; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1523 */
__pyx_5 = PyObject_IsTrue(__pyx_v_progress_func); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; goto __pyx_L1;}
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1524 */
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; goto __pyx_L1;}
Py_INCREF(__pyx_k107p);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k107p);
__pyx_7 = PyObject_CallObject(__pyx_v_progress_func, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1524; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
goto __pyx_L15;
}
__pyx_L15:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1525 */
if (PyObject_Cmp(__pyx_v_privNumBytes, Py_None, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
if (!__pyx_5) {
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
__pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_long_to_bytes); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_x); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
__pyx_7 = PyObject_CallObject(__pyx_6, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_7);
__pyx_7 = 0;
__pyx_6 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_Cmp(__pyx_6, __pyx_v_privNumBytes, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
}
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1526 */
goto __pyx_L14;
goto __pyx_L16;
}
__pyx_L16:;
}
__pyx_L14:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1527 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_pow); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; goto __pyx_L1;}
__pyx_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_g); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_x); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; goto __pyx_L1;}
__pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_7);
PyTuple_SET_ITEM(__pyx_6, 1, __pyx_3);
PyTuple_SET_ITEM(__pyx_6, 2, __pyx_1);
__pyx_7 = 0;
__pyx_3 = 0;
__pyx_1 = 0;
__pyx_7 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_y, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1527; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
__Pyx_AddTraceback("SSLCrypto.ElGamal.generateKey");
__pyx_r = 0;
__pyx_L0:;
Py_XDECREF(__pyx_v_kw);
Py_DECREF(__pyx_v_privNumBytes);
Py_DECREF(__pyx_v_size);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_bits);
Py_DECREF(__pyx_v_progress_func);
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_genk(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_genk[] = "\n        Generate a \'K\' value for signing/encrypting\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_genk = {"genk", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_genk, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_genk};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_genk(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_K;
PyObject *__pyx_r;
long __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
int __pyx_8;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);
__pyx_v_K = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1534 */
while (1) {
__pyx_L2:;
__pyx_1 = 1;
if (!__pyx_1) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1535 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_genrandom); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_keysize); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
__pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
__pyx_5 = PyNumber_Subtract(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_genrandom); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
__pyx_4 = PyInt_FromLong(5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
__pyx_6 = PyInt_FromLong(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
__pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_7, 0, __pyx_4);
PyTuple_SET_ITEM(__pyx_7, 1, __pyx_6);
__pyx_4 = 0;
__pyx_6 = 0;
__pyx_4 = PyObject_CallObject(__pyx_3, __pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
__pyx_6 = PyNumber_Subtract(__pyx_5, __pyx_4); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_6);
__pyx_6 = 0;
__pyx_7 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1535; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_K);
__pyx_v_K = __pyx_7;
__pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1536 */
__pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_GCD); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
__pyx_6 = PyInt_FromLong(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
__pyx_2 = PyNumber_Subtract(__pyx_4, __pyx_6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
Py_INCREF(__pyx_v_K);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_K);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
__pyx_2 = 0;
__pyx_7 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_7, __pyx_4, &__pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1536; goto __pyx_L1;}
__pyx_8 = __pyx_8 == 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (__pyx_8) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1541 */
Py_INCREF(__pyx_v_K);
__pyx_r = __pyx_v_K;
goto __pyx_L0;
goto __pyx_L4;
}
__pyx_L4:;
}
__pyx_L3:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
__Pyx_AddTraceback("SSLCrypto.ElGamal.genk");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_K);
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_n_ElGamalobj;
static PyObject *__pyx_n_error;
static PyObject *__pyx_n_range;
static PyObject *__pyx_n_setattr;

static PyObject *__pyx_k108p;

static char (__pyx_k108[]) = "argument for construct() wrong length";

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_construct(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_construct[] = "construct(tuple:(long,long,long,long)|(long,long,long,long,long)))\n                 : ElGamalobj\n        Construct an ElGamal key from a 3- or 4-tuple of numbers.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_construct = {"construct", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_construct, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_construct};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_construct(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_tuple = 0;
PyObject *__pyx_v_obj;
PyObject *__pyx_v_i;
PyObject *__pyx_v_field;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"tuple",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_tuple)) return 0;
Py_INCREF(__pyx_v_tuple);
__pyx_v_obj = Py_None; Py_INCREF(Py_None);
__pyx_v_i = Py_None; Py_INCREF(Py_None);
__pyx_v_field = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1551 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ElGamalobj); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1551; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_obj);
__pyx_v_obj = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1552 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
Py_INCREF(__pyx_v_tuple);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_tuple);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = PyInt_FromLong(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
__pyx_4 = PyList_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
PyList_SET_ITEM(__pyx_4, 0, __pyx_1);
PyList_SET_ITEM(__pyx_4, 1, __pyx_2);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_5 = PySequence_Contains(__pyx_4, __pyx_3); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1552; goto __pyx_L1;}
__pyx_5 = !__pyx_5;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1553 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_error); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; goto __pyx_L1;}
__Pyx_Raise(__pyx_1, __pyx_k108p, 0);
Py_DECREF(__pyx_1); __pyx_1 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1554 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_range); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; goto __pyx_L1;}
Py_INCREF(__pyx_v_tuple);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_tuple);
__pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
__pyx_1 = 0;
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = PyObject_GetIter(__pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
for (;;) {
__pyx_L3:;
__pyx_2 = PyIter_Next(__pyx_1);
if (!__pyx_2) {
if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1554; goto __pyx_L1;}
break;
}
Py_DECREF(__pyx_v_i);
__pyx_v_i = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1555 */
__pyx_3 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_keydata); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; goto __pyx_L1;}
__pyx_4 = PyObject_GetItem(__pyx_3, __pyx_v_i); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_field);
__pyx_v_field = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1556 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_setattr); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; goto __pyx_L1;}
__pyx_3 = PyObject_GetItem(__pyx_v_tuple, __pyx_v_i); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; goto __pyx_L1;}
__pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; goto __pyx_L1;}
Py_INCREF(__pyx_v_obj);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_obj);
Py_INCREF(__pyx_v_field);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_field);
PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1556; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
}
__pyx_L4:;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1557 */
Py_INCREF(__pyx_v_obj);
__pyx_r = __pyx_v_obj;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.ElGamal.construct");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_obj);
Py_DECREF(__pyx_v_i);
Py_DECREF(__pyx_v_field);
Py_DECREF(__pyx_v_tuple);
return __pyx_r;
}

static PyObject *__pyx_n___dict__;

static PyObject *__pyx_f_9SSLCrypto_7ElGamal___getstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal___getstate__[] = "To keep key objects platform-independent, the key data is\n        converted to standard Python long integers before being\n        written out.  It will then be reconverted as necessary on\n        restoration.";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal___getstate__ = {"__getstate__", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal___getstate__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal___getstate__};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal___getstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_d;
PyObject *__pyx_v_key;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);
__pyx_v_d = Py_None; Py_INCREF(Py_None);
__pyx_v_key = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1565 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___dict__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; goto __pyx_L1;}
Py_DECREF(__pyx_v_d);
__pyx_v_d = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1566 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_keydata); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; goto __pyx_L1;}
__pyx_2 = PyObject_GetIter(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
for (;;) {
__pyx_L2:;
__pyx_1 = PyIter_Next(__pyx_2);
if (!__pyx_1) {
if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1566; goto __pyx_L1;}
break;
}
Py_DECREF(__pyx_v_key);
__pyx_v_key = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1567 */
__pyx_1 = PyObject_GetAttr(__pyx_v_d, __pyx_n_has_key); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; goto __pyx_L1;}
Py_INCREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_key);
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (__pyx_5) {
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; goto __pyx_L1;}
__pyx_3 = PyObject_GetItem(__pyx_v_d, __pyx_v_key); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (PyObject_SetItem(__pyx_v_d, __pyx_v_key, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1567; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
goto __pyx_L4;
}
__pyx_L4:;
}
__pyx_L3:;
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1568 */
Py_INCREF(__pyx_v_d);
__pyx_r = __pyx_v_d;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.ElGamal.__getstate__");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_d);
Py_DECREF(__pyx_v_key);
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_n_bignum;

static PyObject *__pyx_f_9SSLCrypto_7ElGamal___setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal___setstate__[] = "On unpickling a key object, the key data is converted to the big\n    number representation being used, whether that is Python long\n    integers, MPZ objects, or whatever.";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal___setstate__ = {"__setstate__", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal___setstate__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal___setstate__};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal___setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_d = 0;
PyObject *__pyx_v_key;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"self","d",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_d)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_d);
__pyx_v_key = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1575 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_keydata); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; goto __pyx_L1;}
__pyx_2 = PyObject_GetIter(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
for (;;) {
__pyx_L2:;
__pyx_1 = PyIter_Next(__pyx_2);
if (!__pyx_1) {
if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1575; goto __pyx_L1;}
break;
}
Py_DECREF(__pyx_v_key);
__pyx_v_key = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1576 */
__pyx_1 = PyObject_GetAttr(__pyx_v_d, __pyx_n_has_key); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
Py_INCREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_key);
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyObject_IsTrue(__pyx_4); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (__pyx_5) {
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_bignum); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
__pyx_3 = PyObject_GetItem(__pyx_v_d, __pyx_v_key); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___dict__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
if (PyObject_SetItem(__pyx_1, __pyx_v_key, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1576; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
goto __pyx_L4;
}
__pyx_L4:;
}
__pyx_L3:;
Py_DECREF(__pyx_2); __pyx_2 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.ElGamal.__setstate__");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_key);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_d);
return __pyx_r;
}

static PyObject *__pyx_n_isinstance;
static PyObject *__pyx_n_tuple;
static PyObject *__pyx_n_map;

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_encrypt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_encrypt[] = "encrypt(plaintext:string|long, K:string|long) : tuple\n        Encrypt the string or integer plaintext.  K is a random\n        parameter required by some algorithms.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_encrypt = {"encrypt", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_encrypt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_encrypt};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_encrypt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_plaintext = 0;
PyObject *__pyx_v_K = 0;
PyObject *__pyx_v_wasString;
PyObject *__pyx_v_a;
PyObject *__pyx_v_b;
PyObject *__pyx_v_ciphertext;
PyObject *__pyx_v_ctext1;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {"self","plaintext","K",0};
__pyx_v_K = __pyx_k50;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_self, &__pyx_v_plaintext, &__pyx_v_K)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_plaintext);
Py_INCREF(__pyx_v_K);
__pyx_v_wasString = Py_None; Py_INCREF(Py_None);
__pyx_v_a = Py_None; Py_INCREF(Py_None);
__pyx_v_b = Py_None; Py_INCREF(Py_None);
__pyx_v_ciphertext = Py_None; Py_INCREF(Py_None);
__pyx_v_ctext1 = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1584 */
__pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; goto __pyx_L1;}
Py_DECREF(__pyx_v_wasString);
__pyx_v_wasString = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1586 */
__pyx_2 = __pyx_v_K == Py_None;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1587 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_genprime); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(256); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1587; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_v_K);
__pyx_v_K = __pyx_3;
__pyx_3 = 0;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1589 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; goto __pyx_L1;}
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_types); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_4, __pyx_n_StringType); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; goto __pyx_L1;}
Py_INCREF(__pyx_v_plaintext);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_plaintext);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_2 = PyObject_IsTrue(__pyx_3); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1590 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bytes_to_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1590; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1590; goto __pyx_L1;}
Py_INCREF(__pyx_v_plaintext);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_plaintext);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1590; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_v_plaintext);
__pyx_v_plaintext = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1591 */
__pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; goto __pyx_L1;}
Py_DECREF(__pyx_v_wasString);
__pyx_v_wasString = __pyx_1;
__pyx_1 = 0;
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1593 */
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_types); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_StringType); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;}
Py_INCREF(__pyx_v_K);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_K);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyObject_IsTrue(__pyx_1); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1593; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1594 */
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_bytes_to_long); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; goto __pyx_L1;}
Py_INCREF(__pyx_v_K);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_K);
__pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_K);
__pyx_v_K = __pyx_1;
__pyx_1 = 0;
goto __pyx_L4;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1596 */
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_pow); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_g); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; goto __pyx_L1;}
__pyx_5 = PyTuple_New(3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
Py_INCREF(__pyx_v_K);
PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_K);
PyTuple_SET_ITEM(__pyx_5, 2, __pyx_1);
__pyx_3 = 0;
__pyx_1 = 0;
__pyx_3 = PyObject_CallObject(__pyx_4, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1596; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_v_a);
__pyx_v_a = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1597 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_pow); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_y); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; goto __pyx_L1;}
__pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; goto __pyx_L1;}
__pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
Py_INCREF(__pyx_v_K);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_K);
PyTuple_SET_ITEM(__pyx_3, 2, __pyx_5);
__pyx_4 = 0;
__pyx_5 = 0;
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyNumber_Multiply(__pyx_v_plaintext, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; goto __pyx_L1;}
__pyx_3 = PyNumber_Remainder(__pyx_5, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_b);
__pyx_v_b = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1598 */
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; goto __pyx_L1;}
Py_INCREF(__pyx_v_a);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_a);
Py_INCREF(__pyx_v_b);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_b);
Py_DECREF(__pyx_v_ciphertext);
__pyx_v_ciphertext = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1600 */
__pyx_2 = PyObject_IsTrue(__pyx_v_wasString); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; goto __pyx_L1;}
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1601 */
__pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_tuple); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_map); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_long_to_bytes); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
Py_INCREF(__pyx_v_ciphertext);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_ciphertext);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
__pyx_3 = 0;
__pyx_4 = PyObject_CallObject(__pyx_5, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_ctext1);
__pyx_v_ctext1 = __pyx_4;
__pyx_4 = 0;
goto __pyx_L5;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1603 */
Py_INCREF(__pyx_v_ciphertext);
Py_DECREF(__pyx_v_ctext1);
__pyx_v_ctext1 = __pyx_v_ciphertext;
}
__pyx_L5:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1605 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_bencode); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; goto __pyx_L1;}
Py_INCREF(__pyx_v_ctext1);
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_ctext1);
__pyx_1 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1605; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.ElGamal.encrypt");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_wasString);
Py_DECREF(__pyx_v_a);
Py_DECREF(__pyx_v_b);
Py_DECREF(__pyx_v_ciphertext);
Py_DECREF(__pyx_v_ctext1);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_plaintext);
Py_DECREF(__pyx_v_K);
return __pyx_r;
}

static PyObject *__pyx_n_hasattr;

static PyObject *__pyx_k110p;

static char (__pyx_k110[]) = "Private key not available in this object";

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_decrypt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_decrypt[] = "decrypt(ciphertext:tuple|string|long): string\n        Decrypt \'ciphertext\' using this key.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_decrypt = {"decrypt", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_decrypt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_decrypt};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_decrypt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_ciphertext = 0;
PyObject *__pyx_v_wasString;
PyObject *__pyx_v_ax;
PyObject *__pyx_v_plaintext;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
int __pyx_6;
int __pyx_7;
static char *__pyx_argnames[] = {"self","ciphertext",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_ciphertext)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_ciphertext);
__pyx_v_wasString = Py_None; Py_INCREF(Py_None);
__pyx_v_ax = Py_None; Py_INCREF(Py_None);
__pyx_v_plaintext = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1612 */
/*try:*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1613 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bdecode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1613; goto __pyx_L2;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1613; goto __pyx_L2;}
Py_INCREF(__pyx_v_ciphertext);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_ciphertext);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1613; goto __pyx_L2;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_ciphertext);
__pyx_v_ciphertext = __pyx_3;
__pyx_3 = 0;
}
goto __pyx_L3;
__pyx_L2:;
Py_XDECREF(__pyx_1); __pyx_1 = 0;
Py_XDECREF(__pyx_2); __pyx_2 = 0;
Py_XDECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1614 */
/*except:*/ {
__Pyx_AddTraceback("SSLCrypto.decrypt");
__pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1615 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_CryptoInvalidCiphertext); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; goto __pyx_L1;}
__Pyx_Raise(__pyx_2, 0, 0);
Py_DECREF(__pyx_2); __pyx_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; goto __pyx_L1;}
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1617 */
__pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; goto __pyx_L1;}
Py_DECREF(__pyx_v_wasString);
__pyx_v_wasString = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1619 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
Py_INCREF(__pyx_v_ciphertext);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_ciphertext);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
__pyx_4 = PyList_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
__pyx_4 = 0;
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_1 = PyList_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
PyList_SET_ITEM(__pyx_1, 0, __pyx_2);
PyList_SET_ITEM(__pyx_1, 1, __pyx_4);
__pyx_2 = 0;
__pyx_4 = 0;
__pyx_6 = PySequence_Contains(__pyx_1, __pyx_3); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; goto __pyx_L1;}
__pyx_6 = !__pyx_6;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_6) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1620 */
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; goto __pyx_L1;}
Py_INCREF(__pyx_v_ciphertext);
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_ciphertext);
Py_DECREF(__pyx_v_ciphertext);
__pyx_v_ciphertext = __pyx_5;
__pyx_5 = 0;
goto __pyx_L4;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1622 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; goto __pyx_L1;}
__pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; goto __pyx_L1;}
__pyx_3 = PyObject_GetItem(__pyx_v_ciphertext, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_types); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; goto __pyx_L1;}
__pyx_5 = PyObject_GetAttr(__pyx_1, __pyx_n_StringType); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_5);
__pyx_3 = 0;
__pyx_5 = 0;
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_6 = PyObject_IsTrue(__pyx_1); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_6) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1623 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_tuple); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; goto __pyx_L1;}
__pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_map); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; goto __pyx_L1;}
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_bytes_to_long); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; goto __pyx_L1;}
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
Py_INCREF(__pyx_v_ciphertext);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_ciphertext);
__pyx_2 = 0;
__pyx_1 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
__pyx_5 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1623; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_ciphertext);
__pyx_v_ciphertext = __pyx_5;
__pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1624 */
__pyx_4 = PyInt_FromLong(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; goto __pyx_L1;}
Py_DECREF(__pyx_v_wasString);
__pyx_v_wasString = __pyx_4;
__pyx_4 = 0;
goto __pyx_L5;
}
__pyx_L5:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1626 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_hasattr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; goto __pyx_L1;}
Py_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_self);
Py_INCREF(__pyx_n_x);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_n_x);
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_6 = PyObject_IsTrue(__pyx_2); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1626; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_7 = (!__pyx_6);
if (__pyx_7) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1627 */
__pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_error); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; goto __pyx_L1;}
__Pyx_Raise(__pyx_5, __pyx_k110p, 0);
Py_DECREF(__pyx_5); __pyx_5 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1627; goto __pyx_L1;}
goto __pyx_L6;
}
__pyx_L6:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1629 */
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_pow); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; goto __pyx_L1;}
__pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; goto __pyx_L1;}
__pyx_3 = PyObject_GetItem(__pyx_v_ciphertext, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_x); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; goto __pyx_L1;}
__pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; goto __pyx_L1;}
__pyx_1 = PyTuple_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_2);
PyTuple_SET_ITEM(__pyx_1, 2, __pyx_5);
__pyx_3 = 0;
__pyx_2 = 0;
__pyx_5 = 0;
__pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_ax);
__pyx_v_ax = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1630 */
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; goto __pyx_L1;}
__pyx_5 = PyObject_GetItem(__pyx_v_ciphertext, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_inverse); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; goto __pyx_L1;}
Py_INCREF(__pyx_v_ax);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_ax);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_1);
__pyx_1 = 0;
__pyx_2 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = PyNumber_Multiply(__pyx_5, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; goto __pyx_L1;}
__pyx_3 = PyNumber_Remainder(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1630; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_v_plaintext);
__pyx_v_plaintext = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1632 */
__pyx_6 = PyObject_IsTrue(__pyx_v_wasString); if (__pyx_6 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1632; goto __pyx_L1;}
if (__pyx_6) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1633 */
__pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_long_to_bytes); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; goto __pyx_L1;}
Py_INCREF(__pyx_v_plaintext);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_plaintext);
__pyx_1 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;
goto __pyx_L7;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1635 */
Py_INCREF(__pyx_v_plaintext);
__pyx_r = __pyx_v_plaintext;
goto __pyx_L0;
}
__pyx_L7:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.ElGamal.decrypt");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_wasString);
Py_DECREF(__pyx_v_ax);
Py_DECREF(__pyx_v_plaintext);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_ciphertext);
return __pyx_r;
}

static PyObject *__pyx_k111p;
static PyObject *__pyx_k112p;

static char (__pyx_k111[]) = "Private key not available in this object";
static char (__pyx_k112[]) = "Bad K value: GCD(K, p-1) != 1";

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_sign(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_sign[] = "sign(M : string|long, K:string|long) : tuple\n        Return a tuple containing the signature for the message M.\n        K is a random parameter required by some algorithms.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_sign = {"sign", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_sign, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_sign};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_sign(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_M = 0;
PyObject *__pyx_v_K = 0;
PyObject *__pyx_v_p1;
PyObject *__pyx_v_a;
PyObject *__pyx_v_t;
PyObject *__pyx_v_b;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
int __pyx_5;
PyObject *__pyx_6 = 0;
static char *__pyx_argnames[] = {"self","M","K",0};
__pyx_v_K = __pyx_k51;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_self, &__pyx_v_M, &__pyx_v_K)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_M);
Py_INCREF(__pyx_v_K);
__pyx_v_p1 = Py_None; Py_INCREF(Py_None);
__pyx_v_a = Py_None; Py_INCREF(Py_None);
__pyx_v_t = Py_None; Py_INCREF(Py_None);
__pyx_v_b = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1643 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_hasPrivateKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_4 = PyObject_IsTrue(__pyx_3); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = (!__pyx_4);
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1644 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_error); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; goto __pyx_L1;}
__Pyx_Raise(__pyx_1, __pyx_k111p, 0);
Py_DECREF(__pyx_1); __pyx_1 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1645 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_types); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_StringType); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;}
Py_INCREF(__pyx_v_M);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_M);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = PyObject_IsTrue(__pyx_1); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_4) {
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_bytes_to_long); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;}
Py_INCREF(__pyx_v_M);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_M);
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_M);
__pyx_v_M = __pyx_1;
__pyx_1 = 0;
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1648 */
__pyx_5 = __pyx_v_K == Py_None;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1649 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_genk); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;}
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;}
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1649; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_K);
__pyx_v_K = __pyx_1;
__pyx_1 = 0;
goto __pyx_L4;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1654 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;}
__pyx_1 = PyNumber_Subtract(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_p1);
__pyx_v_p1 = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1655 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_GCD); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; goto __pyx_L1;}
Py_INCREF(__pyx_v_K);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_K);
Py_INCREF(__pyx_v_p1);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_p1);
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_1, __pyx_2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; goto __pyx_L1;}
__pyx_4 = __pyx_4 != 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1656 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_CryptoInvalidElGamalK); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; goto __pyx_L1;}
Py_INCREF(__pyx_k112p);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k112p);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__Pyx_Raise(__pyx_2, 0, 0);
Py_DECREF(__pyx_2); __pyx_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; goto __pyx_L1;}
goto __pyx_L5;
}
__pyx_L5:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1657 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_pow); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_g); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; goto __pyx_L1;}
__pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_1);
Py_INCREF(__pyx_v_K);
PyTuple_SET_ITEM(__pyx_6, 1, __pyx_v_K);
PyTuple_SET_ITEM(__pyx_6, 2, __pyx_2);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_1 = PyObject_CallObject(__pyx_3, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_v_a);
__pyx_v_a = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1658 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_x); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; goto __pyx_L1;}
__pyx_3 = PyNumber_Multiply(__pyx_2, __pyx_v_a); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_6 = PyNumber_Subtract(__pyx_v_M, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = PyNumber_Remainder(__pyx_6, __pyx_v_p1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_v_t);
__pyx_v_t = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1659 */
while (1) {
__pyx_L6:;
__pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_v_t, __pyx_2, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; goto __pyx_L1;}
__pyx_5 = __pyx_5 < 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (!__pyx_5) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1660 */
__pyx_3 = PyNumber_Add(__pyx_v_t, __pyx_v_p1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1660; goto __pyx_L1;}
Py_DECREF(__pyx_v_t);
__pyx_v_t = __pyx_3;
__pyx_3 = 0;
}
__pyx_L7:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1661 */
__pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_inverse); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; goto __pyx_L1;}
__pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; goto __pyx_L1;}
Py_INCREF(__pyx_v_K);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_K);
Py_INCREF(__pyx_v_p1);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_p1);
__pyx_2 = PyObject_CallObject(__pyx_6, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_3 = PyNumber_Multiply(__pyx_v_t, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_6 = PyNumber_Remainder(__pyx_3, __pyx_v_p1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_b);
__pyx_v_b = __pyx_6;
__pyx_6 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1663 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bencode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;}
Py_INCREF(__pyx_v_a);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_a);
Py_INCREF(__pyx_v_b);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_b);
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
__pyx_6 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_r = __pyx_6;
__pyx_6 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("SSLCrypto.ElGamal.sign");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_p1);
Py_DECREF(__pyx_v_a);
Py_DECREF(__pyx_v_t);
Py_DECREF(__pyx_v_b);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_M);
Py_DECREF(__pyx_v_K);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_verify(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_verify[] = "verify(M:string|long, signature:tuple) : bool\n        Verify that the signature is valid for the message M;\n        returns true if the signature checks out.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_verify = {"verify", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_verify, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_verify};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_verify(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_M = 0;
PyObject *__pyx_v_sig = 0;
PyObject *__pyx_v_v1;
PyObject *__pyx_v_v2;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
static char *__pyx_argnames[] = {"self","M","sig",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_self, &__pyx_v_M, &__pyx_v_sig)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_M);
Py_INCREF(__pyx_v_sig);
__pyx_v_v1 = Py_None; Py_INCREF(Py_None);
__pyx_v_v2 = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1673 */
/*try:*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1674 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bdecode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L2;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L2;}
Py_INCREF(__pyx_v_sig);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_sig);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; goto __pyx_L2;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_sig);
__pyx_v_sig = __pyx_3;
__pyx_3 = 0;
}
goto __pyx_L3;
__pyx_L2:;
Py_XDECREF(__pyx_1); __pyx_1 = 0;
Py_XDECREF(__pyx_2); __pyx_2 = 0;
Py_XDECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1675 */
/*except:*/ {
__Pyx_AddTraceback("SSLCrypto.verify");
__pyx_1 = __Pyx_GetExcValue(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1676 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_CryptoInvalidSignature); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; goto __pyx_L1;}
__Pyx_Raise(__pyx_2, 0, 0);
Py_DECREF(__pyx_2); __pyx_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; goto __pyx_L1;}
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1678 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_isinstance); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;}
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_types); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_StringType); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;}
Py_INCREF(__pyx_v_M);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_M);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_4 = PyObject_IsTrue(__pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1678; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1679 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_bytes_to_long); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; goto __pyx_L1;}
Py_INCREF(__pyx_v_M);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_M);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1679; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_M);
__pyx_v_M = __pyx_2;
__pyx_2 = 0;
goto __pyx_L4;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1681 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_pow); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_y); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;}
__pyx_5 = PyObject_GetItem(__pyx_v_sig, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;}
__pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_6, 1, __pyx_5);
PyTuple_SET_ITEM(__pyx_6, 2, __pyx_2);
__pyx_1 = 0;
__pyx_5 = 0;
__pyx_2 = 0;
__pyx_1 = PyObject_CallObject(__pyx_3, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_v_v1);
__pyx_v_v1 = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1682 */
__pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_pow); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
__pyx_3 = PyObject_GetItem(__pyx_v_sig, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_6 = PyInt_FromLong(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
__pyx_1 = PyObject_GetItem(__pyx_v_sig, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
__pyx_6 = PyTuple_New(3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_3);
PyTuple_SET_ITEM(__pyx_6, 1, __pyx_1);
PyTuple_SET_ITEM(__pyx_6, 2, __pyx_2);
__pyx_3 = 0;
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_3 = PyObject_CallObject(__pyx_5, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_1 = PyNumber_Multiply(__pyx_v_v1, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
__pyx_5 = PyNumber_Remainder(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_v1);
__pyx_v_v1 = __pyx_5;
__pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1683 */
__pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_pow); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_g); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
__pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
Py_INCREF(__pyx_v_M);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_M);
PyTuple_SET_ITEM(__pyx_2, 2, __pyx_1);
__pyx_3 = 0;
__pyx_1 = 0;
__pyx_5 = PyObject_CallObject(__pyx_6, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1683; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_v2);
__pyx_v_v2 = __pyx_5;
__pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1684 */
if (PyObject_Cmp(__pyx_v_v1, __pyx_v_v2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1684; goto __pyx_L1;}
__pyx_4 = __pyx_4 == 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1685 */
__pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; goto __pyx_L1;}
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;
goto __pyx_L5;
}
__pyx_L5:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1686 */
__pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1686; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("SSLCrypto.ElGamal.verify");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_v1);
Py_DECREF(__pyx_v_v2);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_M);
Py_DECREF(__pyx_v_sig);
return __pyx_r;
}

static PyObject *__pyx_k113p;

static char (__pyx_k113[]) = "Invalid public key parameters";

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_importPubKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_importPubKey[] = "\n        Import someone else\'s public key\n    \n        Arguments:\n         - (p, g, y), a tuple (as returned by pubKey())\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_importPubKey = {"importPubKey", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_importPubKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_importPubKey};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_importPubKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_parms = 0;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
static char *__pyx_argnames[] = {"self","parms",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_parms)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_parms);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1697 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
Py_INCREF(__pyx_v_parms);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_parms);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
__pyx_5 = PyList_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5);
__pyx_5 = 0;
__pyx_5 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_2 = PyList_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
PyList_SET_ITEM(__pyx_2, 0, __pyx_3);
PyList_SET_ITEM(__pyx_2, 1, __pyx_5);
__pyx_3 = 0;
__pyx_5 = 0;
__pyx_1 = PySequence_Contains(__pyx_2, __pyx_4); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
__pyx_1 = !__pyx_1;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (!__pyx_1) {
__pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
Py_INCREF(__pyx_v_parms);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_parms);
__pyx_5 = PyObject_CallObject(__pyx_6, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = PyInt_FromLong(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_5, __pyx_4, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; goto __pyx_L1;}
__pyx_1 = __pyx_1 != 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
}
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1698 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; goto __pyx_L1;}
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; goto __pyx_L1;}
Py_INCREF(__pyx_k113p);
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_k113p);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__Pyx_Raise(__pyx_3, 0, 0);
Py_DECREF(__pyx_3); __pyx_3 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1698; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1699 */
__pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; goto __pyx_L1;}
__pyx_4 = PyObject_GetItem(__pyx_v_parms, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_p, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1700 */
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; goto __pyx_L1;}
__pyx_6 = PyObject_GetItem(__pyx_v_parms, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_g, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1701 */
__pyx_3 = PyInt_FromLong(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; goto __pyx_L1;}
__pyx_5 = PyObject_GetItem(__pyx_v_parms, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_y, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1701; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1703 */
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_size); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;}
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_2);
__pyx_2 = 0;
__pyx_3 = PyObject_CallObject(__pyx_4, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_keysize, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("SSLCrypto.ElGamal.importPubKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_parms);
return __pyx_r;
}

static PyObject *__pyx_k114p;

static char (__pyx_k114[]) = "Invalid private key parameters";

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_importPrivKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_importPrivKey[] = "\n        importPubKey - import private key parameters\n    \n        Arguments:\n         - (p, g, y, x), as a tuple (as returned by privKey())\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_importPrivKey = {"importPrivKey", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_importPrivKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_importPrivKey};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_importPrivKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_parms = 0;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
static char *__pyx_argnames[] = {"self","parms",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_parms)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_parms);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1719 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
Py_INCREF(__pyx_v_parms);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_parms);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
__pyx_5 = PyList_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5);
__pyx_5 = 0;
__pyx_5 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_2 = PyList_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
PyList_SET_ITEM(__pyx_2, 0, __pyx_3);
PyList_SET_ITEM(__pyx_2, 1, __pyx_5);
__pyx_3 = 0;
__pyx_5 = 0;
__pyx_1 = PySequence_Contains(__pyx_2, __pyx_4); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
__pyx_1 = !__pyx_1;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (!__pyx_1) {
__pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
Py_INCREF(__pyx_v_parms);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_parms);
__pyx_5 = PyObject_CallObject(__pyx_6, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = PyInt_FromLong(4); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_5, __pyx_4, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1719; goto __pyx_L1;}
__pyx_1 = __pyx_1 != 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
}
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1720 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1720; goto __pyx_L1;}
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1720; goto __pyx_L1;}
Py_INCREF(__pyx_k114p);
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_k114p);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1720; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__Pyx_Raise(__pyx_3, 0, 0);
Py_DECREF(__pyx_3); __pyx_3 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1720; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1721 */
__pyx_5 = PyInt_FromLong(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; goto __pyx_L1;}
__pyx_4 = PyObject_GetItem(__pyx_v_parms, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_p, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1722 */
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; goto __pyx_L1;}
__pyx_6 = PyObject_GetItem(__pyx_v_parms, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_g, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1722; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1723 */
__pyx_3 = PyInt_FromLong(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1723; goto __pyx_L1;}
__pyx_5 = PyObject_GetItem(__pyx_v_parms, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1723; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_y, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1723; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1724 */
__pyx_4 = PyInt_FromLong(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; goto __pyx_L1;}
__pyx_2 = PyObject_GetItem(__pyx_v_parms, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_x, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1726 */
__pyx_6 = __Pyx_GetName(__pyx_m, __pyx_n_size); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
__pyx_3 = 0;
__pyx_4 = PyObject_CallObject(__pyx_6, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_keysize, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("SSLCrypto.ElGamal.importPrivKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_parms);
return __pyx_r;
}


static PyObject *__pyx_f_9SSLCrypto_7ElGamal_hasPrivateKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_hasPrivateKey[] = "\n        Returns <b>True</b> if private key is present in this key object (and therefore the\n        key object is capable of decryption), or <b>False</b> if not.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_hasPrivateKey = {"hasPrivateKey", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_hasPrivateKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_hasPrivateKey};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_hasPrivateKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1741 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_hasattr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; goto __pyx_L1;}
Py_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_self);
Py_INCREF(__pyx_n_x);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_n_x);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_4 = PyObject_IsTrue(__pyx_3); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1742 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__True); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1742; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1744 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.ElGamal.hasPrivateKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_pubKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_pubKey[] = "Return tuple containing only the public information.";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_pubKey = {"pubKey", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_pubKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_pubKey};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_pubKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1749 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_g); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_y); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; goto __pyx_L1;}
__pyx_4 = PyTuple_New(3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_2);
PyTuple_SET_ITEM(__pyx_4, 2, __pyx_3);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_3 = 0;
__pyx_r = __pyx_4;
__pyx_4 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.ElGamal.pubKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_privKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_privKey[] = "Return tuple containing the public and private information.";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_privKey = {"privKey", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_privKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_privKey};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_privKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1754 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_p); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_g); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_y); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_x); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; goto __pyx_L1;}
__pyx_5 = PyTuple_New(4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_5, 1, __pyx_2);
PyTuple_SET_ITEM(__pyx_5, 2, __pyx_3);
PyTuple_SET_ITEM(__pyx_5, 3, __pyx_4);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_3 = 0;
__pyx_4 = 0;
__pyx_r = __pyx_5;
__pyx_5 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.ElGamal.privKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_7ElGamal_maxSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal_maxSize[] = "\n        Returns the maximum allowable size of plaintext strings which can\n        be encrypted\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal_maxSize = {"maxSize", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal_maxSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal_maxSize};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal_maxSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1764 */
__pyx_1 = PyInt_FromLong(128); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1764; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("SSLCrypto.ElGamal.maxSize");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_7ElGamal___eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_7ElGamal___eq__[] = "__eq__(other): 0, 1\n        Compare us to other for equality.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_7ElGamal___eq__ = {"__eq__", (PyCFunction)__pyx_f_9SSLCrypto_7ElGamal___eq__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_7ElGamal___eq__};
static PyObject *__pyx_f_9SSLCrypto_7ElGamal___eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"self","other",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_other)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_other);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1771 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___getstate__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = PyObject_GetAttr(__pyx_v_other, __pyx_n___getstate__); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; goto __pyx_L1;}
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_Cmp(__pyx_3, __pyx_4, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = PyInt_FromLong(__pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1771; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.ElGamal.__eq__");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_other);
return __pyx_r;
}

static PyObject *__pyx_k61p;
static PyObject *__pyx_k62p;
static PyObject *__pyx_k69p;

static PyObject *__pyx_n_join;
static PyObject *__pyx_n_keys;
static PyObject *__pyx_n_algoPub;
static PyObject *__pyx_n_algoPname;
static PyObject *__pyx_n__aldosSes;
static PyObject *__pyx_n_algoSes;
static PyObject *__pyx_n_algoSname;
static PyObject *__pyx_n_passphrase;

static PyObject *__pyx_k118p;
static PyObject *__pyx_k117p;
static PyObject *__pyx_k121p;
static PyObject *__pyx_k122p;
static PyObject *__pyx_k123p;
static PyObject *__pyx_k126p;
static PyObject *__pyx_k127p;
static PyObject *__pyx_k128p;

static char (__pyx_k117[]) = "AlgoPub must be one of: ";
static char (__pyx_k118[]) = ",";
static char (__pyx_k121[]) = "AlgoSess must be one of %s";
static char (__pyx_k122[]) = "";
static char (__pyx_k123[]) = "Don't specify algoPub if importing a key";
static char (__pyx_k126[]) = "";
static char (__pyx_k127[]) = "Attempted to import invalid key, or passphrase is bad";
static char (__pyx_k128[]) = "Must pass keysize or importable keys";

static PyObject *__pyx_f_9SSLCrypto_3key___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key___init__[] = "Constructor. Creates a key object<br><br>\n    \n        This constructor, when creating the key object, does one of\n        two things:\n         - Creates a completely new keypair, OR\n         - Imports an existing keypair\n    \n        Arguments:\n         - If new keys are desired:\n           - key size in bits (int), default 1024 - advise 2048 or more\n           - algoPub - only \'RSA\' (default) or \'ElGamal\' presently supported\n           - algoSess - only \'Blowfish\' (default) presently supported\n    \n         - If importing an existing key or keypair:\n            - keyobj (string) - result of a prior exportKey() call\n        \n        Keywords:\n         - passphrase - default \'\':\n            - If creating new keypair, this passphrase is used to encrypt privkey when\n              exporting.\n            - If importing a new keypair, the passphrase is used to authenticate and\n              grant/deny access to private key\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key___init__ = {"__init__", (PyCFunction)__pyx_f_9SSLCrypto_3key___init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key___init__};
static PyObject *__pyx_f_9SSLCrypto_3key___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_something = 0;
PyObject *__pyx_v_algoPub = 0;
PyObject *__pyx_v_algoSess = 0;
PyObject *__pyx_v_kw = 0;
PyObject *__pyx_v_algoP;
PyObject *__pyx_v_algoS;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
static char *__pyx_argnames[] = {"self","something","algoPub","algoSess",0};
__pyx_v_something = __pyx_k63;
__pyx_v_algoPub = __pyx_k64;
__pyx_v_algoSess = __pyx_k65;
if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 4, 0, &__pyx_v_kw) < 0) return 0;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|OOO", __pyx_argnames, &__pyx_v_self, &__pyx_v_something, &__pyx_v_algoPub, &__pyx_v_algoSess)) {
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
Py_XDECREF(__pyx_v_kw);
return 0;
}
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_something);
Py_INCREF(__pyx_v_algoPub);
Py_INCREF(__pyx_v_algoSess);
__pyx_v_algoP = Py_None; Py_INCREF(Py_None);
__pyx_v_algoS = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1901 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; goto __pyx_L1;}
Py_INCREF(__pyx_v_something);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_something);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_types); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_IntType); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_types); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_1, __pyx_n_LongType); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyList_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; goto __pyx_L1;}
PyList_SET_ITEM(__pyx_1, 0, __pyx_2);
PyList_SET_ITEM(__pyx_1, 1, __pyx_4);
__pyx_2 = 0;
__pyx_4 = 0;
__pyx_5 = PySequence_Contains(__pyx_1, __pyx_3); if (__pyx_5 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1901; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1904 */
if (PyObject_Cmp(__pyx_v_algoPub, Py_None, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1904; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1905 */
Py_INCREF(__pyx_n_RSA);
Py_DECREF(__pyx_v_algoPub);
__pyx_v_algoPub = __pyx_n_RSA;
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1906 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__algosPub); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_n_get); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; goto __pyx_L1;}
Py_INCREF(__pyx_v_algoPub);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_algoPub);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_3, 1, Py_None);
__pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_algoP);
__pyx_v_algoP = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1907 */
if (PyObject_Cmp(__pyx_v_algoP, Py_None, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1907; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1909 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_k118p, __pyx_n_join); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__algosPub); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_keys); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
__pyx_6 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_6);
__pyx_6 = 0;
__pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_6 = PyNumber_Add(__pyx_k117p, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_6);
__pyx_6 = 0;
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__Pyx_Raise(__pyx_1, 0, 0);
Py_DECREF(__pyx_1); __pyx_1 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; goto __pyx_L1;}
goto __pyx_L4;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1910 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_algoPub, __pyx_v_algoP) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1911 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_algoPname, __pyx_v_algoPub) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1911; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1912 */
__pyx_3 = PyObject_GetAttr(__pyx_v_kw, __pyx_n_get); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; goto __pyx_L1;}
__pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; goto __pyx_L1;}
Py_INCREF(__pyx_n_myCallback);
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_n_myCallback);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_6, 1, Py_None);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_callback, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1912; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1915 */
if (PyObject_Cmp(__pyx_v_algoSess, Py_None, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1916 */
Py_INCREF(__pyx_n_Blowfish);
Py_DECREF(__pyx_v_algoSess);
__pyx_v_algoSess = __pyx_n_Blowfish;
goto __pyx_L5;
}
__pyx_L5:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1917 */
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__algosSes); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; goto __pyx_L1;}
Py_INCREF(__pyx_v_algoSess);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_algoSess);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_3, 1, Py_None);
__pyx_6 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1917; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_algoS);
__pyx_v_algoS = __pyx_6;
__pyx_6 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1918 */
if (PyObject_Cmp(__pyx_v_algoS, Py_None, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1920 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__aldosSes); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_n_keys); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; goto __pyx_L1;}
__pyx_6 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = PyNumber_Remainder(__pyx_k121p, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_4);
__pyx_4 = 0;
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__Pyx_Raise(__pyx_3, 0, 0);
Py_DECREF(__pyx_3); __pyx_3 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; goto __pyx_L1;}
goto __pyx_L6;
}
__pyx_L6:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1922 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_algoSes, __pyx_v_algoS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1923 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_algoSname, __pyx_v_algoSess) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1923; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1928 */
__pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_makeNewKeys); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1928; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1928; goto __pyx_L1;}
Py_INCREF(__pyx_v_something);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_something);
__pyx_2 = PyEval_CallObjectWithKeywords(__pyx_6, __pyx_4, __pyx_v_kw); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1928; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
goto __pyx_L2;
}
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; goto __pyx_L1;}
Py_INCREF(__pyx_v_something);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_something);
__pyx_6 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; goto __pyx_L1;}
Py_INCREF(__pyx_k122p);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k122p);
__pyx_1 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1930; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_5 = __pyx_6 == __pyx_1;
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1931 */
if (PyObject_Cmp(__pyx_v_algoPub, Py_None, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1931; goto __pyx_L1;}
__pyx_5 = __pyx_5 != 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1932 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; goto __pyx_L1;}
Py_INCREF(__pyx_k123p);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k123p);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__Pyx_Raise(__pyx_2, 0, 0);
Py_DECREF(__pyx_2); __pyx_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1932; goto __pyx_L1;}
goto __pyx_L7;
}
__pyx_L7:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1933 */
__pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_importKey); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
Py_INCREF(__pyx_v_something);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_something);
__pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_v_kw, __pyx_n_get); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
Py_INCREF(__pyx_n_passphrase);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_passphrase);
Py_INCREF(__pyx_k126p);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_k126p);
__pyx_7 = PyObject_CallObject(__pyx_4, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyDict_SetItem(__pyx_3, __pyx_n_passphrase, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
__pyx_4 = PyEval_CallObjectWithKeywords(__pyx_6, __pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_4, __pyx_2, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1933; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1935 */
__pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_CryptoKeyError); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; goto __pyx_L1;}
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; goto __pyx_L1;}
Py_INCREF(__pyx_k127p);
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_k127p);
__pyx_1 = PyObject_CallObject(__pyx_7, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__Pyx_Raise(__pyx_1, 0, 0);
Py_DECREF(__pyx_1); __pyx_1 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1935; goto __pyx_L1;}
goto __pyx_L8;
}
__pyx_L8:;
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1938 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; goto __pyx_L1;}
Py_INCREF(__pyx_k128p);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_k128p);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__Pyx_Raise(__pyx_2, 0, 0);
Py_DECREF(__pyx_2); __pyx_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 1938; goto __pyx_L1;}
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
__Pyx_AddTraceback("SSLCrypto.key.__init__");
__pyx_r = 0;
__pyx_L0:;
Py_XDECREF(__pyx_v_kw);
Py_DECREF(__pyx_v_algoP);
Py_DECREF(__pyx_v_algoS);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_something);
Py_DECREF(__pyx_v_algoPub);
Py_DECREF(__pyx_v_algoSess);
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
return __pyx_r;
}

static PyObject *__pyx_n_k;

static PyObject *__pyx_k130p;
static PyObject *__pyx_k131p;

static char (__pyx_k130[]) = "";
static char (__pyx_k131[]) = "";

static PyObject *__pyx_f_9SSLCrypto_3key_makeNewKeys(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_makeNewKeys[] = "\n        Creates a new keypair in cipher object, and a new session key\n    \n        Arguments:\n          - keysize (default 512), advise at least 1536\n    \n        Returns:\n          - None\n    \n        Keywords:\n          - passphrase - used to secure exported private key - default \'\' (no passphrase)\n          - e - e value, in case of RSA\n        </ul>\n    \n        Keypair gets stored within the key object. Refer exportKey()\n        exportKeyPrivate() and importKey()\n        \n        Generally no need to call this yourself, since the constructor\n        calls this in cases where you aren\'t instantiating with an\n        importable key.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_makeNewKeys = {"makeNewKeys", (PyCFunction)__pyx_f_9SSLCrypto_3key_makeNewKeys, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_makeNewKeys};
static PyObject *__pyx_f_9SSLCrypto_3key_makeNewKeys(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_keysize = 0;
PyObject *__pyx_v_kw = 0;
PyObject *__pyx_v_passphrase;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
static char *__pyx_argnames[] = {"self","keysize",0};
__pyx_v_keysize = __pyx_k66;
if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 2, 0, &__pyx_v_kw) < 0) return 0;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_self, &__pyx_v_keysize)) {
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
Py_XDECREF(__pyx_v_kw);
return 0;
}
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_keysize);
__pyx_v_passphrase = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1966 */
__pyx_1 = PyObject_GetAttr(__pyx_v_kw, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; goto __pyx_L1;}
Py_INCREF(__pyx_n_passphrase);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_passphrase);
Py_INCREF(__pyx_k130p);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_k130p);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1966; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_passphrase);
__pyx_v_passphrase = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1967 */
if (PyObject_Cmp(__pyx_v_passphrase, Py_None, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; goto __pyx_L1;}
__pyx_4 = __pyx_4 == 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1968 */
Py_INCREF(__pyx_k131p);
Py_DECREF(__pyx_v_passphrase);
__pyx_v_passphrase = __pyx_k131p;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1969 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_passphrase, __pyx_v_passphrase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1969; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1972 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_algoPub); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_k, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1973 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_generateKey); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; goto __pyx_L1;}
Py_INCREF(__pyx_v_keysize);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_keysize);
__pyx_1 = PyEval_CallObjectWithKeywords(__pyx_2, __pyx_3, __pyx_v_kw); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1976 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__calcPubBlkSize); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; goto __pyx_L1;}
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; goto __pyx_L1;}
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1979 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__genNewSessKey); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; goto __pyx_L1;}
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; goto __pyx_L1;}
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1979; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1982 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__initBlkCipher); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; goto __pyx_L1;}
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; goto __pyx_L1;}
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1982; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.makeNewKeys");
__pyx_r = 0;
__pyx_L0:;
Py_XDECREF(__pyx_v_kw);
Py_DECREF(__pyx_v_passphrase);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_keysize);
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
return __pyx_r;
}

static PyObject *__pyx_n_Key;

static PyObject *__pyx_k133p;
static PyObject *__pyx_k134p;
static PyObject *__pyx_k137p;

static char (__pyx_k133[]) = "";
static char (__pyx_k134[]) = "";
static char (__pyx_k137[]) = "AlgoSess must be one of %s";

static PyObject *__pyx_f_9SSLCrypto_3key_importKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_importKey[] = "\n        Imports a public key or private/public key pair.<br><br>\n    \n        (as previously exported from this object\n        with the <b>exportKey</b> or <b>exportKeyPrivate</b> methods.<br><br>\n    \n        Arguments:<ul>\n        <li><b>keystring</b> - a string previously imported with\n        <b>exportKey</b> or <b>exportKeyPrivate</b></li>\n        </ul>\n        \n        Keywords:<ul>\n        <li><b>passphrase</b> - string (default \'\', meaning \'try to import without passphrase\')\n        </li></ul>\n        \n        Returns:<ul>\n        <li><b>True</b> if import successful, <b>False</b> if failed<li>\n        </ul>\n    \n        You don\'t have to call this if you instantiate your key object\n        in \'import\' mode - ie, by calling it with a previously exported key.<br><br>\n    \n        Note - you shouldn\'t give a \'passphrase\' when importing a public key.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_importKey = {"importKey", (PyCFunction)__pyx_f_9SSLCrypto_3key_importKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_importKey};
static PyObject *__pyx_f_9SSLCrypto_3key_importKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_keystring = 0;
PyObject *__pyx_v_kwds = 0;
PyObject *__pyx_v_passphrase;
PyObject *__pyx_v_screwed;
PyObject *__pyx_v_keypickle;
PyObject *__pyx_v_keytuple;
PyObject *__pyx_v_ispriv;
PyObject *__pyx_v_haspass;
PyObject *__pyx_v_keyobj;
PyObject *__pyx_v_ppCipher;
PyObject *__pyx_v_c;
PyObject *__pyx_v_oc;
PyObject *__pyx_v_keyparms;
PyObject *__pyx_v_algoSess;
PyObject *__pyx_v_algoS;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
PyObject *__pyx_5 = 0;
int __pyx_6;
static char *__pyx_argnames[] = {"self","keystring",0};
if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 2, 0, &__pyx_v_kwds) < 0) return 0;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_keystring)) {
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
Py_XDECREF(__pyx_v_kwds);
return 0;
}
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_keystring);
__pyx_v_passphrase = Py_None; Py_INCREF(Py_None);
__pyx_v_screwed = Py_None; Py_INCREF(Py_None);
__pyx_v_keypickle = Py_None; Py_INCREF(Py_None);
__pyx_v_keytuple = Py_None; Py_INCREF(Py_None);
__pyx_v_ispriv = Py_None; Py_INCREF(Py_None);
__pyx_v_haspass = Py_None; Py_INCREF(Py_None);
__pyx_v_keyobj = Py_None; Py_INCREF(Py_None);
__pyx_v_ppCipher = Py_None; Py_INCREF(Py_None);
__pyx_v_c = Py_None; Py_INCREF(Py_None);
__pyx_v_oc = Py_None; Py_INCREF(Py_None);
__pyx_v_keyparms = Py_None; Py_INCREF(Py_None);
__pyx_v_algoSess = Py_None; Py_INCREF(Py_None);
__pyx_v_algoS = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2011 */
__pyx_1 = PyObject_GetAttr(__pyx_v_kwds, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; goto __pyx_L1;}
Py_INCREF(__pyx_n_passphrase);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_passphrase);
Py_INCREF(__pyx_k133p);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_k133p);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2011; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_passphrase);
__pyx_v_passphrase = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2012 */
if (PyObject_Cmp(__pyx_v_passphrase, Py_None, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2012; goto __pyx_L1;}
__pyx_4 = __pyx_4 == 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2013 */
Py_INCREF(__pyx_k134p);
Py_DECREF(__pyx_v_passphrase);
__pyx_v_passphrase = __pyx_k134p;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2015 */
__pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2015; goto __pyx_L1;}
Py_DECREF(__pyx_v_screwed);
__pyx_v_screwed = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2017 */
/*try:*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2018 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__unwrap); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; goto __pyx_L3;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; goto __pyx_L3;}
Py_INCREF(__pyx_n_Key);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_Key);
Py_INCREF(__pyx_v_keystring);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_keystring);
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2018; goto __pyx_L3;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_keypickle);
__pyx_v_keypickle = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2024 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_bdecode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; goto __pyx_L3;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; goto __pyx_L3;}
Py_INCREF(__pyx_v_keypickle);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_keypickle);
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2024; goto __pyx_L3;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_keytuple);
__pyx_v_keytuple = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2026 */
__pyx_2 = __Pyx_UnpackItem(__pyx_v_keytuple, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; goto __pyx_L3;}
Py_DECREF(__pyx_v_ispriv);
__pyx_v_ispriv = __pyx_2;
__pyx_2 = 0;
__pyx_3 = __Pyx_UnpackItem(__pyx_v_keytuple, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; goto __pyx_L3;}
Py_DECREF(__pyx_v_haspass);
__pyx_v_haspass = __pyx_3;
__pyx_3 = 0;
__pyx_1 = __Pyx_UnpackItem(__pyx_v_keytuple, 2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; goto __pyx_L3;}
Py_DECREF(__pyx_v_keyobj);
__pyx_v_keyobj = __pyx_1;
__pyx_1 = 0;
if (__Pyx_EndUnpack(__pyx_v_keytuple, 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2026; goto __pyx_L3;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2028 */
__pyx_4 = PyObject_IsTrue(__pyx_v_haspass); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2028; goto __pyx_L3;}
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2029 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__passIV); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; goto __pyx_L3;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; goto __pyx_L3;}
Py_INCREF(__pyx_v_passphrase);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_passphrase);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
__pyx_2 = 0;
__pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_9SSLCrypto_blowfish), __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2029; goto __pyx_L3;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_ppCipher);
__pyx_v_ppCipher = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2030 */
__pyx_2 = PyObject_GetAttr(__pyx_v_ppCipher, __pyx_n_decrypt); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; goto __pyx_L3;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; goto __pyx_L3;}
Py_INCREF(__pyx_v_keyobj);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_keyobj);
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2030; goto __pyx_L3;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_keyobj);
__pyx_v_keyobj = __pyx_1;
__pyx_1 = 0;
goto __pyx_L5;
}
__pyx_L5:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2040 */
__pyx_2 = PyObject_GetIter(__pyx_v_keyobj); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; goto __pyx_L3;}
for (;;) {
__pyx_L6:;
__pyx_3 = PyIter_Next(__pyx_2);
if (!__pyx_3) {
if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; goto __pyx_L3;}
break;
}
Py_DECREF(__pyx_v_c);
__pyx_v_c = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2041 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; goto __pyx_L3;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; goto __pyx_L3;}
Py_INCREF(__pyx_v_c);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_c);
__pyx_5 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2041; goto __pyx_L3;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_oc);
__pyx_v_oc = __pyx_5;
__pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2042 */
__pyx_1 = PyInt_FromLong(127); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2042; goto __pyx_L3;}
if (PyObject_Cmp(__pyx_v_oc, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2042; goto __pyx_L3;}
__pyx_4 = __pyx_4 > 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2044 */
__pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2044; goto __pyx_L3;}
Py_DECREF(__pyx_v_screwed);
__pyx_v_screwed = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2045 */
goto __pyx_L7;
goto __pyx_L8;
}
__pyx_L8:;
}
__pyx_L7:;
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2047 */
__pyx_4 = PyObject_IsTrue(__pyx_v_screwed); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2047; goto __pyx_L3;}
__pyx_6 = (!__pyx_4);
if (__pyx_6) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2052 */
__pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_bdecode); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; goto __pyx_L3;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; goto __pyx_L3;}
Py_INCREF(__pyx_v_keyobj);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_keyobj);
__pyx_3 = PyObject_CallObject(__pyx_5, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; goto __pyx_L3;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_2 = __Pyx_UnpackItem(__pyx_3, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; goto __pyx_L3;}
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_algoPname, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; goto __pyx_L3;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_5 = __Pyx_UnpackItem(__pyx_3, 1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; goto __pyx_L3;}
Py_DECREF(__pyx_v_keyparms);
__pyx_v_keyparms = __pyx_5;
__pyx_5 = 0;
if (__Pyx_EndUnpack(__pyx_3, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2052; goto __pyx_L3;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2056 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__algosPub); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; goto __pyx_L3;}
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_algoPname); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; goto __pyx_L3;}
__pyx_5 = PyObject_GetItem(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; goto __pyx_L3;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_algoPub, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2056; goto __pyx_L3;}
Py_DECREF(__pyx_5); __pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2059 */
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_algoPub); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; goto __pyx_L3;}
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; goto __pyx_L3;}
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; goto __pyx_L3;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_k, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2059; goto __pyx_L3;}
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2060 */
__pyx_4 = PyObject_IsTrue(__pyx_v_ispriv); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2060; goto __pyx_L3;}
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2061 */
__pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; goto __pyx_L3;}
__pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_importPrivKey); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; goto __pyx_L3;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; goto __pyx_L3;}
Py_INCREF(__pyx_v_keyparms);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_keyparms);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; goto __pyx_L3;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
goto __pyx_L10;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2063 */
__pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2063; goto __pyx_L3;}
__pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_importPubKey); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2063; goto __pyx_L3;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2063; goto __pyx_L3;}
Py_INCREF(__pyx_v_keyparms);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_keyparms);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2063; goto __pyx_L3;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
}
__pyx_L10:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2066 */
__pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n__calcPubBlkSize); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; goto __pyx_L3;}
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; goto __pyx_L3;}
__pyx_1 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2066; goto __pyx_L3;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2067 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_passphrase, __pyx_v_passphrase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2067; goto __pyx_L3;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2070 */
Py_INCREF(__pyx_n_Blowfish);
Py_DECREF(__pyx_v_algoSess);
__pyx_v_algoSess = __pyx_n_Blowfish;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2071 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__algosSes); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; goto __pyx_L3;}
__pyx_5 = PyObject_GetAttr(__pyx_2, __pyx_n_get); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; goto __pyx_L3;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; goto __pyx_L3;}
Py_INCREF(__pyx_v_algoSess);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_algoSess);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_3, 1, Py_None);
__pyx_1 = PyObject_CallObject(__pyx_5, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2071; goto __pyx_L3;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_algoS);
__pyx_v_algoS = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2072 */
if (PyObject_Cmp(__pyx_v_algoS, Py_None, &__pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2072; goto __pyx_L3;}
__pyx_6 = __pyx_6 == 0;
if (__pyx_6) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2074 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2074; goto __pyx_L3;}
__pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n__aldosSes); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2075; goto __pyx_L3;}
__pyx_3 = PyObject_GetAttr(__pyx_5, __pyx_n_keys); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2075; goto __pyx_L3;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2075; goto __pyx_L3;}
__pyx_5 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2075; goto __pyx_L3;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_3 = PyNumber_Remainder(__pyx_k137p, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2075; goto __pyx_L3;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2074; goto __pyx_L3;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
__pyx_3 = 0;
__pyx_5 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2074; goto __pyx_L3;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__Pyx_Raise(__pyx_5, 0, 0);
Py_DECREF(__pyx_5); __pyx_5 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2074; goto __pyx_L3;}
goto __pyx_L11;
}
__pyx_L11:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2076 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_algoSes, __pyx_v_algoS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2076; goto __pyx_L3;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2077 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_algoSname, __pyx_v_algoSess) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2077; goto __pyx_L3;}
goto __pyx_L9;
}
__pyx_L9:;
}
goto __pyx_L4;
__pyx_L3:;
Py_XDECREF(__pyx_3); __pyx_3 = 0;
Py_XDECREF(__pyx_2); __pyx_2 = 0;
Py_XDECREF(__pyx_1); __pyx_1 = 0;
Py_XDECREF(__pyx_5); __pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2079 */
/*except:*/ {
__Pyx_AddTraceback("SSLCrypto.importKey");
__pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2079; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2082 */
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2082; goto __pyx_L1;}
Py_DECREF(__pyx_v_screwed);
__pyx_v_screwed = __pyx_2;
__pyx_2 = 0;
goto __pyx_L4;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2084 */
__pyx_4 = PyObject_IsTrue(__pyx_v_screwed); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2084; goto __pyx_L1;}
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2086 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;
goto __pyx_L12;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2089 */
__pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__True); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2089; goto __pyx_L1;}
__pyx_r = __pyx_5;
__pyx_5 = 0;
goto __pyx_L0;
}
__pyx_L12:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.key.importKey");
__pyx_r = 0;
__pyx_L0:;
Py_XDECREF(__pyx_v_kwds);
Py_DECREF(__pyx_v_passphrase);
Py_DECREF(__pyx_v_screwed);
Py_DECREF(__pyx_v_keypickle);
Py_DECREF(__pyx_v_keytuple);
Py_DECREF(__pyx_v_ispriv);
Py_DECREF(__pyx_v_haspass);
Py_DECREF(__pyx_v_keyobj);
Py_DECREF(__pyx_v_ppCipher);
Py_DECREF(__pyx_v_c);
Py_DECREF(__pyx_v_oc);
Py_DECREF(__pyx_v_keyparms);
Py_DECREF(__pyx_v_algoSess);
Py_DECREF(__pyx_v_algoS);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_keystring);
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
return __pyx_r;
}


static PyObject *__pyx_f_9SSLCrypto_3key_exportKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_exportKey[] = "\n        Exports the public key as a printable string.<br><br>\n    \n        Exported keys can be imported elsewhere into MyCipher instances\n        with the <b>importKey</b> method.<br><br>\n        \n        Note that this object contains only the public key. If you want to\n        export the private key as well, call <b>exportKeyPrivate</b> instaead.<br><br>\n    \n        Note also that the exported string is Base64-encoded, and safe for sending\n        in email.<br><br>\n    \n        Arguments:<ul>\n        <li>None</li>\n        </ul>\n        Returns:<ul>\n        <li><b>base64-encoded string</b> containing an importable key</li>\n        </ul>\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_exportKey = {"exportKey", (PyCFunction)__pyx_f_9SSLCrypto_3key_exportKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_exportKey};
static PyObject *__pyx_f_9SSLCrypto_3key_exportKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_rawpub;
PyObject *__pyx_v_expTuple;
PyObject *__pyx_v_expPickle;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);
__pyx_v_rawpub = Py_None; Py_INCREF(Py_None);
__pyx_v_expTuple = Py_None; Py_INCREF(Py_None);
__pyx_v_expPickle = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2113 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__rawPubKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2113; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_rawpub);
__pyx_v_rawpub = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2115 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2115; goto __pyx_L1;}
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2115; goto __pyx_L1;}
__pyx_3 = PyTuple_New(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2115; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
Py_INCREF(__pyx_v_rawpub);
PyTuple_SET_ITEM(__pyx_3, 2, __pyx_v_rawpub);
__pyx_1 = 0;
__pyx_2 = 0;
Py_DECREF(__pyx_v_expTuple);
__pyx_v_expTuple = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2118 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bencode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2118; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2118; goto __pyx_L1;}
Py_INCREF(__pyx_v_expTuple);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_expTuple);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2118; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_expPickle);
__pyx_v_expPickle = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2120 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__wrap); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; goto __pyx_L1;}
Py_INCREF(__pyx_n_Key);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_Key);
Py_INCREF(__pyx_v_expPickle);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_expPickle);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2120; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.exportKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_rawpub);
Py_DECREF(__pyx_v_expTuple);
Py_DECREF(__pyx_v_expPickle);
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_k140p;

static char (__pyx_k140[]) = "";

static PyObject *__pyx_f_9SSLCrypto_3key_exportKeyPrivate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_exportKeyPrivate[] = "\n        Exports public/private key pair as a printable string.<br><br>\n    \n        This string is a binary string consisting of a pickled key object,\n        that can be imported elsewhere into <b>key</b> instances\n        with the <b>importKey</b> method.<br><br>\n        \n        Note that this object contains the public AND PRIVATE keys.\n        Don\'t EVER email any keys you export with this function (unless you\n        know what you\'re doing, and you encrypt the exported keys against\n        another key). When in doubt, use L{exportKey} instead.<br><br>\n    \n        Keep your private keys safe at all times. You have been warned.<br><br>\n    \n        Note also that the exported string is Base64-encoded, and safe for sending\n        in email.<br><br>\n    \n        Arguments:<ul>\n        <li>None</li>\n        </ul>\n        \n        Keywords:<ul>\n        <li><b>passphrase</b> - default (None) to using existing passphrase.\n        Set to \'\' to export without passphrase (if this is really what you want to do!)</li>\n        </ul>\n        Returns:<ul>\n        <li>A base64-encoded string containing an importable key, or None if there is no\n        private key available.</li>\n        </ul>\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_exportKeyPrivate = {"exportKeyPrivate", (PyCFunction)__pyx_f_9SSLCrypto_3key_exportKeyPrivate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_exportKeyPrivate};
static PyObject *__pyx_f_9SSLCrypto_3key_exportKeyPrivate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_kwds = 0;
PyObject *__pyx_v_passphrase;
PyObject *__pyx_v_rawpriv;
PyObject *__pyx_v_ppCipher;
PyObject *__pyx_v_encpriv;
PyObject *__pyx_v_keytuple;
PyObject *__pyx_v_keypickle;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
int __pyx_5;
static char *__pyx_argnames[] = {"self",0};
if (__Pyx_GetStarArgs(&__pyx_args, &__pyx_kwds, __pyx_argnames, 1, 0, &__pyx_v_kwds) < 0) return 0;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) {
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
Py_XDECREF(__pyx_v_kwds);
return 0;
}
Py_INCREF(__pyx_v_self);
__pyx_v_passphrase = Py_None; Py_INCREF(Py_None);
__pyx_v_rawpriv = Py_None; Py_INCREF(Py_None);
__pyx_v_ppCipher = Py_None; Py_INCREF(Py_None);
__pyx_v_encpriv = Py_None; Py_INCREF(Py_None);
__pyx_v_keytuple = Py_None; Py_INCREF(Py_None);
__pyx_v_keypickle = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2155 */
__pyx_1 = PyObject_GetAttr(__pyx_v_kwds, __pyx_n_get); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2155; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2155; goto __pyx_L1;}
Py_INCREF(__pyx_n_passphrase);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_passphrase);
Py_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_2, 1, Py_None);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2155; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_passphrase);
__pyx_v_passphrase = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2156 */
if (PyObject_Cmp(__pyx_v_passphrase, Py_None, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; goto __pyx_L1;}
__pyx_4 = __pyx_4 == 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2157 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_passphrase); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2157; goto __pyx_L1;}
Py_DECREF(__pyx_v_passphrase);
__pyx_v_passphrase = __pyx_1;
__pyx_1 = 0;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2159 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__rawPrivKey); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; goto __pyx_L1;}
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; goto __pyx_L1;}
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2159; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_rawpriv);
__pyx_v_rawpriv = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2160 */
__pyx_4 = PyObject_IsTrue(__pyx_v_rawpriv); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2160; goto __pyx_L1;}
__pyx_5 = (!__pyx_4);
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2161 */
Py_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2167 */
if (PyObject_Cmp(__pyx_v_passphrase, __pyx_k140p, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2167; goto __pyx_L1;}
__pyx_4 = __pyx_4 != 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2169 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__passIV); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2169; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2169; goto __pyx_L1;}
Py_INCREF(__pyx_v_passphrase);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_passphrase);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
__pyx_2 = 0;
__pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_9SSLCrypto_blowfish), __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2169; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_ppCipher);
__pyx_v_ppCipher = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2170 */
__pyx_2 = PyObject_GetAttr(__pyx_v_ppCipher, __pyx_n_encrypt); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2170; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2170; goto __pyx_L1;}
Py_INCREF(__pyx_v_rawpriv);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_rawpriv);
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2170; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_encpriv);
__pyx_v_encpriv = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2171 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2171; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__True); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2171; goto __pyx_L1;}
__pyx_1 = PyTuple_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2171; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_3);
Py_INCREF(__pyx_v_encpriv);
PyTuple_SET_ITEM(__pyx_1, 2, __pyx_v_encpriv);
__pyx_2 = 0;
__pyx_3 = 0;
Py_DECREF(__pyx_v_keytuple);
__pyx_v_keytuple = __pyx_1;
__pyx_1 = 0;
goto __pyx_L4;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2173 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__True); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2173; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2173; goto __pyx_L1;}
__pyx_1 = PyTuple_New(3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2173; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_2);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_3);
Py_INCREF(__pyx_v_rawpriv);
PyTuple_SET_ITEM(__pyx_1, 2, __pyx_v_rawpriv);
__pyx_2 = 0;
__pyx_3 = 0;
Py_DECREF(__pyx_v_keytuple);
__pyx_v_keytuple = __pyx_1;
__pyx_1 = 0;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2178 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_bencode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2178; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2178; goto __pyx_L1;}
Py_INCREF(__pyx_v_keytuple);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_keytuple);
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2178; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_keypickle);
__pyx_v_keypickle = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2180 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__wrap); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2180; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2180; goto __pyx_L1;}
Py_INCREF(__pyx_n_Key);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_Key);
Py_INCREF(__pyx_v_keypickle);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_keypickle);
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2180; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.exportKeyPrivate");
__pyx_r = 0;
__pyx_L0:;
Py_XDECREF(__pyx_v_kwds);
Py_DECREF(__pyx_v_passphrase);
Py_DECREF(__pyx_v_rawpriv);
Py_DECREF(__pyx_v_ppCipher);
Py_DECREF(__pyx_v_encpriv);
Py_DECREF(__pyx_v_keytuple);
Py_DECREF(__pyx_v_keypickle);
Py_DECREF(__pyx_v_self);
Py_XDECREF(__pyx_args);
Py_XDECREF(__pyx_kwds);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key_hasPrivateKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_hasPrivateKey[] = "\n        Returns 1 if this key object has a private key, 0 if not\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_hasPrivateKey = {"hasPrivateKey", (PyCFunction)__pyx_f_9SSLCrypto_3key_hasPrivateKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_hasPrivateKey};
static PyObject *__pyx_f_9SSLCrypto_3key_hasPrivateKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2187 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2187; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_hasPrivateKey); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2187; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2187; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2187; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.hasPrivateKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key_encString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_encString[] = "\n        Encrypt a string of data<br><br>\n    \n        High-level func. encrypts an entire string of data, returning the encrypted\n        string as binary.<br><Br>\n    \n        Arguments:<ul>\n        <li>raw string to encrypt</li>\n        </ul>\n        Returns:<ul>\n        <li>encrypted string as binary</li>\n        </ul>\n    \n        Note - the encrypted string can be stored in files, but I\'d suggest\n        not emailing them - use L{encStringToAscii} instead. The sole advantage\n        of this method is that it produces more compact data, and works a bit faster.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_encString = {"encString", (PyCFunction)__pyx_f_9SSLCrypto_3key_encString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_encString};
static PyObject *__pyx_f_9SSLCrypto_3key_encString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_enc;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self","raw",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_raw)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
__pyx_v_enc = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2211 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_encStart); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2211; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2211; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2211; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2213 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_encNext); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2213; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2213; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_raw);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2213; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_enc);
__pyx_v_enc = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2214 */
Py_INCREF(__pyx_v_enc);
__pyx_r = __pyx_v_enc;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.encString");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_enc);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
return __pyx_r;
}

static PyObject *__pyx_n_Message;


static PyObject *__pyx_f_9SSLCrypto_3key_encStringToAscii(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_encStringToAscii[] = "\n        Encrypts a string of data to printable ASCII format<br><br>\n    \n        Use this method instead of L{encString}, unless size and speed are\n        major issues.<br><br>\n    \n        This method returns encrypted data in bracketed  base64 format,\n        safe for sending in email.<br><br>\n    \n        Arguments:<ul>\n        <li><b>raw</b> - string to encrypt</li>\n        </ul>\n        Returns:<ul>\n        <li><b>enc</b> - encrypted string, text-wrapped and Base-64 encoded, safe for\n        mailing.</li>\n        </ul>\n    \n        There\'s an overhead with base64-encoding. It costs size, bandwidth and\n        speed. Unless you need ascii-safety, use encString() instead.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_encStringToAscii = {"encStringToAscii", (PyCFunction)__pyx_f_9SSLCrypto_3key_encStringToAscii, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_encStringToAscii};
static PyObject *__pyx_f_9SSLCrypto_3key_encStringToAscii(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_enc;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self","raw",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_raw)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
__pyx_v_enc = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2238 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_encString); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2238; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2238; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_raw);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2238; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_enc);
__pyx_v_enc = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2239 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__wrap); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; goto __pyx_L1;}
Py_INCREF(__pyx_n_Message);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_Message);
Py_INCREF(__pyx_v_enc);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_enc);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2239; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.encStringToAscii");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_enc);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key_decString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_decString[] = "\n        Decrypts a previously encrypted string.<br><Br>\n    \n        Arguments:<ul>\n        <li><b>enc</b> - string, previously encrypted in binary mode with encString</li>\n        </ul>\n        \n        Returns:<ul>\n        <li><b>dec</b> - raw decrypted string</li>\n        </ul>\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_decString = {"decString", (PyCFunction)__pyx_f_9SSLCrypto_3key_decString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_decString};
static PyObject *__pyx_f_9SSLCrypto_3key_decString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_enc = 0;
PyObject *__pyx_v_dec;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self","enc",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_enc)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_enc);
__pyx_v_dec = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2261 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_decStart); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2261; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2261; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2261; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2268 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_decNext); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2268; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2268; goto __pyx_L1;}
Py_INCREF(__pyx_v_enc);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_enc);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2268; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_dec);
__pyx_v_dec = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2269 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_decEnd); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2269; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2269; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2269; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2272 */
Py_INCREF(__pyx_v_dec);
__pyx_r = __pyx_v_dec;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.decString");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_dec);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_enc);
return __pyx_r;
}


static PyObject *__pyx_f_9SSLCrypto_3key_decStringFromAscii(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_decStringFromAscii[] = "\n        Decrypts a previously encrypted string in ASCII (base64)\n        format, as created by encryptAscii()<br><br>\n    \n        Arguments:<ul>\n        <li><b>enc</b>ascii-encrypted string, as previously encrypted with\n        encStringToAscii()</li>\n        </ul>\n        \n        Returns:<ul>\n        <li><b>dec</b> - decrypted string</li>\n        </ul>\n    \n        May generate an exception if the public key of the encrypted string\n        doesn\'t match the public/private keypair in this key object.<br><br>\n    \n        To work around this problem, either instantiate a key object with\n        the saved keypair, or use the <b>importKey()</b> function.<br><br>\n    \n        Exception will also occur if this object is not holding a private key\n        (which can happen if you import a key which was previously exported\n        via exportKey(). If you get this problem, use exportKeyPrivate() instead\n        to export your keypair.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_decStringFromAscii = {"decStringFromAscii", (PyCFunction)__pyx_f_9SSLCrypto_3key_decStringFromAscii, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_decStringFromAscii};
static PyObject *__pyx_f_9SSLCrypto_3key_decStringFromAscii(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_enc = 0;
PyObject *__pyx_v_wrapped;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self","enc",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_enc)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_enc);
__pyx_v_wrapped = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2302 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__unwrap); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2302; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2302; goto __pyx_L1;}
Py_INCREF(__pyx_n_Message);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_Message);
Py_INCREF(__pyx_v_enc);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_enc);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2302; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_wrapped);
__pyx_v_wrapped = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2303 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_decString); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2303; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2303; goto __pyx_L1;}
Py_INCREF(__pyx_v_wrapped);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_wrapped);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2303; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.decStringFromAscii");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_wrapped);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_enc);
return __pyx_r;
}

static PyObject *__pyx_n_new;
static PyObject *__pyx_n_update;
static PyObject *__pyx_n_Signature;


static PyObject *__pyx_f_9SSLCrypto_3key_signString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_signString[] = "\n        Sign a string using private key<br><br>\n    \n        Arguments:<ul>\n        <li><b>raw</b> - string to be signed</li>\n        <li><b>wrap</b> - wrap in email-friendly ASCII, default True\n        </ul>\n        \n        Returns:<ul>\n        <li>wrapped, base-64 encoded string of signature</li>\n        </ul>\n    \n        Note - private key must already be present in the key object.\n        Call <b>importKey()</b> for the right private key first if needed.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_signString = {"signString", (PyCFunction)__pyx_f_9SSLCrypto_3key_signString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_signString};
static PyObject *__pyx_f_9SSLCrypto_3key_signString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_wrap = 0;
PyObject *__pyx_v_m;
PyObject *__pyx_v_d;
PyObject *__pyx_v_s;
PyObject *__pyx_v_tup;
PyObject *__pyx_v_p;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
static char *__pyx_argnames[] = {"self","raw","wrap",0};
__pyx_v_wrap = __pyx_k67;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO|O", __pyx_argnames, &__pyx_v_self, &__pyx_v_raw, &__pyx_v_wrap)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
Py_INCREF(__pyx_v_wrap);
__pyx_v_m = Py_None; Py_INCREF(Py_None);
__pyx_v_d = Py_None; Py_INCREF(Py_None);
__pyx_v_s = Py_None; Py_INCREF(Py_None);
__pyx_v_tup = Py_None; Py_INCREF(Py_None);
__pyx_v_p = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2325 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_md5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2325; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_new); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2325; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2325; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2325; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_m);
__pyx_v_m = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2326 */
__pyx_2 = PyObject_GetAttr(__pyx_v_m, __pyx_n_update); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2326; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2326; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_raw);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2326; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2327 */
__pyx_2 = PyObject_GetAttr(__pyx_v_m, __pyx_n_digest); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2327; goto __pyx_L1;}
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2327; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2327; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_d);
__pyx_v_d = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2332 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2332; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_sign); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2332; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2332; goto __pyx_L1;}
Py_INCREF(__pyx_v_d);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_d);
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2332; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_s);
__pyx_v_s = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2335 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_algoPname); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2335; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2335; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
Py_INCREF(__pyx_v_s);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_s);
__pyx_1 = 0;
Py_DECREF(__pyx_v_tup);
__pyx_v_tup = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2340 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_bencode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2340; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2340; goto __pyx_L1;}
Py_INCREF(__pyx_v_tup);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_tup);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2340; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_p);
__pyx_v_p = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2343 */
__pyx_4 = PyObject_IsTrue(__pyx_v_wrap); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2343; goto __pyx_L1;}
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2344 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__wrap); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; goto __pyx_L1;}
__pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; goto __pyx_L1;}
Py_INCREF(__pyx_n_Signature);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_Signature);
Py_INCREF(__pyx_v_p);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_p);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_p);
__pyx_v_p = __pyx_3;
__pyx_3 = 0;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2346 */
Py_INCREF(__pyx_v_p);
__pyx_r = __pyx_v_p;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.signString");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_m);
Py_DECREF(__pyx_v_d);
Py_DECREF(__pyx_v_s);
Py_DECREF(__pyx_v_tup);
Py_DECREF(__pyx_v_p);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
Py_DECREF(__pyx_v_wrap);
return __pyx_r;
}


static PyObject *__pyx_f_9SSLCrypto_3key_verifyString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_verifyString[] = "\n        Verifies a string against a signature.<br><br>\n    \n        Object must first have the correct public key loaded. (see\n        <b>importKey</b>. An exception will occur if this is not the case.<br><br>\n    \n        Arguments:<ul>\n        <li><b>raw</b> - string to be verified</li>\n        <li><b>signature</b> - as produced when key is signed with <b>signString</b></li>\n        <li><b>wrap</b> - take signature as email-friendly wrapped (default True)</b></li>\n        </ul>\n        \n        Returns:<ul>\n        <li>True if signature is authentic, or False if not</li>\n        </ul>\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_verifyString = {"verifyString", (PyCFunction)__pyx_f_9SSLCrypto_3key_verifyString, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_verifyString};
static PyObject *__pyx_f_9SSLCrypto_3key_verifyString(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_signature = 0;
PyObject *__pyx_v_wrap = 0;
PyObject *__pyx_v_algoname;
PyObject *__pyx_v_rawsig;
PyObject *__pyx_v_m;
PyObject *__pyx_v_d;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"self","raw","signature","wrap",0};
__pyx_v_wrap = __pyx_k68;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO|O", __pyx_argnames, &__pyx_v_self, &__pyx_v_raw, &__pyx_v_signature, &__pyx_v_wrap)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
Py_INCREF(__pyx_v_signature);
Py_INCREF(__pyx_v_wrap);
__pyx_v_algoname = Py_None; Py_INCREF(Py_None);
__pyx_v_rawsig = Py_None; Py_INCREF(Py_None);
__pyx_v_m = Py_None; Py_INCREF(Py_None);
__pyx_v_d = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2369 */
__pyx_1 = PyObject_IsTrue(__pyx_v_wrap); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2369; goto __pyx_L1;}
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2370 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__unwrap); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2370; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2370; goto __pyx_L1;}
Py_INCREF(__pyx_n_Signature);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_Signature);
Py_INCREF(__pyx_v_signature);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_signature);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2370; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_signature);
__pyx_v_signature = __pyx_4;
__pyx_4 = 0;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2375 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_bdecode); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; goto __pyx_L1;}
Py_INCREF(__pyx_v_signature);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_signature);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = __Pyx_UnpackItem(__pyx_4, 0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; goto __pyx_L1;}
Py_DECREF(__pyx_v_algoname);
__pyx_v_algoname = __pyx_2;
__pyx_2 = 0;
__pyx_3 = __Pyx_UnpackItem(__pyx_4, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; goto __pyx_L1;}
Py_DECREF(__pyx_v_rawsig);
__pyx_v_rawsig = __pyx_3;
__pyx_3 = 0;
if (__Pyx_EndUnpack(__pyx_4, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2375; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2378 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_algoPname); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2378; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_v_algoname, __pyx_2, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2378; goto __pyx_L1;}
__pyx_1 = __pyx_1 != 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2379 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2379; goto __pyx_L1;}
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2382 */
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_md5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_new); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; goto __pyx_L1;}
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2382; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_m);
__pyx_v_m = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2383 */
__pyx_2 = PyObject_GetAttr(__pyx_v_m, __pyx_n_update); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2383; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2383; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_raw);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2383; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2384 */
__pyx_2 = PyObject_GetAttr(__pyx_v_m, __pyx_n_digest); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; goto __pyx_L1;}
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; goto __pyx_L1;}
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2384; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_d);
__pyx_v_d = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2389 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_verify); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; goto __pyx_L1;}
Py_INCREF(__pyx_v_d);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_d);
Py_INCREF(__pyx_v_rawsig);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_rawsig);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = PyObject_IsTrue(__pyx_2); if (__pyx_1 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2389; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2390 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__True); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2390; goto __pyx_L1;}
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;
goto __pyx_L4;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2392 */
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2392; goto __pyx_L1;}
__pyx_r = __pyx_4;
__pyx_4 = 0;
goto __pyx_L0;
}
__pyx_L4:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.key.verifyString");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_algoname);
Py_DECREF(__pyx_v_rawsig);
Py_DECREF(__pyx_v_m);
Py_DECREF(__pyx_v_d);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
Py_DECREF(__pyx_v_signature);
Py_DECREF(__pyx_v_wrap);
return __pyx_r;
}

static PyObject *__pyx_n_sessKey;

static PyObject *__pyx_f_9SSLCrypto_3key_getSessKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_getSessKey[] = "\n        Returns the current cipher\'s session key\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_getSessKey = {"getSessKey", (PyCFunction)__pyx_f_9SSLCrypto_3key_getSessKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_getSessKey};
static PyObject *__pyx_f_9SSLCrypto_3key_getSessKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2401 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2401; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("SSLCrypto.key.getSessKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_n_sessIV;

static PyObject *__pyx_f_9SSLCrypto_3key_getSessIV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_getSessIV[] = "\n        Returns the starting IV for current session cipher\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_getSessIV = {"getSessIV", (PyCFunction)__pyx_f_9SSLCrypto_3key_getSessIV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_getSessIV};
static PyObject *__pyx_f_9SSLCrypto_3key_getSessIV(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2408 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessIV); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2408; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("SSLCrypto.key.getSessIV");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key_setSessKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_setSessKey[] = "\n        Resets block cipher to use given session key and IV\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_setSessKey = {"setSessKey", (PyCFunction)__pyx_f_9SSLCrypto_3key_setSessKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_setSessKey};
static PyObject *__pyx_f_9SSLCrypto_3key_setSessKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_sessKey = 0;
PyObject *__pyx_v_IV = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self","sessKey","IV",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_self, &__pyx_v_sessKey, &__pyx_v_IV)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_sessKey);
Py_INCREF(__pyx_v_IV);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2415 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__setNewSessKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2415; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2415; goto __pyx_L1;}
Py_INCREF(__pyx_v_sessKey);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_sessKey);
Py_INCREF(__pyx_v_IV);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_IV);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2415; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2416 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__initBlkCipher); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.setSessKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_sessKey);
Py_DECREF(__pyx_v_IV);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key_genSessKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_genSessKey[] = "\n        Resets block cipher to use random session key and IV\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_genSessKey = {"genSessKey", (PyCFunction)__pyx_f_9SSLCrypto_3key_genSessKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_genSessKey};
static PyObject *__pyx_f_9SSLCrypto_3key_genSessKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2423 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__genNewSessKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2423; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2424 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__initBlkCipher); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2424; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.genSessKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_n_blkCipher;

static PyObject *__pyx_f_9SSLCrypto_3key_encStringSess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_encStringSess[] = "\n        Encrypts a string against the session cipher,\n        with none of the high=level packaging\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_encStringSess = {"encStringSess", (PyCFunction)__pyx_f_9SSLCrypto_3key_encStringSess, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_encStringSess};
static PyObject *__pyx_f_9SSLCrypto_3key_encStringSess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_plain = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self","plain",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_plain)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_plain);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2432 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_blkCipher); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_encrypt); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; goto __pyx_L1;}
Py_INCREF(__pyx_v_plain);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_plain);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2432; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.encStringSess");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_plain);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key_decStringSess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_decStringSess[] = "\n        Decrypts a string against the session cipher,\n        with none of the high=level packaging\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_decStringSess = {"decStringSess", (PyCFunction)__pyx_f_9SSLCrypto_3key_decStringSess, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_decStringSess};
static PyObject *__pyx_f_9SSLCrypto_3key_decStringSess(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_ciphertext = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self","ciphertext",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_ciphertext)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_ciphertext);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2440 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_blkCipher); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2440; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_decrypt); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2440; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2440; goto __pyx_L1;}
Py_INCREF(__pyx_v_ciphertext);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_ciphertext);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2440; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.decStringSess");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_ciphertext);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_test[] = "\n        Encrypts, then decrypts a string. What you get back should\n        be the same as what you put in.\n    \n        This is totally useless - it just gives a way to test if this API\n        is doing what it should.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_test = {"test", (PyCFunction)__pyx_f_9SSLCrypto_3key_test, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_test};
static PyObject *__pyx_f_9SSLCrypto_3key_test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_enc;
PyObject *__pyx_v_dec;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self","raw",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_raw)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
__pyx_v_enc = Py_None; Py_INCREF(Py_None);
__pyx_v_dec = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2452 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_encString); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2452; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2452; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_raw);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2452; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_enc);
__pyx_v_enc = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2453 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_decString); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; goto __pyx_L1;}
Py_INCREF(__pyx_v_enc);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_enc);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_dec);
__pyx_v_dec = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2454 */
Py_INCREF(__pyx_v_dec);
__pyx_r = __pyx_v_dec;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.test");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_enc);
Py_DECREF(__pyx_v_dec);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key_testAscii(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_testAscii[] = "\n        Encrypts, then decrypts a string. What you get back should\n        be the same as what you put in.\n    \n        This is totally useless - it just gives a way to test if this API\n        is doing what it should.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_testAscii = {"testAscii", (PyCFunction)__pyx_f_9SSLCrypto_3key_testAscii, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_testAscii};
static PyObject *__pyx_f_9SSLCrypto_3key_testAscii(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_enc;
PyObject *__pyx_v_dec;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self","raw",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_raw)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
__pyx_v_enc = Py_None; Py_INCREF(Py_None);
__pyx_v_dec = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2465 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_encStringToAscii); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_raw);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2465; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_enc);
__pyx_v_enc = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2466 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_decStringFromAscii); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; goto __pyx_L1;}
Py_INCREF(__pyx_v_enc);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_enc);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2466; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_dec);
__pyx_v_dec = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2467 */
Py_INCREF(__pyx_v_dec);
__pyx_r = __pyx_v_dec;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key.testAscii");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_enc);
Py_DECREF(__pyx_v_dec);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
return __pyx_r;
}

static PyObject *__pyx_n_chr;
static PyObject *__pyx_n__encHdrs;
static PyObject *__pyx_n_index;
static PyObject *__pyx_n_pubBlkSize;

static PyObject *__pyx_k146p;
static PyObject *__pyx_k147p;
static PyObject *__pyx_k148p;
static PyObject *__pyx_k149p;

static char (__pyx_k146[]) = "encStart: you need a bigger public key length";
static char (__pyx_k147[]) = "encStart: encryption of session key failed";
static char (__pyx_k148[]) = "encStart: encryption of session IV failed";
static char (__pyx_k149[]) = "";

static PyObject *__pyx_f_9SSLCrypto_3key_encStart(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_encStart[] = "\n        Starts a stream encryption session<br>\n        Sets up internal buffers for accepting ad-hoc data.<br><br>\n    \n        No arguments needed, nothing returned.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_encStart = {"encStart", (PyCFunction)__pyx_f_9SSLCrypto_3key_encStart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_encStart};
static PyObject *__pyx_f_9SSLCrypto_3key_encStart(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_pubkey;
PyObject *__pyx_v_pubkeyLen;
PyObject *__pyx_v_len0;
PyObject *__pyx_v_len1;
PyObject *__pyx_v_algInfo;
PyObject *__pyx_v_sessKeyLen;
PyObject *__pyx_v_sessIVLen;
PyObject *__pyx_v_sKeyEnc;
PyObject *__pyx_v_sCipherInit;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);
__pyx_v_pubkey = Py_None; Py_INCREF(Py_None);
__pyx_v_pubkeyLen = Py_None; Py_INCREF(Py_None);
__pyx_v_len0 = Py_None; Py_INCREF(Py_None);
__pyx_v_len1 = Py_None; Py_INCREF(Py_None);
__pyx_v_algInfo = Py_None; Py_INCREF(Py_None);
__pyx_v_sessKeyLen = Py_None; Py_INCREF(Py_None);
__pyx_v_sessIVLen = Py_None; Py_INCREF(Py_None);
__pyx_v_sKeyEnc = Py_None; Py_INCREF(Py_None);
__pyx_v_sCipherInit = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2496 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__rawPubKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2496; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_pubkey);
__pyx_v_pubkey = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2499 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; goto __pyx_L1;}
Py_INCREF(__pyx_v_pubkey);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_pubkey);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2499; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_pubkeyLen);
__pyx_v_pubkeyLen = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2500 */
__pyx_1 = PyInt_FromLong(256); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; goto __pyx_L1;}
__pyx_2 = PyNumber_Remainder(__pyx_v_pubkeyLen, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2500; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_len0);
__pyx_v_len0 = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2501 */
__pyx_3 = PyInt_FromLong(256); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2501; goto __pyx_L1;}
__pyx_1 = PyNumber_Divide(__pyx_v_pubkeyLen, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2501; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_len1);
__pyx_v_len1 = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2505 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; goto __pyx_L1;}
Py_INCREF(__pyx_v_len0);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_len0);
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; goto __pyx_L1;}
Py_INCREF(__pyx_v_len1);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_len1);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyNumber_Add(__pyx_1, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_3 = PyNumber_Add(__pyx_2, __pyx_v_pubkey); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__encHdrs, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2505; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2513 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__algosSes2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_4, __pyx_n_index); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_algoSes); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
__pyx_3 = 0;
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2513; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_algInfo);
__pyx_v_algInfo = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2518 */
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__genNewSessKey); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2518; goto __pyx_L1;}
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2518; goto __pyx_L1;}
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2518; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2521 */
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2521; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessKey); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2521; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2521; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
__pyx_3 = 0;
__pyx_2 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2521; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_sessKeyLen);
__pyx_v_sessKeyLen = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2522 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2522; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2522; goto __pyx_L1;}
Py_INCREF(__pyx_v_sessKeyLen);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_sessKeyLen);
__pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2522; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_2 = PyNumber_Add(__pyx_v_algInfo, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2522; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_algInfo);
__pyx_v_algInfo = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2525 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2525; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessIV); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2525; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2525; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_4);
__pyx_4 = 0;
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2525; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_sessIVLen);
__pyx_v_sessIVLen = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2526 */
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; goto __pyx_L1;}
Py_INCREF(__pyx_v_sessIVLen);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_sessIVLen);
__pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyNumber_Add(__pyx_v_algInfo, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2526; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_algInfo);
__pyx_v_algInfo = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2532 */
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(3); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
__pyx_3 = 0;
__pyx_2 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; goto __pyx_L1;}
__pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_4);
__pyx_4 = 0;
__pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_3 = PyNumber_Add(__pyx_2, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = PyNumber_Add(__pyx_3, __pyx_v_algInfo); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_algInfo);
__pyx_v_algInfo = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2535 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__encHdrs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2535; goto __pyx_L1;}
__pyx_4 = PyNumber_Add(__pyx_2, __pyx_v_algInfo); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2535; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__encHdrs, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2535; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2538 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
__pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_pubBlkSize); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_4, __pyx_1, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2538; goto __pyx_L1;}
__pyx_5 = __pyx_5 > 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2539 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2539; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2539; goto __pyx_L1;}
Py_INCREF(__pyx_k146p);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k146p);
__pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2539; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__Pyx_Raise(__pyx_4, 0, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2539; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2545 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__encRawPub); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessKey); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
__pyx_3 = 0;
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2545; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_sKeyEnc);
__pyx_v_sKeyEnc = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2549 */
if (PyObject_Cmp(__pyx_v_sKeyEnc, Py_None, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2549; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2550 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2550; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2550; goto __pyx_L1;}
Py_INCREF(__pyx_k147p);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k147p);
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2550; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__Pyx_Raise(__pyx_2, 0, 0);
Py_DECREF(__pyx_2); __pyx_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2550; goto __pyx_L1;}
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2554 */
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__encHdrs); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; goto __pyx_L1;}
__pyx_3 = PyNumber_Add(__pyx_4, __pyx_v_sKeyEnc); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__encHdrs, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2554; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2557 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__encRawPub); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessIV); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
__pyx_2 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2557; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_v_sCipherInit);
__pyx_v_sCipherInit = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2558 */
if (PyObject_Cmp(__pyx_v_sCipherInit, Py_None, &__pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2558; goto __pyx_L1;}
__pyx_5 = __pyx_5 == 0;
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2559 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2559; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2559; goto __pyx_L1;}
Py_INCREF(__pyx_k148p);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k148p);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2559; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__Pyx_Raise(__pyx_4, 0, 0);
Py_DECREF(__pyx_4); __pyx_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2559; goto __pyx_L1;}
goto __pyx_L4;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2564 */
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__encHdrs); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2564; goto __pyx_L1;}
__pyx_2 = PyNumber_Add(__pyx_3, __pyx_v_sCipherInit); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2564; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__encHdrs, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2564; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2567 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__initBlkCipher); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2567; goto __pyx_L1;}
__pyx_4 = PyTuple_New(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2567; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2567; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2570 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__encBuf, __pyx_k149p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2570; goto __pyx_L1;}

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.key.encStart");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_pubkey);
Py_DECREF(__pyx_v_pubkeyLen);
Py_DECREF(__pyx_v_len0);
Py_DECREF(__pyx_v_len1);
Py_DECREF(__pyx_v_algInfo);
Py_DECREF(__pyx_v_sessKeyLen);
Py_DECREF(__pyx_v_sessIVLen);
Py_DECREF(__pyx_v_sKeyEnc);
Py_DECREF(__pyx_v_sCipherInit);
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_k150p;
static PyObject *__pyx_k151p;
static PyObject *__pyx_k152p;

static char (__pyx_k150[]) = "";
static char (__pyx_k151[]) = "";
static char (__pyx_k152[]) = "";

static PyObject *__pyx_f_9SSLCrypto_3key_encNext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_encNext[] = "\n        Encrypt the next piece of data in a stream.<br><Br>\n    \n        Arguments:<ul>\n        <li><b>raw</b> - raw piece of data to encrypt</li>\n        </ul>\n        \n        Returns - one of:<ul>\n        <li>\'\' - not enough data to encrypt yet - stored for later, OR</li>\n        <li><b>encdata</b> - string of encrypted data</li>\n        </ul>\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_encNext = {"encNext", (PyCFunction)__pyx_f_9SSLCrypto_3key_encNext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_encNext};
static PyObject *__pyx_f_9SSLCrypto_3key_encNext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_enc;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"self","raw",0};
__pyx_v_raw = __pyx_k70;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O|O", __pyx_argnames, &__pyx_v_self, &__pyx_v_raw)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
__pyx_v_enc = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2587 */
if (PyObject_Cmp(__pyx_v_raw, __pyx_k150p, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2587; goto __pyx_L1;}
__pyx_1 = __pyx_1 == 0;
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2588 */
Py_INCREF(__pyx_k151p);
__pyx_r = __pyx_k151p;
goto __pyx_L0;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2591 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__encHdrs); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2591; goto __pyx_L1;}
Py_DECREF(__pyx_v_enc);
__pyx_v_enc = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2592 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__encHdrs, __pyx_k152p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2592; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2594 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_blkCipher); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_n_encrypt); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_raw);
__pyx_4 = PyObject_CallObject(__pyx_3, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_3 = PyNumber_Add(__pyx_v_enc, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_v_enc);
__pyx_v_enc = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2595 */
Py_INCREF(__pyx_v_enc);
__pyx_r = __pyx_v_enc;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.key.encNext");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_enc);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
return __pyx_r;
}

static PyObject *__pyx_k153p;

static char (__pyx_k153[]) = "";

static PyObject *__pyx_f_9SSLCrypto_3key_encEnd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_encEnd[] = "\n        Called to terminate a stream session.\n        Encrypts any remaining data in buffer.<br>\n        <br>\n        Kinda obsolete now that we\'re using stream ciphers with full\n        stream chaining mode.<br>\n        <br>\n        Arguments:<ul>\n         <li>None</li></ul>\n        Returns:<ul><li>None</li></ul>\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_encEnd = {"encEnd", (PyCFunction)__pyx_f_9SSLCrypto_3key_encEnd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_encEnd};
static PyObject *__pyx_f_9SSLCrypto_3key_encEnd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2612 */
Py_INCREF(__pyx_k153p);
__pyx_r = __pyx_k153p;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto.key.encEnd");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_n__decBuf;
static PyObject *__pyx_n__decState;
static PyObject *__pyx_n__decEmpty;

static PyObject *__pyx_k154p;

static char (__pyx_k154[]) = "";

static PyObject *__pyx_f_9SSLCrypto_3key_decStart(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_decStart[] = "\n        Start a stream decryption session.<br><br>\n    \n        Call this method first, then feed in pieces of stream data into decNext until\n        there\'s no more data to decrypt<br><br>\n    \n        No arguments, nothing returned\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_decStart = {"decStart", (PyCFunction)__pyx_f_9SSLCrypto_3key_decStart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_decStart};
static PyObject *__pyx_f_9SSLCrypto_3key_decStart(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2626 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decBuf, __pyx_k154p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2626; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2627 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decState, __pyx_n_p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2627; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2628 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2628; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decEmpty, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2628; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("SSLCrypto.key.decStart");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_n_d;
static PyObject *__pyx_n_c;
static PyObject *__pyx_n__tmpSessKeyLen;
static PyObject *__pyx_n__tmpSessIVLen;
static PyObject *__pyx_n_i;

static PyObject *__pyx_k157p;
static PyObject *__pyx_k158p;
static PyObject *__pyx_k160p;
static PyObject *__pyx_k161p;
static PyObject *__pyx_k162p;
static PyObject *__pyx_k164p;
static PyObject *__pyx_k165p;
static PyObject *__pyx_k173p;

static char (__pyx_k157[]) = "";
static char (__pyx_k158[]) = "";
static char (__pyx_k160[]) = "";
static char (__pyx_k161[]) = "";
static char (__pyx_k162[]) = "";
static char (__pyx_k164[]) = "";
static char (__pyx_k165[]) = "Can't decrypt - public key mismatch";
static char (__pyx_k173[]) = "decNext: strange state '%s'";

static PyObject *__pyx_f_9SSLCrypto_3key_decNext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_decNext[] = "\n        Decrypt the next piece of incoming stream data.<br><Br>\n    \n        Arguments:<ul>\n        <li><b>chunk</b> - some more of the encrypted stream</li>\n        </ul>\n        \n        Returns (depending on state)<ul>\n        <li>\'\' - no more decrypted data available just yet, OR</li>\n        <li><b>data</b> - the next available piece of decrypted data, OR</li>\n        <li><b>None</b> - session is complete - no more data available</li>\n        </ul>\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_decNext = {"decNext", (PyCFunction)__pyx_f_9SSLCrypto_3key_decNext, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_decNext};
static PyObject *__pyx_f_9SSLCrypto_3key_decNext(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_chunk = 0;
PyObject *__pyx_v_chunklen;
PyObject *__pyx_v_decData;
PyObject *__pyx_v_size;
PyObject *__pyx_v_pubkey;
PyObject *__pyx_v_sizeReqd;
PyObject *__pyx_v_blk;
PyObject *__pyx_v_c;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
long __pyx_5;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
PyObject *__pyx_8 = 0;
int __pyx_9;
static char *__pyx_argnames[] = {"self","chunk",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_chunk)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_chunk);
__pyx_v_chunklen = Py_None; Py_INCREF(Py_None);
__pyx_v_decData = Py_None; Py_INCREF(Py_None);
__pyx_v_size = Py_None; Py_INCREF(Py_None);
__pyx_v_pubkey = Py_None; Py_INCREF(Py_None);
__pyx_v_sizeReqd = Py_None; Py_INCREF(Py_None);
__pyx_v_blk = Py_None; Py_INCREF(Py_None);
__pyx_v_c = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2652 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decEmpty); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; goto __pyx_L1;}
__pyx_2 = PyObject_IsTrue(__pyx_1); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2652; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2653 */
Py_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2656 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; goto __pyx_L1;}
__pyx_3 = PyNumber_Add(__pyx_1, __pyx_v_chunk); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decBuf, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2656; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2659 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2659; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2659; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2659; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2659; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_v_chunklen);
__pyx_v_chunklen = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2662 */
__pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_v_chunklen, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; goto __pyx_L1;}
__pyx_2 = __pyx_2 < 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_2) {
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decState); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_4, __pyx_n_d, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2662; goto __pyx_L1;}
__pyx_2 = __pyx_2 != 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
}
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2663 */
Py_INCREF(__pyx_k157p);
__pyx_r = __pyx_k157p;
goto __pyx_L0;
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2666 */
Py_INCREF(__pyx_k158p);
Py_DECREF(__pyx_v_decData);
__pyx_v_decData = __pyx_k158p;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2670 */
while (1) {
__pyx_L4:;
__pyx_5 = 1;
if (!__pyx_5) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2673 */
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decState); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_3, __pyx_n_d, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2673; goto __pyx_L1;}
__pyx_2 = __pyx_2 == 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2675 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2675; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_1, __pyx_k160p, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2675; goto __pyx_L1;}
__pyx_2 = __pyx_2 == 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2676 */
Py_INCREF(__pyx_k161p);
__pyx_r = __pyx_k161p;
goto __pyx_L0;
goto __pyx_L7;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2678 */
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_blkCipher); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_4, __pyx_n_decrypt); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2678; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_v_decData);
__pyx_v_decData = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2679 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decBuf, __pyx_k162p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2679; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2680 */
Py_INCREF(__pyx_v_decData);
__pyx_r = __pyx_v_decData;
goto __pyx_L0;
}
__pyx_L7:;
goto __pyx_L6;
}
__pyx_L6:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2682 */
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decState); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_3, __pyx_n_p, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2682; goto __pyx_L1;}
__pyx_2 = __pyx_2 == 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2684 */
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
__pyx_6 = PyObject_GetItem(__pyx_1, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_6);
__pyx_6 = 0;
__pyx_3 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_6 = PyInt_FromLong(256); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
__pyx_7 = PyInt_FromLong(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
__pyx_8 = PyObject_GetItem(__pyx_1, __pyx_7); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_8);
__pyx_8 = 0;
__pyx_7 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_8 = PyNumber_Multiply(__pyx_6, __pyx_7); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
__pyx_4 = PyNumber_Add(__pyx_3, __pyx_8); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2684; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_8); __pyx_8 = 0;
Py_DECREF(__pyx_v_size);
__pyx_v_size = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2685 */
__pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2685; goto __pyx_L1;}
__pyx_6 = PyNumber_Add(__pyx_v_size, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2685; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_Cmp(__pyx_v_chunklen, __pyx_6, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2685; goto __pyx_L1;}
__pyx_2 = __pyx_2 < 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2687 */
Py_INCREF(__pyx_k164p);
__pyx_r = __pyx_k164p;
goto __pyx_L0;
goto __pyx_L9;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2689 */
__pyx_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2689; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2689; goto __pyx_L1;}
__pyx_8 = PyNumber_Add(__pyx_v_size, __pyx_3); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2689; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyInt_AsLong(__pyx_8); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2689; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
__pyx_4 = PySequence_GetSlice(__pyx_7, 2, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2689; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_v_pubkey);
__pyx_v_pubkey = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2690 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__testPubKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2690; goto __pyx_L1;}
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2690; goto __pyx_L1;}
Py_INCREF(__pyx_v_pubkey);
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_v_pubkey);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2690; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_2 = PyObject_IsTrue(__pyx_3); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2690; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_9 = (!__pyx_2);
if (__pyx_9) {

  /* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2691 */
  __pyx_8 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; goto __pyx_L1;}
  __pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; goto __pyx_L1;}
  Py_INCREF(__pyx_k165p);
  PyTuple_SET_ITEM(__pyx_7, 0, __pyx_k165p);
  __pyx_4 = PyObject_CallObject(__pyx_8, __pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; goto __pyx_L1;}
  Py_DECREF(__pyx_8); __pyx_8 = 0;
  Py_DECREF(__pyx_7); __pyx_7 = 0;
  __Pyx_Raise(__pyx_4, 0, 0);
  Py_DECREF(__pyx_4); __pyx_4 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2691; goto __pyx_L1;}
  goto __pyx_L10;
}
__pyx_L10:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2693 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2693; goto __pyx_L1;}
__pyx_6 = PyInt_FromLong(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2693; goto __pyx_L1;}
__pyx_3 = PyNumber_Add(__pyx_v_size, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2693; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_2 = PyInt_AsLong(__pyx_3); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2693; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_8 = PySequence_GetSlice(__pyx_1, __pyx_2, 0x7fffffff); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2693; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decBuf, __pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2693; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2694 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decState, __pyx_n_c) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2694; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2696 */
goto __pyx_L4;
}
__pyx_L9:;
goto __pyx_L8;
}
__pyx_L8:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2698 */
__pyx_7 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2698; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2698; goto __pyx_L1;}
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2698; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_4);
__pyx_4 = 0;
__pyx_3 = PyObject_CallObject(__pyx_7, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2698; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2698; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2698; goto __pyx_L1;}
__pyx_9 = __pyx_9 < 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_9) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2699 */
Py_INCREF(__pyx_v_decData);
__pyx_r = __pyx_v_decData;
goto __pyx_L0;
goto __pyx_L11;
}
__pyx_L11:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2701 */
__pyx_8 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
__pyx_7 = PyInt_FromLong(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
__pyx_6 = PyObject_GetItem(__pyx_4, __pyx_7); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_6);
__pyx_6 = 0;
__pyx_1 = PyObject_CallObject(__pyx_8, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = PyInt_FromLong(256); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
__pyx_7 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
__pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
__pyx_8 = PyInt_FromLong(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
__pyx_3 = PyObject_GetItem(__pyx_6, __pyx_8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_8); __pyx_8 = 0;
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_3);
__pyx_3 = 0;
__pyx_8 = PyObject_CallObject(__pyx_7, __pyx_6); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_3 = PyNumber_Multiply(__pyx_4, __pyx_8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_8); __pyx_8 = 0;
__pyx_7 = PyNumber_Add(__pyx_1, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_6 = PyInt_FromLong(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
__pyx_4 = PyNumber_Add(__pyx_7, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2701; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_v_sizeReqd);
__pyx_v_sizeReqd = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2702 */
__pyx_8 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2702; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2702; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2702; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
__pyx_1 = 0;
__pyx_7 = PyObject_CallObject(__pyx_8, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2702; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_size);
__pyx_v_size = __pyx_7;
__pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2707 */
if (PyObject_Cmp(__pyx_v_size, __pyx_v_sizeReqd, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2707; goto __pyx_L1;}
__pyx_2 = __pyx_2 < 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2708 */
Py_INCREF(__pyx_v_decData);
__pyx_r = __pyx_v_decData;
goto __pyx_L0;
goto __pyx_L12;
}
__pyx_L12:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2711 */
__pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2711; goto __pyx_L1;}
__pyx_9 = PyInt_AsLong(__pyx_v_sizeReqd); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2711; goto __pyx_L1;}
__pyx_4 = PySequence_GetSlice(__pyx_6, 0, __pyx_9); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2711; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_v_blk);
__pyx_v_blk = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2712 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decBuf); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2712; goto __pyx_L1;}
__pyx_2 = PyInt_AsLong(__pyx_v_sizeReqd); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2712; goto __pyx_L1;}
__pyx_8 = PySequence_GetSlice(__pyx_1, __pyx_2, 0x7fffffff); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2712; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decBuf, __pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2712; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2715 */
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decState); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_3, __pyx_n_c, &__pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2715; goto __pyx_L1;}
__pyx_9 = __pyx_9 == 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_9) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2721 */
__pyx_7 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; goto __pyx_L1;}
__pyx_6 = PyInt_FromLong(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; goto __pyx_L1;}
__pyx_4 = PyObject_GetItem(__pyx_v_blk, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_4);
__pyx_4 = 0;
__pyx_8 = PyObject_CallObject(__pyx_7, __pyx_1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2721; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_c);
__pyx_v_c = __pyx_8;
__pyx_8 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2722 */
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__algosSes2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2722; goto __pyx_L1;}
__pyx_6 = PyObject_GetItem(__pyx_3, __pyx_v_c); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2722; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_algoSes, __pyx_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2722; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2725 */
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2725; goto __pyx_L1;}
__pyx_7 = PyInt_FromLong(3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2725; goto __pyx_L1;}
__pyx_1 = PyObject_GetItem(__pyx_v_blk, __pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2725; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
__pyx_8 = PyTuple_New(1); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2725; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_8, 0, __pyx_1);
__pyx_1 = 0;
__pyx_3 = PyObject_CallObject(__pyx_4, __pyx_8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2725; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_8); __pyx_8 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__tmpSessKeyLen, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2725; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2728 */
__pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2728; goto __pyx_L1;}
__pyx_7 = PyInt_FromLong(4); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2728; goto __pyx_L1;}
__pyx_1 = PyObject_GetItem(__pyx_v_blk, __pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2728; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2728; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_1);
__pyx_1 = 0;
__pyx_8 = PyObject_CallObject(__pyx_6, __pyx_4); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2728; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__tmpSessIVLen, __pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2728; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2730 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decState, __pyx_n_k) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2730; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2731 */
goto __pyx_L4;
goto __pyx_L13;
}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decState); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2733; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_3, __pyx_n_k, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2733; goto __pyx_L1;}
__pyx_2 = __pyx_2 == 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2736 */
__pyx_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decRawPub); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2736; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2736; goto __pyx_L1;}
Py_INCREF(__pyx_v_blk);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_blk);
__pyx_6 = PyObject_CallObject(__pyx_7, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2736; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_blk);
__pyx_v_blk = __pyx_6;
__pyx_6 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2737 */
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__tmpSessKeyLen); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; goto __pyx_L1;}
__pyx_9 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_8 = PySequence_GetSlice(__pyx_v_blk, 0, __pyx_9); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_sessKey, __pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2737; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2738 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decState, __pyx_n_i) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2738; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2739 */
goto __pyx_L4;
goto __pyx_L13;
}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decState); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_3, __pyx_n_i, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2741; goto __pyx_L1;}
__pyx_2 = __pyx_2 == 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2744 */
__pyx_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decRawPub); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2744; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2744; goto __pyx_L1;}
Py_INCREF(__pyx_v_blk);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_blk);
__pyx_6 = PyObject_CallObject(__pyx_7, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2744; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_blk);
__pyx_v_blk = __pyx_6;
__pyx_6 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2745 */
__pyx_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n__tmpSessIVLen); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; goto __pyx_L1;}
__pyx_9 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_8 = PySequence_GetSlice(__pyx_v_blk, 0, __pyx_9); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_sessIV, __pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2745; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2751 */
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_algoSes); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; goto __pyx_L1;}
__pyx_7 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessKey); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessIV); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; goto __pyx_L1;}
__pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_7);
PyTuple_SET_ITEM(__pyx_6, 1, __pyx_1);
__pyx_7 = 0;
__pyx_1 = 0;
__pyx_4 = PyObject_CallObject(__pyx_3, __pyx_6); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_blkCipher, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2751; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2752 */
__pyx_8 = PyObject_GetAttr(__pyx_v_self, __pyx_n__calcSesBlkSize); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2752; goto __pyx_L1;}
__pyx_7 = PyTuple_New(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2752; goto __pyx_L1;}
__pyx_1 = PyObject_CallObject(__pyx_8, __pyx_7); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2752; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2753 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decState, __pyx_n_d) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2753; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2754 */
goto __pyx_L4;
goto __pyx_L13;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2757 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; goto __pyx_L1;}
__pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n__decState); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; goto __pyx_L1;}
__pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; goto __pyx_L1;}
__pyx_8 = PyObject_GetItem(__pyx_6, __pyx_4); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_7 = PyNumber_Remainder(__pyx_k173p, __pyx_8); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2758; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_7);
__pyx_7 = 0;
__pyx_6 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__Pyx_Raise(__pyx_6, 0, 0);
Py_DECREF(__pyx_6); __pyx_6 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2757; goto __pyx_L1;}
}
__pyx_L13:;
}
__pyx_L5:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
Py_XDECREF(__pyx_8);
__Pyx_AddTraceback("SSLCrypto.key.decNext");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_chunklen);
Py_DECREF(__pyx_v_decData);
Py_DECREF(__pyx_v_size);
Py_DECREF(__pyx_v_pubkey);
Py_DECREF(__pyx_v_sizeReqd);
Py_DECREF(__pyx_v_blk);
Py_DECREF(__pyx_v_c);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_chunk);
return __pyx_r;
}

static PyObject *__pyx_k174p;

static char (__pyx_k174[]) = "";

static PyObject *__pyx_f_9SSLCrypto_3key_decEnd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key_decEnd[] = "\n        Ends a stream decryption session.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key_decEnd = {"decEnd", (PyCFunction)__pyx_f_9SSLCrypto_3key_decEnd, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key_decEnd};
static PyObject *__pyx_f_9SSLCrypto_3key_decEnd(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2767 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decBuf, __pyx_k174p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2767; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2768 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n__decState, __pyx_n_c) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2768; goto __pyx_L1;}

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto.key.decEnd");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_n_encodestring;

static PyObject *__pyx_k176p;

static char (__pyx_k176[]) = "<StartPycrypto%s>\n%s<EndPycrypto%s>\n";

static PyObject *__pyx_f_9SSLCrypto_3key__wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__wrap[] = "\n        Encodes message as base64 and wraps with <StartPyCryptoname>/<EndPycryptoname>\n        Args:\n         - type - string to use in header/footer - eg \'Key\', \'Message\'\n         - msg - binary string to wrap\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__wrap = {"_wrap", (PyCFunction)__pyx_f_9SSLCrypto_3key__wrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__wrap};
static PyObject *__pyx_f_9SSLCrypto_3key__wrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_type = 0;
PyObject *__pyx_v_msg = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self","type","msg",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_self, &__pyx_v_type, &__pyx_v_msg)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_type);
Py_INCREF(__pyx_v_msg);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2780 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_base64); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2781; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_encodestring); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2781; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2781; goto __pyx_L1;}
Py_INCREF(__pyx_v_msg);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_msg);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2781; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_2 = PyTuple_New(3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2781; goto __pyx_L1;}
Py_INCREF(__pyx_v_type);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_type);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_3);
Py_INCREF(__pyx_v_type);
PyTuple_SET_ITEM(__pyx_2, 2, __pyx_v_type);
__pyx_3 = 0;
__pyx_1 = PyNumber_Remainder(__pyx_k176p, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2781; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key._wrap");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_type);
Py_DECREF(__pyx_v_msg);
return __pyx_r;
}

static PyObject *__pyx_n_split;
static PyObject *__pyx_n_decodestring;
static PyObject *__pyx_n__calcBlkSize;

static PyObject *__pyx_k177p;
static PyObject *__pyx_k178p;
static PyObject *__pyx_k179p;

static char (__pyx_k177[]) = "<StartPycrypto%s>";
static char (__pyx_k178[]) = "<EndPycrypto%s>";
static char (__pyx_k179[]) = "Tried to import Invalid %s";

static PyObject *__pyx_f_9SSLCrypto_3key__unwrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__unwrap[] = "\n        Unwraps a previously _wrap()\'ed message.\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__unwrap = {"_unwrap", (PyCFunction)__pyx_f_9SSLCrypto_3key__unwrap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__unwrap};
static PyObject *__pyx_f_9SSLCrypto_3key__unwrap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_type = 0;
PyObject *__pyx_v_msg = 0;
PyObject *__pyx_v_k1;
PyObject *__pyx_v_k2;
PyObject *__pyx_v_k;
PyObject *__pyx_v_bin;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"self","type","msg",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_self, &__pyx_v_type, &__pyx_v_msg)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_type);
Py_INCREF(__pyx_v_msg);
__pyx_v_k1 = Py_None; Py_INCREF(Py_None);
__pyx_v_k2 = Py_None; Py_INCREF(Py_None);
__pyx_v_k = Py_None; Py_INCREF(Py_None);
__pyx_v_bin = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2788 */
/*try:*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2790 */
__pyx_1 = PyObject_GetAttr(__pyx_v_msg, __pyx_n_split); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2790; goto __pyx_L2;}
__pyx_2 = PyNumber_Remainder(__pyx_k177p, __pyx_v_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2790; goto __pyx_L2;}
__pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2790; goto __pyx_L2;}
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2790; goto __pyx_L2;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
__pyx_2 = 0;
__pyx_3 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2790; goto __pyx_L2;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_v_k1);
__pyx_v_k1 = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2791 */
__pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; goto __pyx_L2;}
__pyx_1 = PyObject_GetItem(__pyx_v_k1, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; goto __pyx_L2;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = PyObject_GetAttr(__pyx_1, __pyx_n_split); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; goto __pyx_L2;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_2 = PyNumber_Remainder(__pyx_k178p, __pyx_v_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; goto __pyx_L2;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; goto __pyx_L2;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
__pyx_1 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2791; goto __pyx_L2;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_k2);
__pyx_v_k2 = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2792 */
__pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2792; goto __pyx_L2;}
__pyx_4 = PyObject_GetItem(__pyx_v_k2, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2792; goto __pyx_L2;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_k);
__pyx_v_k = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2795 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_base64); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; goto __pyx_L2;}
__pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_n_decodestring); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; goto __pyx_L2;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; goto __pyx_L2;}
Py_INCREF(__pyx_v_k);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_k);
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2795; goto __pyx_L2;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_bin);
__pyx_v_bin = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2796 */
Py_INCREF(__pyx_v_bin);
__pyx_r = __pyx_v_bin;
goto __pyx_L0;
}
goto __pyx_L3;
__pyx_L2:;
Py_XDECREF(__pyx_3); __pyx_3 = 0;
Py_XDECREF(__pyx_1); __pyx_1 = 0;
Py_XDECREF(__pyx_2); __pyx_2 = 0;
Py_XDECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2797 */
/*except:*/ {
__Pyx_AddTraceback("SSLCrypto._unwrap");
__pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2797; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2798 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; goto __pyx_L1;}
__pyx_2 = PyNumber_Remainder(__pyx_k179p, __pyx_v_type); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
__pyx_2 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__Pyx_Raise(__pyx_3, 0, 0);
Py_DECREF(__pyx_3); __pyx_3 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2798; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2799 */
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n__calcBlkSize); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; goto __pyx_L1;}
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; goto __pyx_L1;}
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2799; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
goto __pyx_L3;
}
__pyx_L3:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.key._unwrap");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_k1);
Py_DECREF(__pyx_v_k2);
Py_DECREF(__pyx_v_k);
Py_DECREF(__pyx_v_bin);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_type);
Py_DECREF(__pyx_v_msg);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key__calcPubBlkSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__calcPubBlkSize[] = "\n        Determine size of public key\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__calcPubBlkSize = {"_calcPubBlkSize", (PyCFunction)__pyx_f_9SSLCrypto_3key__calcPubBlkSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__calcPubBlkSize};
static PyObject *__pyx_f_9SSLCrypto_3key__calcPubBlkSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2807 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_maxSize); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_pubBlkSize, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2807; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key._calcPubBlkSize");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_k180p;
static PyObject *__pyx_k181p;

static char (__pyx_k180[]) = "_encraw: max len %d, passed %d bytes";
static char (__pyx_k181[]) = "_encRawPub: decrypt verify fail";

static PyObject *__pyx_f_9SSLCrypto_3key__encRawPub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__encRawPub[] = "\n        Encrypt a small raw string using the public key\n        algorithm. Input must not exceed the allowable\n        block size.<br>\n        <br>\n        Arguments:<ul>\n         <li>raw - small raw bit of string to encrypt</li></ul>\n        Returns:<ul>\n         <li>binary representation of encrypted chunk, or\n             None if verify failed</li></ul>\n    \n        <b>Note</b> - returned block is prefixed by 2 length bytes, LSB first\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__encRawPub = {"_encRawPub", (PyCFunction)__pyx_f_9SSLCrypto_3key__encRawPub, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__encRawPub};
static PyObject *__pyx_f_9SSLCrypto_3key__encRawPub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_raw = 0;
PyObject *__pyx_v_enc;
PyObject *__pyx_v_dec;
PyObject *__pyx_v_enclen;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
static char *__pyx_argnames[] = {"self","raw",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_raw)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_raw);
__pyx_v_enc = Py_None; Py_INCREF(Py_None);
__pyx_v_dec = Py_None; Py_INCREF(Py_None);
__pyx_v_enclen = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2825 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_raw);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_pubBlkSize); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_3, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2825; goto __pyx_L1;}
__pyx_4 = __pyx_4 > 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2826 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2826; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_pubBlkSize); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; goto __pyx_L1;}
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_raw);
__pyx_6 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_6);
__pyx_3 = 0;
__pyx_6 = 0;
__pyx_5 = PyNumber_Remainder(__pyx_k180p, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2827; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2826; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5);
__pyx_5 = 0;
__pyx_6 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2826; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__Pyx_Raise(__pyx_6, 0, 0);
Py_DECREF(__pyx_6); __pyx_6 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2826; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2830 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2830; goto __pyx_L1;}
__pyx_5 = PyObject_GetAttr(__pyx_1, __pyx_n_encrypt); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2830; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2830; goto __pyx_L1;}
Py_INCREF(__pyx_v_raw);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_raw);
__pyx_3 = PyObject_CallObject(__pyx_5, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2830; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_enc);
__pyx_v_enc = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2833 */
__pyx_6 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; goto __pyx_L1;}
__pyx_1 = PyObject_GetAttr(__pyx_6, __pyx_n_hasPrivateKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; goto __pyx_L1;}
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_4 = PyObject_IsTrue(__pyx_2); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2833; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2834 */
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; goto __pyx_L1;}
__pyx_6 = PyObject_GetAttr(__pyx_3, __pyx_n_decrypt); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; goto __pyx_L1;}
Py_INCREF(__pyx_v_enc);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_enc);
__pyx_5 = PyObject_CallObject(__pyx_6, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2834; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_dec);
__pyx_v_dec = __pyx_5;
__pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2836 */
if (PyObject_Cmp(__pyx_v_dec, __pyx_v_raw, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2836; goto __pyx_L1;}
__pyx_4 = __pyx_4 != 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2837 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; goto __pyx_L1;}
Py_INCREF(__pyx_k181p);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k181p);
__pyx_6 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__Pyx_Raise(__pyx_6, 0, 0);
Py_DECREF(__pyx_6); __pyx_6 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2837; goto __pyx_L1;}
goto __pyx_L4;
}
__pyx_L4:;
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2840 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; goto __pyx_L1;}
Py_INCREF(__pyx_v_enc);
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_enc);
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2840; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_v_enclen);
__pyx_v_enclen = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2843 */
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
__pyx_6 = PyInt_FromLong(256); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
__pyx_1 = PyNumber_Remainder(__pyx_v_enclen, __pyx_6); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1);
__pyx_1 = 0;
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
__pyx_1 = PyInt_FromLong(256); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
__pyx_3 = PyNumber_Divide(__pyx_v_enclen, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
__pyx_3 = 0;
__pyx_1 = PyObject_CallObject(__pyx_6, __pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_3 = PyNumber_Add(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_6 = PyNumber_Add(__pyx_3, __pyx_v_enc); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2843; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_enc);
__pyx_v_enc = __pyx_6;
__pyx_6 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2844 */
Py_INCREF(__pyx_v_enc);
__pyx_r = __pyx_v_enc;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("SSLCrypto.key._encRawPub");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_enc);
Py_DECREF(__pyx_v_dec);
Py_DECREF(__pyx_v_enclen);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_raw);
return __pyx_r;
}

static PyObject *__pyx_k182p;
static PyObject *__pyx_k183p;
static PyObject *__pyx_k184p;

static char (__pyx_k182[]) = "_decRawPub: ciphertext block too small";
static char (__pyx_k183[]) = "_decRawPub: expected %d bytes, got %d bytes";
static char (__pyx_k184[]) = "_decRawPub: ciphertext block length mismatch";

static PyObject *__pyx_f_9SSLCrypto_3key__decRawPub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__decRawPub[] = "\n        Decrypt a public-key encrypted block, and return the decrypted string<br>\n        <br>\n        Arguments:<ul>\n         <li><b>enc</b> - the encrypted string, in the format as\n             created by _encRawPub()</li></ul>\n        Returns:<ul>\n         <li>decrypted block</li></ul>\n    \n        <b>Note</b><ul><li>The ciphertext should be prefixed by 2\n                           length bytes, LSB first, as created by\n                           <b>_encRawPub</b></li></ul>\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__decRawPub = {"_decRawPub", (PyCFunction)__pyx_f_9SSLCrypto_3key__decRawPub, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__decRawPub};
static PyObject *__pyx_f_9SSLCrypto_3key__decRawPub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_enc = 0;
PyObject *__pyx_v_enclen;
PyObject *__pyx_v_enclen0;
PyObject *__pyx_v_dec;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
static char *__pyx_argnames[] = {"self","enc",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_enc)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_enc);
__pyx_v_enclen = Py_None; Py_INCREF(Py_None);
__pyx_v_enclen0 = Py_None; Py_INCREF(Py_None);
__pyx_v_dec = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2862 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; goto __pyx_L1;}
Py_INCREF(__pyx_v_enc);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_enc);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2862; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_enclen);
__pyx_v_enclen = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2863 */
__pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2863; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_v_enclen, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2863; goto __pyx_L1;}
__pyx_4 = __pyx_4 < 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2864 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; goto __pyx_L1;}
Py_INCREF(__pyx_k182p);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k182p);
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__Pyx_Raise(__pyx_1, 0, 0);
Py_DECREF(__pyx_1); __pyx_1 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2864; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2865 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
__pyx_1 = PyObject_GetItem(__pyx_v_enc, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyInt_FromLong(256); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
__pyx_5 = PyInt_FromLong(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
__pyx_6 = PyObject_GetItem(__pyx_v_enc, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_6);
__pyx_6 = 0;
__pyx_6 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_3 = PyNumber_Multiply(__pyx_2, __pyx_6); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_5 = PyNumber_Add(__pyx_1, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2865; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_enclen0);
__pyx_v_enclen0 = __pyx_5;
__pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2867 */
__pyx_2 = PyInt_FromLong(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2867; goto __pyx_L1;}
__pyx_6 = PyNumber_Add(__pyx_v_enclen0, __pyx_2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2867; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_Cmp(__pyx_v_enclen, __pyx_6, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2867; goto __pyx_L1;}
__pyx_4 = __pyx_4 != 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2868 */
__pyx_1 = PyInt_FromLong(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2869; goto __pyx_L1;}
__pyx_3 = PyNumber_Add(__pyx_v_enclen0, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2869; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2869; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
Py_INCREF(__pyx_v_enclen);
PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_enclen);
__pyx_3 = 0;
__pyx_2 = PyNumber_Remainder(__pyx_k183p, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2868; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (__Pyx_PrintItem(__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2868; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2868; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2870 */
__pyx_6 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2870; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2870; goto __pyx_L1;}
Py_INCREF(__pyx_k184p);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_k184p);
__pyx_3 = PyObject_CallObject(__pyx_6, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2870; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__Pyx_Raise(__pyx_3, 0, 0);
Py_DECREF(__pyx_3); __pyx_3 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2870; goto __pyx_L1;}
goto __pyx_L3;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2872 */
__pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_5, __pyx_n_decrypt); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_6 = PySequence_GetSlice(__pyx_v_enc, 2, 0x7fffffff); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_6);
__pyx_6 = 0;
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2872; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_dec);
__pyx_v_dec = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2873 */
Py_INCREF(__pyx_v_dec);
__pyx_r = __pyx_v_dec;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
__Pyx_AddTraceback("SSLCrypto.key._decRawPub");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_enclen);
Py_DECREF(__pyx_v_enclen0);
Py_DECREF(__pyx_v_dec);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_enc);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key__initBlkCipher(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__initBlkCipher[] = "\n        Create a new block cipher object, set up with a new session key\n        and IV\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__initBlkCipher = {"_initBlkCipher", (PyCFunction)__pyx_f_9SSLCrypto_3key__initBlkCipher, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__initBlkCipher};
static PyObject *__pyx_f_9SSLCrypto_3key__initBlkCipher(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2882 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_algoSes); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessKey); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_sessIV); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; goto __pyx_L1;}
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
__pyx_2 = 0;
__pyx_3 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_blkCipher, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2882; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2883 */
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n__calcSesBlkSize); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2883; goto __pyx_L1;}
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2883; goto __pyx_L1;}
__pyx_4 = PyObject_CallObject(__pyx_3, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2883; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.key._initBlkCipher");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_n_sesBlkSize;

static PyObject *__pyx_f_9SSLCrypto_3key__calcSesBlkSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__calcSesBlkSize[] = "\n        Determine size of session blocks\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__calcSesBlkSize = {"_calcSesBlkSize", (PyCFunction)__pyx_f_9SSLCrypto_3key__calcSesBlkSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__calcSesBlkSize};
static PyObject *__pyx_f_9SSLCrypto_3key__calcSesBlkSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2891 */
__pyx_1 = PyInt_FromLong(8); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2891; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_sesBlkSize, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2891; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
__Pyx_AddTraceback("SSLCrypto.key._calcSesBlkSize");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key__testPubKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__testPubKey[] = "\n        Checks if binary-encoded key matches this object\'s pubkey\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__testPubKey = {"_testPubKey", (PyCFunction)__pyx_f_9SSLCrypto_3key__testPubKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__testPubKey};
static PyObject *__pyx_f_9SSLCrypto_3key__testPubKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_k = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
static char *__pyx_argnames[] = {"self","k",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_k)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_k);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2899 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__rawPubKey); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_Cmp(__pyx_v_k, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; goto __pyx_L1;}
__pyx_4 = __pyx_4 == 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2900 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n__True); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2900; goto __pyx_L1;}
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2902 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n__False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2902; goto __pyx_L1;}
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key._testPubKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_k);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key__rawPubKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__rawPubKey[] = "\n        Returns a binary-encoded string of public key\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__rawPubKey = {"_rawPubKey", (PyCFunction)__pyx_f_9SSLCrypto_3key__rawPubKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__rawPubKey};
static PyObject *__pyx_f_9SSLCrypto_3key__rawPubKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2910 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bencode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_algoPname); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; goto __pyx_L1;}
__pyx_4 = PyObject_GetAttr(__pyx_3, __pyx_n_pubKey); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_3 = PyTuple_New(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; goto __pyx_L1;}
__pyx_5 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_5);
__pyx_2 = 0;
__pyx_5 = 0;
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
__pyx_4 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2910; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.key._rawPubKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key__rawPrivKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__rawPrivKey[] = "\n        Returns a binary-encoded string of private key, or None if there is no private key\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__rawPrivKey = {"_rawPrivKey", (PyCFunction)__pyx_f_9SSLCrypto_3key__rawPrivKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__rawPrivKey};
static PyObject *__pyx_f_9SSLCrypto_3key__rawPrivKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
int __pyx_5;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2919 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_hasPrivateKey); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_4 = PyObject_IsTrue(__pyx_3); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2919; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = (!__pyx_4);
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2920 */
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_CryptoNoPrivateKey); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; goto __pyx_L1;}
__Pyx_Raise(__pyx_2, 0, 0);
Py_DECREF(__pyx_2); __pyx_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2920; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2921 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bencode); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_algoPname); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_k); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; goto __pyx_L1;}
__pyx_6 = PyObject_GetAttr(__pyx_2, __pyx_n_privKey); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; goto __pyx_L1;}
__pyx_7 = PyObject_CallObject(__pyx_6, __pyx_2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; goto __pyx_L1;}
Py_DECREF(__pyx_6); __pyx_6 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_3);
PyTuple_SET_ITEM(__pyx_6, 1, __pyx_7);
__pyx_3 = 0;
__pyx_7 = 0;
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_6);
__pyx_6 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2921; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
__Pyx_AddTraceback("SSLCrypto.key._rawPrivKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key__random(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__random[] = "\n        Generate an n-byte random number and return it as a string\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__random = {"_random", (PyCFunction)__pyx_f_9SSLCrypto_3key__random, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__random};
static PyObject *__pyx_f_9SSLCrypto_3key__random(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_bytes = 0;
char (*__pyx_v_buf);
PyObject *__pyx_v_pBuf;
PyObject *__pyx_r;
int __pyx_1;
PyObject *__pyx_2 = 0;
static char *__pyx_argnames[] = {"self","bytes",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_self, &__pyx_v_bytes)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_bytes);
__pyx_v_pBuf = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2929 */
__pyx_1 = PyInt_AsLong(__pyx_v_bytes); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2929; goto __pyx_L1;}
__pyx_v_buf = ((char (*))malloc(__pyx_1));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2933 */
__pyx_1 = PyInt_AsLong(__pyx_v_bytes); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; goto __pyx_L1;}
__pyx_2 = PyString_FromStringAndSize(__pyx_v_buf,__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; goto __pyx_L1;}
Py_DECREF(__pyx_v_pBuf);
__pyx_v_pBuf = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2936 */
free(__pyx_v_buf);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2938 */
Py_INCREF(__pyx_v_pBuf);
__pyx_r = __pyx_v_pBuf;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
__Pyx_AddTraceback("SSLCrypto.key._random");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_pBuf);
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_bytes);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key__genNewSessKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__genNewSessKey[] = "\n        Generate a new random session key\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__genNewSessKey = {"_genNewSessKey", (PyCFunction)__pyx_f_9SSLCrypto_3key__genNewSessKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__genNewSessKey};
static PyObject *__pyx_f_9SSLCrypto_3key__genNewSessKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"self",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_self)) return 0;
Py_INCREF(__pyx_v_self);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2945 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__random); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(32); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_sessKey, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2945; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2946 */
__pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n__random); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2946; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(8); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2946; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2946; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2946; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_sessIV, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2946; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.key._genNewSessKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_3key__setNewSessKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_3key__setNewSessKey[] = "\n        Sets the session key to specific values\n        ";
static PyMethodDef __pyx_mdef_9SSLCrypto_3key__setNewSessKey = {"_setNewSessKey", (PyCFunction)__pyx_f_9SSLCrypto_3key__setNewSessKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3key__setNewSessKey};
static PyObject *__pyx_f_9SSLCrypto_3key__setNewSessKey(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_sessKey = 0;
PyObject *__pyx_v_IV = 0;
PyObject *__pyx_r;
static char *__pyx_argnames[] = {"self","sessKey","IV",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OOO", __pyx_argnames, &__pyx_v_self, &__pyx_v_sessKey, &__pyx_v_IV)) return 0;
Py_INCREF(__pyx_v_self);
Py_INCREF(__pyx_v_sessKey);
Py_INCREF(__pyx_v_IV);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2953 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_sessKey, __pyx_v_sessKey) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2953; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2954 */
if (PyObject_SetAttr(__pyx_v_self, __pyx_n_sessIV, __pyx_v_IV) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2954; goto __pyx_L1;}

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto.key._setNewSessKey");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_self);
Py_DECREF(__pyx_v_sessKey);
Py_DECREF(__pyx_v_IV);
return __pyx_r;
}

static PyObject *__pyx_n_append;
static PyObject *__pyx_n_randint;

static PyObject *__pyx_k185p;

static char (__pyx_k185[]) = "";

static PyObject *__pyx_f_9SSLCrypto_rndfunc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9SSLCrypto_rndfunc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_nbytes = 0;
PyObject *__pyx_v_bytes;
PyObject *__pyx_v_i;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
static char *__pyx_argnames[] = {"nbytes",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_nbytes)) return 0;
Py_INCREF(__pyx_v_nbytes);
__pyx_v_bytes = Py_None; Py_INCREF(Py_None);
__pyx_v_i = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2964 */
__pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2964; goto __pyx_L1;}
Py_DECREF(__pyx_v_bytes);
__pyx_v_bytes = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2965 */
__pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2965; goto __pyx_L1;}
Py_DECREF(__pyx_v_i);
__pyx_v_i = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2966 */
while (1) {
__pyx_L2:;
if (PyObject_Cmp(__pyx_v_i, __pyx_v_nbytes, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2966; goto __pyx_L1;}
__pyx_2 = __pyx_2 < 0;
if (!__pyx_2) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2967 */
__pyx_1 = PyObject_GetAttr(__pyx_v_bytes, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
__pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n_random); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
__pyx_5 = PyObject_GetAttr(__pyx_4, __pyx_n_randint); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
__pyx_6 = PyInt_FromLong(255); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
__pyx_7 = PyTuple_New(2); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_7, 0, __pyx_4);
PyTuple_SET_ITEM(__pyx_7, 1, __pyx_6);
__pyx_4 = 0;
__pyx_6 = 0;
__pyx_4 = PyObject_CallObject(__pyx_5, __pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
__pyx_6 = PyTuple_New(1); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_4);
__pyx_4 = 0;
__pyx_5 = PyObject_CallObject(__pyx_3, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_7 = PyTuple_New(1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_7, 0, __pyx_5);
__pyx_5 = 0;
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_7); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2967; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_7); __pyx_7 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2968 */
__pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; goto __pyx_L1;}
__pyx_6 = PyNumber_Add(__pyx_v_i, __pyx_3); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2968; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_i);
__pyx_v_i = __pyx_6;
__pyx_6 = 0;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2969 */
__pyx_5 = PyObject_GetAttr(__pyx_k185p, __pyx_n_join); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2969; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2969; goto __pyx_L1;}
Py_INCREF(__pyx_v_bytes);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_bytes);
__pyx_7 = PyObject_CallObject(__pyx_5, __pyx_1); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2969; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_r = __pyx_7;
__pyx_7 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
__Pyx_AddTraceback("SSLCrypto.rndfunc");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_bytes);
Py_DECREF(__pyx_v_i);
Py_DECREF(__pyx_v_nbytes);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_size[] = "size(N:long) : int\n    Returns the size of the number N in bits.\n    ";
static PyObject *__pyx_f_9SSLCrypto_size(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_N = 0;
PyObject *__pyx_v_bits;
PyObject *__pyx_v_power;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
static char *__pyx_argnames[] = {"N",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_N)) return 0;
Py_INCREF(__pyx_v_N);
__pyx_v_bits = Py_None; Py_INCREF(Py_None);
__pyx_v_power = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3000 */
__pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3000; goto __pyx_L1;}
Py_DECREF(__pyx_v_bits);
__pyx_v_bits = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3001 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3001; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3001; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3001; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3001; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_power);
__pyx_v_power = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3002 */
while (1) {
__pyx_L2:;
if (PyObject_Cmp(__pyx_v_N, __pyx_v_power, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3002; goto __pyx_L1;}
__pyx_4 = __pyx_4 >= 0;
if (!__pyx_4) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3003 */
__pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; goto __pyx_L1;}
__pyx_3 = PyNumber_Add(__pyx_v_bits, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3003; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_bits);
__pyx_v_bits = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3004 */
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; goto __pyx_L1;}
__pyx_1 = PyNumber_Lshift(__pyx_v_power, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3004; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_power);
__pyx_v_power = __pyx_1;
__pyx_1 = 0;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3005 */
Py_INCREF(__pyx_v_bits);
__pyx_r = __pyx_v_bits;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.size");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_bits);
Py_DECREF(__pyx_v_power);
Py_DECREF(__pyx_v_N);
return __pyx_r;
}

static PyObject *__pyx_n_abs;

static PyObject *__pyx_f_9SSLCrypto_GCD(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_GCD[] = "GCD(a:long, b:long): long\n    Return the GCD of a and b.\n    ";
static PyObject *__pyx_f_9SSLCrypto_GCD(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_a = 0;
PyObject *__pyx_v_b = 0;
PyObject *__pyx_v_r;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
static char *__pyx_argnames[] = {"a","b",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_a, &__pyx_v_b)) return 0;
Py_INCREF(__pyx_v_a);
Py_INCREF(__pyx_v_b);
__pyx_v_r = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3012 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3012; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3012; goto __pyx_L1;}
Py_INCREF(__pyx_v_a);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_a);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3012; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_a);
__pyx_v_a = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3013 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_abs); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; goto __pyx_L1;}
Py_INCREF(__pyx_v_b);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_b);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3013; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_b);
__pyx_v_b = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3015 */
if (PyObject_Cmp(__pyx_v_a, __pyx_v_b, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3015; goto __pyx_L1;}
__pyx_4 = __pyx_4 < 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3016 */
__pyx_1 = __pyx_v_b;
Py_INCREF(__pyx_1);
__pyx_2 = __pyx_v_a;
Py_INCREF(__pyx_2);
Py_DECREF(__pyx_v_a);
__pyx_v_a = __pyx_1;
__pyx_1 = 0;
Py_DECREF(__pyx_v_b);
__pyx_v_b = __pyx_2;
__pyx_2 = 0;
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3018 */
while (1) {
__pyx_L3:;
__pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_v_b, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3018; goto __pyx_L1;}
__pyx_4 = __pyx_4 > 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (!__pyx_4) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3019 */
__pyx_1 = PyNumber_Remainder(__pyx_v_a, __pyx_v_b); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; goto __pyx_L1;}
Py_DECREF(__pyx_v_r);
__pyx_v_r = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3020 */
Py_INCREF(__pyx_v_b);
Py_DECREF(__pyx_v_a);
__pyx_v_a = __pyx_v_b;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3021 */
Py_INCREF(__pyx_v_r);
Py_DECREF(__pyx_v_b);
__pyx_v_b = __pyx_v_r;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3022 */
Py_INCREF(__pyx_v_a);
__pyx_r = __pyx_v_a;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.GCD");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_r);
Py_DECREF(__pyx_v_a);
Py_DECREF(__pyx_v_b);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_inverse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_inverse[] = "inverse(u:long, u:long):long\n    Return the inverse of u mod v.\n    ";
static PyObject *__pyx_f_9SSLCrypto_inverse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_u = 0;
PyObject *__pyx_v_v = 0;
PyObject *__pyx_v_u3;
PyObject *__pyx_v_v3;
PyObject *__pyx_v_u1;
PyObject *__pyx_v_v1;
PyObject *__pyx_v_q;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
static char *__pyx_argnames[] = {"u","v",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_u, &__pyx_v_v)) return 0;
Py_INCREF(__pyx_v_u);
Py_INCREF(__pyx_v_v);
__pyx_v_u3 = Py_None; Py_INCREF(Py_None);
__pyx_v_v3 = Py_None; Py_INCREF(Py_None);
__pyx_v_u1 = Py_None; Py_INCREF(Py_None);
__pyx_v_v1 = Py_None; Py_INCREF(Py_None);
__pyx_v_q = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3029 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; goto __pyx_L1;}
Py_INCREF(__pyx_v_u);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_u);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3029; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_u3);
__pyx_v_u3 = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3030 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; goto __pyx_L1;}
Py_INCREF(__pyx_v_v);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_v);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3030; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_v3);
__pyx_v_v3 = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3032 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3032; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_u1);
__pyx_v_u1 = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3033 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3033; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_v1);
__pyx_v_v1 = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3035 */
while (1) {
__pyx_L2:;
__pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_v_v3, __pyx_1, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; goto __pyx_L1;}
__pyx_4 = __pyx_4 > 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (!__pyx_4) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3036 */
__pyx_2 = PyNumber_Divide(__pyx_v_u3, __pyx_v_v3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3036; goto __pyx_L1;}
Py_DECREF(__pyx_v_q);
__pyx_v_q = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3037 */
__pyx_3 = __pyx_v_v1;
Py_INCREF(__pyx_3);
__pyx_1 = PyNumber_Multiply(__pyx_v_v1, __pyx_v_q); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3037; goto __pyx_L1;}
__pyx_2 = PyNumber_Subtract(__pyx_v_u1, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3037; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_u1);
__pyx_v_u1 = __pyx_3;
__pyx_3 = 0;
Py_DECREF(__pyx_v_v1);
__pyx_v_v1 = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3038 */
__pyx_1 = __pyx_v_v3;
Py_INCREF(__pyx_1);
__pyx_3 = PyNumber_Multiply(__pyx_v_v3, __pyx_v_q); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3038; goto __pyx_L1;}
__pyx_2 = PyNumber_Subtract(__pyx_v_u3, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3038; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_u3);
__pyx_v_u3 = __pyx_1;
__pyx_1 = 0;
Py_DECREF(__pyx_v_v3);
__pyx_v_v3 = __pyx_2;
__pyx_2 = 0;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3039 */
while (1) {
__pyx_L4:;
__pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3039; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_v_u1, __pyx_3, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3039; goto __pyx_L1;}
__pyx_4 = __pyx_4 < 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (!__pyx_4) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3040 */
__pyx_1 = PyNumber_Add(__pyx_v_u1, __pyx_v_v); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3040; goto __pyx_L1;}
Py_DECREF(__pyx_v_u1);
__pyx_v_u1 = __pyx_1;
__pyx_1 = 0;
}
__pyx_L5:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3041 */
Py_INCREF(__pyx_v_u1);
__pyx_r = __pyx_v_u1;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.inverse");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_u3);
Py_DECREF(__pyx_v_v3);
Py_DECREF(__pyx_v_u1);
Py_DECREF(__pyx_v_v1);
Py_DECREF(__pyx_v_q);
Py_DECREF(__pyx_v_u);
Py_DECREF(__pyx_v_v);
return __pyx_r;
}

static PyObject *__pyx_n_divmod;
static PyObject *__pyx_n_reverse;

static PyObject *__pyx_k186p;

static char (__pyx_k186[]) = "";

static PyObject *__pyx_f_9SSLCrypto_long_to_bytes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_long_to_bytes[] = "\n    convert a number back to a string\n    string is big-endian byte order\n    ";
static PyObject *__pyx_f_9SSLCrypto_long_to_bytes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_n = 0;
PyObject *__pyx_v_chars;
PyObject *__pyx_v_rest;
PyObject *__pyx_v_chn;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {"n",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_n)) return 0;
Py_INCREF(__pyx_v_n);
__pyx_v_chars = Py_None; Py_INCREF(Py_None);
__pyx_v_rest = Py_None; Py_INCREF(Py_None);
__pyx_v_chn = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3049 */
__pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3049; goto __pyx_L1;}
Py_DECREF(__pyx_v_chars);
__pyx_v_chars = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3050 */
while (1) {
__pyx_L2:;
__pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_v_n, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3050; goto __pyx_L1;}
__pyx_2 = __pyx_2 > 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (!__pyx_2) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3051 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_divmod); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(256); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; goto __pyx_L1;}
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; goto __pyx_L1;}
Py_INCREF(__pyx_v_n);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_n);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
__pyx_3 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_1 = __Pyx_UnpackItem(__pyx_3, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; goto __pyx_L1;}
Py_DECREF(__pyx_v_rest);
__pyx_v_rest = __pyx_1;
__pyx_1 = 0;
__pyx_4 = __Pyx_UnpackItem(__pyx_3, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; goto __pyx_L1;}
Py_DECREF(__pyx_v_chn);
__pyx_v_chn = __pyx_4;
__pyx_4 = 0;
if (__Pyx_EndUnpack(__pyx_3, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3051; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3052 */
__pyx_1 = PyObject_GetAttr(__pyx_v_chars, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; goto __pyx_L1;}
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_chr); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; goto __pyx_L1;}
Py_INCREF(__pyx_v_chn);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_chn);
__pyx_5 = PyObject_CallObject(__pyx_4, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_5);
__pyx_5 = 0;
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3052; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3053 */
Py_INCREF(__pyx_v_rest);
Py_DECREF(__pyx_v_n);
__pyx_v_n = __pyx_v_rest;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3054 */
__pyx_5 = PyObject_GetAttr(__pyx_v_chars, __pyx_n_reverse); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; goto __pyx_L1;}
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; goto __pyx_L1;}
__pyx_4 = PyObject_CallObject(__pyx_5, __pyx_1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3054; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3055 */
__pyx_3 = PyObject_GetAttr(__pyx_k186p, __pyx_n_join); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; goto __pyx_L1;}
Py_INCREF(__pyx_v_chars);
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_v_chars);
__pyx_1 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3055; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.long_to_bytes");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_chars);
Py_DECREF(__pyx_v_rest);
Py_DECREF(__pyx_v_chn);
Py_DECREF(__pyx_v_n);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_bytes_to_long(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_bytes_to_long[] = "bytes_to_long(string) : long\n    Convert a byte string to a long integer.\n    string is big-endian byte order\n\n    This is (essentially) the inverse of long_to_bytes().\n    ";
static PyObject *__pyx_f_9SSLCrypto_bytes_to_long(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_s = 0;
PyObject *__pyx_v_n;
PyObject *__pyx_v_ch;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {"s",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_s)) return 0;
Py_INCREF(__pyx_v_s);
__pyx_v_n = Py_None; Py_INCREF(Py_None);
__pyx_v_ch = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3066 */
__pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3066; goto __pyx_L1;}
Py_DECREF(__pyx_v_n);
__pyx_v_n = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3067 */
__pyx_1 = PyObject_GetIter(__pyx_v_s); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; goto __pyx_L1;}
for (;;) {
__pyx_L2:;
__pyx_2 = PyIter_Next(__pyx_1);
if (!__pyx_2) {
if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3067; goto __pyx_L1;}
break;
}
Py_DECREF(__pyx_v_ch);
__pyx_v_ch = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3068 */
__pyx_2 = PyInt_FromLong(256); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; goto __pyx_L1;}
__pyx_3 = PyNumber_Multiply(__pyx_v_n, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ord); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; goto __pyx_L1;}
__pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; goto __pyx_L1;}
Py_INCREF(__pyx_v_ch);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_ch);
__pyx_5 = PyObject_CallObject(__pyx_2, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_2 = PyNumber_Add(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3068; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_v_n);
__pyx_v_n = __pyx_2;
__pyx_2 = 0;
}
__pyx_L3:;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3069 */
Py_INCREF(__pyx_v_n);
__pyx_r = __pyx_v_n;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.bytes_to_long");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_n);
Py_DECREF(__pyx_v_ch);
Py_DECREF(__pyx_v_s);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_genprime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_genprime[] = "\n    Generate a secure (Sophie-Germain) prime number<br>\n    <br>\n    Arguments:<ul>\n      <li>bits - number of bits length, default 256</li>\n      <li>callback - a function which accepts 2 arguents - level, num - for giving\n          user some feedback of progress</li>\n    </ul>\n    ";
static PyObject *__pyx_f_9SSLCrypto_genprime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_bits = 0;
PyObject *__pyx_v_myCallback = 0;
PyObject *__pyx_v_safe = 0;
BIGNUM (*__pyx_v_rand);
PyObject *__pyx_v_randLong;
PyObject *__pyx_r;
int __pyx_1;
int __pyx_2;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"bits","myCallback","safe",0};
__pyx_v_bits = __pyx_k72;
__pyx_v_myCallback = __pyx_k73;
__pyx_v_safe = __pyx_k74;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_bits, &__pyx_v_myCallback, &__pyx_v_safe)) return 0;
Py_INCREF(__pyx_v_bits);
Py_INCREF(__pyx_v_myCallback);
Py_INCREF(__pyx_v_safe);
__pyx_v_randLong = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3088 */
__pyx_1 = PyInt_AsLong(__pyx_v_bits); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3089; goto __pyx_L1;}
__pyx_2 = PyInt_AsLong(__pyx_v_safe); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3090; goto __pyx_L1;}
__pyx_v_rand = BN_generate_prime(0,__pyx_1,__pyx_2,0,0,callback,((void (*))__pyx_v_myCallback));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3096 */
__pyx_3 = bn2pyLong(__pyx_v_rand); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3096; goto __pyx_L1;}
Py_DECREF(__pyx_v_randLong);
__pyx_v_randLong = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3097 */
BN_free(__pyx_v_rand);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3098 */
callback((-1),0,((void (*))__pyx_v_myCallback));

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3099 */
Py_INCREF(__pyx_v_randLong);
__pyx_r = __pyx_v_randLong;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.genprime");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_randLong);
Py_DECREF(__pyx_v_bits);
Py_DECREF(__pyx_v_myCallback);
Py_DECREF(__pyx_v_safe);
return __pyx_r;
}

__PYX_EXTERN_C DL_EXPORT(void) callback(int __pyx_v_type,int __pyx_v_num,void (*__pyx_v_arg)) {
int __pyx_1;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3104 */
__pyx_1 = (__pyx_v_arg != ((void (*))0));
if (__pyx_1) {
__pyx_2 = (PyObject *)__pyx_v_arg;
Py_INCREF(__pyx_2);
if (PyObject_Cmp(__pyx_2, Py_None, &__pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3104; goto __pyx_L1;}
__pyx_1 = __pyx_1 != 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
}
if (__pyx_1) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3105 */
__pyx_2 = (PyObject *)__pyx_v_arg;
Py_INCREF(__pyx_2);
__pyx_3 = PyInt_FromLong(__pyx_v_type); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; goto __pyx_L1;}
__pyx_4 = PyInt_FromLong(__pyx_v_num); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; goto __pyx_L1;}
__pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3);
PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4);
__pyx_3 = 0;
__pyx_4 = 0;
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3105; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
goto __pyx_L2;
}
__pyx_L2:;

goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
__Pyx_WriteUnraisable("SSLCrypto.callback");
__pyx_L0:;
}

static PyObject *__pyx_f_9SSLCrypto_genrandom(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_genrandom[] = "\n    Generates an n-bit quality random number\n    ";
static PyObject *__pyx_f_9SSLCrypto_genrandom(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_bits = 0;
PyObject *__pyx_v_top = 0;
PyObject *__pyx_v_bottom = 0;
BIGNUM (*__pyx_v_rand);
PyObject *__pyx_v_randLong;
PyObject *__pyx_r;
int __pyx_1;
int __pyx_2;
int __pyx_3;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"bits","top","bottom",0};
__pyx_v_bits = __pyx_k75;
__pyx_v_top = __pyx_k76;
__pyx_v_bottom = __pyx_k77;
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|OOO", __pyx_argnames, &__pyx_v_bits, &__pyx_v_top, &__pyx_v_bottom)) return 0;
Py_INCREF(__pyx_v_bits);
Py_INCREF(__pyx_v_top);
Py_INCREF(__pyx_v_bottom);
__pyx_v_randLong = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3117 */
__pyx_v_rand = BN_new();

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3121 */
__pyx_1 = PyInt_AsLong(__pyx_v_bits); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3122; goto __pyx_L1;}
__pyx_2 = PyInt_AsLong(__pyx_v_top); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3123; goto __pyx_L1;}
__pyx_3 = PyInt_AsLong(__pyx_v_bottom); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3124; goto __pyx_L1;}
BN_rand(__pyx_v_rand,__pyx_1,__pyx_2,__pyx_3);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3129 */
__pyx_4 = bn2pyLong(__pyx_v_rand); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3129; goto __pyx_L1;}
Py_DECREF(__pyx_v_randLong);
__pyx_v_randLong = __pyx_4;
__pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3133 */
BN_free(__pyx_v_rand);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3137 */
Py_INCREF(__pyx_v_randLong);
__pyx_r = __pyx_v_randLong;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.genrandom");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_randLong);
Py_DECREF(__pyx_v_bits);
Py_DECREF(__pyx_v_top);
Py_DECREF(__pyx_v_bottom);
return __pyx_r;
}

__PYX_EXTERN_C DL_EXPORT(PyObject) *bn2pyLong(BIGNUM (*__pyx_v_bnum)) {
char (*__pyx_v_numStr);
PyObject *__pyx_v_numLong;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
__pyx_v_numLong = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3143 */
__pyx_v_numStr = BN_bn2dec(__pyx_v_bnum);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3144 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3144; goto __pyx_L1;}
__pyx_2 = PyString_FromString(__pyx_v_numStr); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3144; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3144; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3144; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_numLong);
__pyx_v_numLong = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3145 */
CRYPTO_free(__pyx_v_numStr);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3146 */
Py_INCREF(__pyx_v_numLong);
__pyx_r = __pyx_v_numLong;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.bn2pyLong");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_numLong);
return __pyx_r;
}

static PyObject *__pyx_n_repr;

static PyObject *__pyx_k187p;
static PyObject *__pyx_k188p;

static char (__pyx_k187[]) = "pyLong2bn: conversion failed!!";
static char (__pyx_k188[]) = "Conversion failed - Invalid number";

__PYX_EXTERN_C DL_EXPORT(BIGNUM) (*pyLong2bn(PyObject *__pyx_v_n)) {
BIGNUM (*__pyx_v_bnum);
int __pyx_v_result;
char (*__pyx_v_cstr);
PyObject *__pyx_v_s;
BIGNUM (*__pyx_r);
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
char (*__pyx_4);
int __pyx_5;
Py_INCREF(__pyx_v_n);
__pyx_v_s = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3156 */
__pyx_v_bnum = BN_new();

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3158 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_repr); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3158; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3158; goto __pyx_L1;}
Py_INCREF(__pyx_v_n);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_n);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3158; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_s);
__pyx_v_s = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3159 */
__pyx_4 = PyString_AsString(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3159; goto __pyx_L1;}
__pyx_v_cstr = __pyx_4;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3160 */
__pyx_v_result = BN_dec2bn((&__pyx_v_bnum),__pyx_v_cstr);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3161 */
__pyx_5 = (__pyx_v_result == 0);
if (__pyx_5) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3162 */
if (__Pyx_PrintItem(__pyx_k187p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; goto __pyx_L1;}
if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3162; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3163 */
if (__Pyx_PrintItem(__pyx_v_n) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; goto __pyx_L1;}
if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3163; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3164 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; goto __pyx_L1;}
Py_INCREF(__pyx_k188p);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k188p);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__Pyx_Raise(__pyx_3, 0, 0);
Py_DECREF(__pyx_3); __pyx_3 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 3164; goto __pyx_L1;}
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3166 */
__pyx_r = __pyx_v_bnum;
goto __pyx_L0;
}
__pyx_L2:;

goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_WriteUnraisable("SSLCrypto.pyLong2bn");
__pyx_L0:;
Py_DECREF(__pyx_v_s);
Py_DECREF(__pyx_v_n);
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto_randomseed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto_randomseed[] = "\n    <b>randomseed</b> - feed entropy to the random number generator<br>\n    <br>\n    Allows client code to pass entropy to OpenSSL\'s pseudo-random\n    number generation.<br>\n    <br>\n    You <b>must</b> call this function before doing anything with this module.\n    If you don\'t, you\'ll be totally susceptible to random number analysis\n    attacks, and your security could be dead in the water. <i>You have been warned!</i><br>\n    <br>\n    Arguments:<ul>\n     <li><b>entropy</b> - a plain string of data to be fed in as entropy.\n     You can pass anything you like here - sampled mouse movements,\n     keystrokes etc.</li>\n    </ul>\n    Returns:<ul>\n     <li>None</li>\n     </ul>\n    ";
static PyObject *__pyx_f_9SSLCrypto_randomseed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_entropy = 0;
int __pyx_v_cBufLen;
char (*__pyx_v_cBuf);
PyObject *__pyx_r;
char (*__pyx_1);
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
int __pyx_5;
static char *__pyx_argnames[] = {"entropy",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_entropy)) return 0;
Py_INCREF(__pyx_v_entropy);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3193 */
__pyx_1 = PyString_AsString(__pyx_v_entropy); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3193; goto __pyx_L1;}
__pyx_v_cBuf = __pyx_1;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3194 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; goto __pyx_L1;}
Py_INCREF(__pyx_v_entropy);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_entropy);
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_5 = PyInt_AsLong(__pyx_4); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3194; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_v_cBufLen = __pyx_5;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3196 */
RAND_seed(__pyx_v_cBuf,__pyx_v_cBufLen);

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.randomseed");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_entropy);
return __pyx_r;
}

static PyObject *__pyx_k189p;
static PyObject *__pyx_k190p;

static char (__pyx_k189[]) = "about to raise exception";
static char (__pyx_k190[]) = "this is an exception";

static PyObject *__pyx_f_9SSLCrypto__exctest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9SSLCrypto__exctest[] = "\n    Tests exception handling in pyrex\"\n    ";
static PyObject *__pyx_f_9SSLCrypto__exctest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3203 */
if (__Pyx_PrintItem(__pyx_k189p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; goto __pyx_L1;}
if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3203; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3204 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; goto __pyx_L1;}
Py_INCREF(__pyx_k190p);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_k190p);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__Pyx_Raise(__pyx_3, 0, 0);
Py_DECREF(__pyx_3); __pyx_3 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 3204; goto __pyx_L1;}

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto._exctest");
__pyx_r = 0;
__pyx_L0:;
return __pyx_r;
}

static PyObject *__pyx_f_9SSLCrypto__die(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9SSLCrypto__die(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_r;
static char *__pyx_argnames[] = {0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3210 */
_c_die();

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
__Pyx_AddTraceback("SSLCrypto._die");
__pyx_r = 0;
__pyx_L0:;
return __pyx_r;
}

static PyObject *__pyx_n_match;
static PyObject *__pyx_n_ValueError;
static PyObject *__pyx_n_group;
static PyObject *__pyx_n_end;

static PyObject *__pyx_f_9SSLCrypto_decode_int(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9SSLCrypto_decode_int(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_x = 0;
PyObject *__pyx_v_f = 0;
PyObject *__pyx_v_m;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {"x","f",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_x, &__pyx_v_f)) return 0;
Py_INCREF(__pyx_v_x);
Py_INCREF(__pyx_v_f);
__pyx_v_m = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3228 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_int_filter); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3228; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_match); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3228; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3228; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_x);
Py_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_f);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3228; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_m);
__pyx_v_m = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3229 */
__pyx_4 = __pyx_v_m == Py_None;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3230 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; goto __pyx_L1;}
__Pyx_Raise(__pyx_2, 0, 0);
Py_DECREF(__pyx_2); __pyx_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 3230; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3231 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_m, __pyx_n_group); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
__pyx_5 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_2 = PyObject_GetAttr(__pyx_v_m, __pyx_n_end); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3231; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_3);
__pyx_5 = 0;
__pyx_3 = 0;
__pyx_r = __pyx_2;
__pyx_2 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.decode_int");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_m);
Py_DECREF(__pyx_v_x);
Py_DECREF(__pyx_v_f);
return __pyx_r;
}

static PyObject *__pyx_n_int;

static PyObject *__pyx_f_9SSLCrypto_decode_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9SSLCrypto_decode_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_x = 0;
PyObject *__pyx_v_f = 0;
PyObject *__pyx_v_m;
PyObject *__pyx_v_l;
PyObject *__pyx_v_s;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
PyObject *__pyx_5 = 0;
int __pyx_6;
static char *__pyx_argnames[] = {"x","f",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_x, &__pyx_v_f)) return 0;
Py_INCREF(__pyx_v_x);
Py_INCREF(__pyx_v_f);
__pyx_v_m = Py_None; Py_INCREF(Py_None);
__pyx_v_l = Py_None; Py_INCREF(Py_None);
__pyx_v_s = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3235 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_string_filter); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; goto __pyx_L1;}
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_match); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_x);
Py_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_v_f);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3235; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_m);
__pyx_v_m = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3236 */
__pyx_4 = __pyx_v_m == Py_None;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3237 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; goto __pyx_L1;}
__Pyx_Raise(__pyx_2, 0, 0);
Py_DECREF(__pyx_2); __pyx_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 3237; goto __pyx_L1;}
goto __pyx_L2;
}
__pyx_L2:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3238 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3238; goto __pyx_L1;}
__pyx_3 = PyObject_GetAttr(__pyx_v_m, __pyx_n_group); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3238; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3238; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3238; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3238; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3238; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
__pyx_5 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3238; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_v_l);
__pyx_v_l = __pyx_5;
__pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3239 */
__pyx_2 = PyObject_GetAttr(__pyx_v_m, __pyx_n_end); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; goto __pyx_L1;}
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3239; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_s);
__pyx_v_s = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3240 */
__pyx_4 = PyInt_AsLong(__pyx_v_s); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; goto __pyx_L1;}
__pyx_5 = PyNumber_Add(__pyx_v_s, __pyx_v_l); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; goto __pyx_L1;}
__pyx_6 = PyInt_AsLong(__pyx_5); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_2 = PySequence_GetSlice(__pyx_v_x, __pyx_4, __pyx_6); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; goto __pyx_L1;}
__pyx_1 = PyNumber_Add(__pyx_v_s, __pyx_v_l); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3240; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_1);
__pyx_2 = 0;
__pyx_1 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.decode_string");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_m);
Py_DECREF(__pyx_v_l);
Py_DECREF(__pyx_v_s);
Py_DECREF(__pyx_v_x);
Py_DECREF(__pyx_v_f);
return __pyx_r;
}


static PyObject *__pyx_f_9SSLCrypto_decode_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9SSLCrypto_decode_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_x = 0;
PyObject *__pyx_v_f = 0;
PyObject *__pyx_v_r;
PyObject *__pyx_v_v;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"x","f",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_x, &__pyx_v_f)) return 0;
Py_INCREF(__pyx_v_x);
Py_INCREF(__pyx_v_f);
__pyx_v_r = Py_None; Py_INCREF(Py_None);
__pyx_v_v = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3244 */
__pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3244; goto __pyx_L1;}
Py_DECREF(__pyx_v_r);
__pyx_v_r = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3245 */
while (1) {
__pyx_L2:;
__pyx_1 = PyObject_GetItem(__pyx_v_x, __pyx_v_f); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3245; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_1, __pyx_n_e, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3245; goto __pyx_L1;}
__pyx_2 = __pyx_2 != 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (!__pyx_2) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3246 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bdecode_rec); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
Py_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_f);
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = __Pyx_UnpackItem(__pyx_4, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; goto __pyx_L1;}
Py_DECREF(__pyx_v_v);
__pyx_v_v = __pyx_1;
__pyx_1 = 0;
__pyx_3 = __Pyx_UnpackItem(__pyx_4, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; goto __pyx_L1;}
Py_DECREF(__pyx_v_f);
__pyx_v_f = __pyx_3;
__pyx_3 = 0;
if (__Pyx_EndUnpack(__pyx_4, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3246; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3247 */
__pyx_1 = PyObject_GetAttr(__pyx_v_r, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3247; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3247; goto __pyx_L1;}
Py_INCREF(__pyx_v_v);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_v);
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3247; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3248 */
__pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; goto __pyx_L1;}
__pyx_3 = PyNumber_Add(__pyx_v_f, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3248; goto __pyx_L1;}
Py_INCREF(__pyx_v_r);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_r);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3);
__pyx_3 = 0;
__pyx_r = __pyx_4;
__pyx_4 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.decode_list");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_r);
Py_DECREF(__pyx_v_v);
Py_DECREF(__pyx_v_x);
Py_DECREF(__pyx_v_f);
return __pyx_r;
}


static PyObject *__pyx_f_9SSLCrypto_decode_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9SSLCrypto_decode_dict(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_x = 0;
PyObject *__pyx_v_f = 0;
PyObject *__pyx_v_r;
PyObject *__pyx_v_lastkey;
PyObject *__pyx_v_k;
PyObject *__pyx_v_v;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"x","f",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_x, &__pyx_v_f)) return 0;
Py_INCREF(__pyx_v_x);
Py_INCREF(__pyx_v_f);
__pyx_v_r = Py_None; Py_INCREF(Py_None);
__pyx_v_lastkey = Py_None; Py_INCREF(Py_None);
__pyx_v_k = Py_None; Py_INCREF(Py_None);
__pyx_v_v = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3252 */
__pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3252; goto __pyx_L1;}
Py_DECREF(__pyx_v_r);
__pyx_v_r = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3253 */
Py_INCREF(Py_None);
Py_DECREF(__pyx_v_lastkey);
__pyx_v_lastkey = Py_None;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3254 */
while (1) {
__pyx_L2:;
__pyx_1 = PyObject_GetItem(__pyx_v_x, __pyx_v_f); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3254; goto __pyx_L1;}
if (PyObject_Cmp(__pyx_1, __pyx_n_e, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3254; goto __pyx_L1;}
__pyx_2 = __pyx_2 != 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (!__pyx_2) break;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3255 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_decode_string); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
Py_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_f);
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = __Pyx_UnpackItem(__pyx_4, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; goto __pyx_L1;}
Py_DECREF(__pyx_v_k);
__pyx_v_k = __pyx_1;
__pyx_1 = 0;
__pyx_3 = __Pyx_UnpackItem(__pyx_4, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; goto __pyx_L1;}
Py_DECREF(__pyx_v_f);
__pyx_v_f = __pyx_3;
__pyx_3 = 0;
if (__Pyx_EndUnpack(__pyx_4, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3255; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3256 */
__pyx_2 = __pyx_v_lastkey != Py_None;
if (__pyx_2) {
if (PyObject_Cmp(__pyx_v_lastkey, __pyx_v_k, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3256; goto __pyx_L1;}
__pyx_2 = __pyx_2 >= 0;
}
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3257 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3257; goto __pyx_L1;}
__Pyx_Raise(__pyx_1, 0, 0);
Py_DECREF(__pyx_1); __pyx_1 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 3257; goto __pyx_L1;}
goto __pyx_L4;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3258 */
Py_INCREF(__pyx_v_k);
Py_DECREF(__pyx_v_lastkey);
__pyx_v_lastkey = __pyx_v_k;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3259 */
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_bdecode_rec); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3259; goto __pyx_L1;}
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3259; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_x);
Py_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_v_f);
__pyx_1 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3259; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_3 = __Pyx_UnpackItem(__pyx_1, 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3259; goto __pyx_L1;}
Py_DECREF(__pyx_v_v);
__pyx_v_v = __pyx_3;
__pyx_3 = 0;
__pyx_4 = __Pyx_UnpackItem(__pyx_1, 1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3259; goto __pyx_L1;}
Py_DECREF(__pyx_v_f);
__pyx_v_f = __pyx_4;
__pyx_4 = 0;
if (__Pyx_EndUnpack(__pyx_1, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3259; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3260 */
if (PyObject_SetItem(__pyx_v_r, __pyx_v_k, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3260; goto __pyx_L1;}
}
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3261 */
__pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3261; goto __pyx_L1;}
__pyx_4 = PyNumber_Add(__pyx_v_f, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3261; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3261; goto __pyx_L1;}
Py_INCREF(__pyx_v_r);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_r);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_4);
__pyx_4 = 0;
__pyx_r = __pyx_1;
__pyx_1 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.decode_dict");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_r);
Py_DECREF(__pyx_v_lastkey);
Py_DECREF(__pyx_v_k);
Py_DECREF(__pyx_v_v);
Py_DECREF(__pyx_v_x);
Py_DECREF(__pyx_v_f);
return __pyx_r;
}

static PyObject *__pyx_n_l;


static PyObject *__pyx_f_9SSLCrypto_bdecode_rec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9SSLCrypto_bdecode_rec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_x = 0;
PyObject *__pyx_v_f = 0;
PyObject *__pyx_v_t;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
int __pyx_2;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
static char *__pyx_argnames[] = {"x","f",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_x, &__pyx_v_f)) return 0;
Py_INCREF(__pyx_v_x);
Py_INCREF(__pyx_v_f);
__pyx_v_t = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3265 */
__pyx_1 = PyObject_GetItem(__pyx_v_x, __pyx_v_f); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3265; goto __pyx_L1;}
Py_DECREF(__pyx_v_t);
__pyx_v_t = __pyx_1;
__pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3266 */
if (PyObject_Cmp(__pyx_v_t, __pyx_n_i, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3266; goto __pyx_L1;}
__pyx_2 = __pyx_2 == 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3267 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_decode_int); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; goto __pyx_L1;}
__pyx_4 = PyNumber_Add(__pyx_v_f, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_4);
__pyx_4 = 0;
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3267; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_r = __pyx_4;
__pyx_4 = 0;
goto __pyx_L0;
goto __pyx_L2;
}
if (PyObject_Cmp(__pyx_v_t, __pyx_n_l, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3268; goto __pyx_L1;}
__pyx_2 = __pyx_2 == 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3269 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_decode_list); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; goto __pyx_L1;}
__pyx_4 = PyNumber_Add(__pyx_v_f, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_4);
__pyx_4 = 0;
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3269; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_r = __pyx_4;
__pyx_4 = 0;
goto __pyx_L0;
goto __pyx_L2;
}
if (PyObject_Cmp(__pyx_v_t, __pyx_n_d, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3270; goto __pyx_L1;}
__pyx_2 = __pyx_2 == 0;
if (__pyx_2) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3271 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_decode_dict); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; goto __pyx_L1;}
__pyx_4 = PyNumber_Add(__pyx_v_f, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_4);
__pyx_4 = 0;
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3271; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_r = __pyx_4;
__pyx_4 = 0;
goto __pyx_L0;
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3273 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_decode_string); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
Py_INCREF(__pyx_v_f);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_f);
__pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_r = __pyx_4;
__pyx_4 = 0;
goto __pyx_L0;
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
__Pyx_AddTraceback("SSLCrypto.bdecode_rec");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_t);
Py_DECREF(__pyx_v_x);
Py_DECREF(__pyx_v_f);
return __pyx_r;
}

static PyObject *__pyx_n_IndexError;

static PyObject *__pyx_f_9SSLCrypto_bdecode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9SSLCrypto_bdecode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_x = 0;
PyObject *__pyx_v_r;
PyObject *__pyx_v_l;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
static char *__pyx_argnames[] = {"x",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_x)) return 0;
Py_INCREF(__pyx_v_x);
__pyx_v_r = Py_None; Py_INCREF(Py_None);
__pyx_v_l = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3277 */
/*try:*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3278 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bdecode_rec); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3278; goto __pyx_L2;}
__pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3278; goto __pyx_L2;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3278; goto __pyx_L2;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3278; goto __pyx_L2;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
__pyx_1 = __Pyx_UnpackItem(__pyx_2, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3278; goto __pyx_L2;}
Py_DECREF(__pyx_v_r);
__pyx_v_r = __pyx_1;
__pyx_1 = 0;
__pyx_3 = __Pyx_UnpackItem(__pyx_2, 1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3278; goto __pyx_L2;}
Py_DECREF(__pyx_v_l);
__pyx_v_l = __pyx_3;
__pyx_3 = 0;
if (__Pyx_EndUnpack(__pyx_2, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3278; goto __pyx_L2;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
}
goto __pyx_L3;
__pyx_L2:;
Py_XDECREF(__pyx_1); __pyx_1 = 0;
Py_XDECREF(__pyx_3); __pyx_3 = 0;
Py_XDECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3279 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_IndexError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3279; goto __pyx_L1;}
__pyx_4 = PyErr_ExceptionMatches(__pyx_1);
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_4) {
__Pyx_AddTraceback("SSLCrypto.bdecode");
__pyx_3 = __Pyx_GetExcValue(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3279; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3280 */
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3280; goto __pyx_L1;}
__Pyx_Raise(__pyx_2, 0, 0);
Py_DECREF(__pyx_2); __pyx_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 3280; goto __pyx_L1;}
goto __pyx_L3;
}
goto __pyx_L1;
__pyx_L3:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3281 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3281; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3281; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_x);
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3281; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_Cmp(__pyx_v_l, __pyx_2, &__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3281; goto __pyx_L1;}
__pyx_4 = __pyx_4 != 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3282 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_ValueError); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3282; goto __pyx_L1;}
__Pyx_Raise(__pyx_1, 0, 0);
Py_DECREF(__pyx_1); __pyx_1 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 3282; goto __pyx_L1;}
goto __pyx_L4;
}
__pyx_L4:;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3283 */
Py_INCREF(__pyx_v_r);
__pyx_r = __pyx_v_r;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.bdecode");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_r);
Py_DECREF(__pyx_v_l);
Py_DECREF(__pyx_v_x);
return __pyx_r;
}

static PyObject *__pyx_n_write;
static PyObject *__pyx_n_sort;

static PyObject *__pyx_k196p;
static PyObject *__pyx_k197p;

static char (__pyx_k196[]) = "i%de";
static char (__pyx_k197[]) = "%d:%s";

static PyObject *__pyx_f_9SSLCrypto_bencode_rec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9SSLCrypto_bencode_rec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_x = 0;
PyObject *__pyx_v_b = 0;
PyObject *__pyx_v_t;
PyObject *__pyx_v_e;
PyObject *__pyx_v_keylist;
PyObject *__pyx_v_k;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
int __pyx_4;
PyObject *__pyx_5 = 0;
static char *__pyx_argnames[] = {"x","b",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "OO", __pyx_argnames, &__pyx_v_x, &__pyx_v_b)) return 0;
Py_INCREF(__pyx_v_x);
Py_INCREF(__pyx_v_b);
__pyx_v_t = Py_None; Py_INCREF(Py_None);
__pyx_v_e = Py_None; Py_INCREF(Py_None);
__pyx_v_keylist = Py_None; Py_INCREF(Py_None);
__pyx_v_k = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3287 */
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_t);
__pyx_v_t = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3288 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_IntType); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; goto __pyx_L1;}
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_LongType); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2);
__pyx_1 = 0;
__pyx_2 = 0;
__pyx_4 = PySequence_Contains(__pyx_3, __pyx_v_t); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3288; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3289 */
__pyx_1 = PyObject_GetAttr(__pyx_v_b, __pyx_n_write); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3289; goto __pyx_L1;}
__pyx_2 = PyNumber_Remainder(__pyx_k196p, __pyx_v_x); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3289; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3289; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3289; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
goto __pyx_L2;
}
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_StringType); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3290; goto __pyx_L1;}
__pyx_4 = __pyx_v_t == __pyx_1;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3291 */
__pyx_3 = PyObject_GetAttr(__pyx_v_b, __pyx_n_write); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; goto __pyx_L1;}
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_len); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_x);
__pyx_5 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5);
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_x);
__pyx_5 = 0;
__pyx_1 = PyNumber_Remainder(__pyx_k197p, __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1);
__pyx_1 = 0;
__pyx_2 = PyObject_CallObject(__pyx_3, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3291; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
goto __pyx_L2;
}
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_ListType); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_TupleType); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; goto __pyx_L1;}
__pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_1);
PyTuple_SET_ITEM(__pyx_5, 1, __pyx_3);
__pyx_1 = 0;
__pyx_3 = 0;
__pyx_4 = PySequence_Contains(__pyx_5, __pyx_v_t); if (__pyx_4 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3293 */
__pyx_2 = PyObject_GetAttr(__pyx_v_b, __pyx_n_write); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3293; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3293; goto __pyx_L1;}
Py_INCREF(__pyx_n_l);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_l);
__pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3293; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3294 */
__pyx_5 = PyObject_GetIter(__pyx_v_x); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; goto __pyx_L1;}
for (;;) {
__pyx_L3:;
__pyx_2 = PyIter_Next(__pyx_5);
if (!__pyx_2) {
if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3294; goto __pyx_L1;}
break;
}
Py_DECREF(__pyx_v_e);
__pyx_v_e = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3295 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bencode_rec); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; goto __pyx_L1;}
__pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; goto __pyx_L1;}
Py_INCREF(__pyx_v_e);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_v_e);
Py_INCREF(__pyx_v_b);
PyTuple_SET_ITEM(__pyx_3, 1, __pyx_v_b);
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3295; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
}
__pyx_L4:;
Py_DECREF(__pyx_5); __pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3296 */
__pyx_1 = PyObject_GetAttr(__pyx_v_b, __pyx_n_write); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3296; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3296; goto __pyx_L1;}
Py_INCREF(__pyx_n_e);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_e);
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3296; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
goto __pyx_L2;
}
__pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_DictType); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3297; goto __pyx_L1;}
__pyx_4 = __pyx_v_t == __pyx_5;
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (__pyx_4) {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3298 */
__pyx_1 = PyObject_GetAttr(__pyx_v_b, __pyx_n_write); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; goto __pyx_L1;}
Py_INCREF(__pyx_n_d);
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_n_d);
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3298; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3299 */
__pyx_5 = PyObject_GetAttr(__pyx_v_x, __pyx_n_keys); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3299; goto __pyx_L1;}
__pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3299; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_5, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3299; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_v_keylist);
__pyx_v_keylist = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3300 */
__pyx_2 = PyObject_GetAttr(__pyx_v_keylist, __pyx_n_sort); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; goto __pyx_L1;}
__pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; goto __pyx_L1;}
__pyx_1 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3300; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3301 */
__pyx_3 = PyObject_GetIter(__pyx_v_keylist); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3301; goto __pyx_L1;}
for (;;) {
__pyx_L5:;
__pyx_2 = PyIter_Next(__pyx_3);
if (!__pyx_2) {
if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3301; goto __pyx_L1;}
break;
}
Py_DECREF(__pyx_v_k);
__pyx_v_k = __pyx_2;
__pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3302 */
__pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_type); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; goto __pyx_L1;}
Py_INCREF(__pyx_v_k);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_k);
__pyx_2 = PyObject_CallObject(__pyx_5, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n_StringType); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; goto __pyx_L1;}
__pyx_4 = __pyx_2 == __pyx_5;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (!__pyx_4) {
PyErr_SetNone(PyExc_AssertionError);
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 3302; goto __pyx_L1;}
}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3303 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bencode_rec); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; goto __pyx_L1;}
Py_INCREF(__pyx_v_k);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_k);
Py_INCREF(__pyx_v_b);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_b);
__pyx_5 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3303; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3304 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bencode_rec); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; goto __pyx_L1;}
__pyx_2 = PyObject_GetItem(__pyx_v_x, __pyx_v_k); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; goto __pyx_L1;}
__pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_2);
Py_INCREF(__pyx_v_b);
PyTuple_SET_ITEM(__pyx_5, 1, __pyx_v_b);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3304; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
}
__pyx_L6:;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3305 */
__pyx_1 = PyObject_GetAttr(__pyx_v_b, __pyx_n_write); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3305; goto __pyx_L1;}
__pyx_5 = PyTuple_New(1); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3305; goto __pyx_L1;}
Py_INCREF(__pyx_n_e);
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_n_e);
__pyx_2 = PyObject_CallObject(__pyx_1, __pyx_5); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3305; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
goto __pyx_L2;
}
/*else*/ {

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3307 */
if (!0) {
PyErr_SetNone(PyExc_AssertionError);
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 3307; goto __pyx_L1;}
}
}
__pyx_L2:;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_5);
__Pyx_AddTraceback("SSLCrypto.bencode_rec");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_t);
Py_DECREF(__pyx_v_e);
Py_DECREF(__pyx_v_keylist);
Py_DECREF(__pyx_v_k);
Py_DECREF(__pyx_v_x);
Py_DECREF(__pyx_v_b);
return __pyx_r;
}

static PyObject *__pyx_n_getvalue;

static PyObject *__pyx_f_9SSLCrypto_bencode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9SSLCrypto_bencode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_x = 0;
PyObject *__pyx_v_b;
PyObject *__pyx_r;
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
static char *__pyx_argnames[] = {"x",0};
if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_x)) return 0;
Py_INCREF(__pyx_v_x);
__pyx_v_b = Py_None; Py_INCREF(Py_None);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3311 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_StringIO); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3311; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3311; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3311; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_v_b);
__pyx_v_b = __pyx_3;
__pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3312 */
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_bencode_rec); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3312; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3312; goto __pyx_L1;}
Py_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_x);
Py_INCREF(__pyx_v_b);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_v_b);
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3312; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3313 */
__pyx_1 = PyObject_GetAttr(__pyx_v_b, __pyx_n_getvalue); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; goto __pyx_L1;}
__pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; goto __pyx_L1;}
__pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3313; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_r = __pyx_3;
__pyx_3 = 0;
goto __pyx_L0;

__pyx_r = Py_None; Py_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
__Pyx_AddTraceback("SSLCrypto.bencode");
__pyx_r = 0;
__pyx_L0:;
Py_DECREF(__pyx_v_b);
Py_DECREF(__pyx_v_x);
return __pyx_r;
}

static __Pyx_InternTabEntry __pyx_intern_tab[] = {
{&__pyx_n_Blowfish, "Blowfish"},
{&__pyx_n_CryptoCannotDecrypt, "CryptoCannotDecrypt"},
{&__pyx_n_CryptoInvalidCiphertext, "CryptoInvalidCiphertext"},
{&__pyx_n_CryptoInvalidElGamalK, "CryptoInvalidElGamalK"},
{&__pyx_n_CryptoInvalidSignature, "CryptoInvalidSignature"},
{&__pyx_n_CryptoKeyError, "CryptoKeyError"},
{&__pyx_n_CryptoNoPrivateKey, "CryptoNoPrivateKey"},
{&__pyx_n_DictType, "DictType"},
{&__pyx_n_ElGamal, "ElGamal"},
{&__pyx_n_ElGamalobj, "ElGamalobj"},
{&__pyx_n_Exception, "Exception"},
{&__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9, "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9"},
{&__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C93402849236C3FAB4D27C7026C1D4DCB2602646DEC9751E763DBA37BDF8FF9406AD9E530EE5DB382F413001AEB06A53ED9027D831179727B0865A8918DA3EDBEBCF9B14ED44CE6CBACED4BB1BDB7F1447E6CC254B332051512BD7AF426FB8F401378CD2BF5983CA01C64B92ECF032EA15D1721D03F482D7CE6E74FEF6D55E702F46980C82B5A84031900B1C9E59E7C97FBEC7E8F323A97A7E36CC88BE0F1D45B7FF585AC54BD407B22B4154AACC8F6D7EBF48E1D814CC5ED20F8037E0A79715EEF29BE32806A1D58BB7C5DA76F550AA3D8A1FBFF0EB19CCB1A313D55CDA56C9EC2EF29632387FE8D76E3C0468043E8F663F4860EE12BF2D5B0B7474D6E694F91E6DCC4024FFFFFFFFFFFFFFFF, "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C93402849236C3FAB4D27C7026C1D4DCB2602646DEC9751E763DBA37BDF8FF9406AD9E530EE5DB382F413001AEB06A53ED9027D831179727B0865A8918DA3EDBEBCF9B14ED44CE6CBACED4BB1BDB7F1447E6CC254B332051512BD7AF426FB8F401378CD2BF5983CA01C64B92ECF032EA15D1721D03F482D7CE6E74FEF6D55E702F46980C82B5A84031900B1C9E59E7C97FBEC7E8F323A97A7E36CC88BE0F1D45B7FF585AC54BD407B22B4154AACC8F6D7EBF48E1D814CC5ED20F8037E0A79715EEF29BE32806A1D58BB7C5DA76F550AA3D8A1FBFF0EB19CCB1A313D55CDA56C9EC2EF29632387FE8D76E3C0468043E8F663F4860EE12BF2D5B0B7474D6E694F91E6DCC4024FFFFFFFFFFFFFFFF"},
{&__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199FFFFFFFFFFFFFFFF, "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199FFFFFFFFFFFFFFFF"},
{&__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF, "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF"},
{&__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF, "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF"},
{&__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF, "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF"},
{&__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF, "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF"},
{&__pyx_n_False, "False"},
{&__pyx_n_GCD, "GCD"},
{&__pyx_n_IndexError, "IndexError"},
{&__pyx_n_IntType, "IntType"},
{&__pyx_n_Key, "Key"},
{&__pyx_n_ListType, "ListType"},
{&__pyx_n_LongType, "LongType"},
{&__pyx_n_Message, "Message"},
{&__pyx_n_RSA, "RSA"},
{&__pyx_n_Signature, "Signature"},
{&__pyx_n_StringIO, "StringIO"},
{&__pyx_n_StringType, "StringType"},
{&__pyx_n_True, "True"},
{&__pyx_n_TupleType, "TupleType"},
{&__pyx_n_ValueError, "ValueError"},
{&__pyx_n__False, "_False"},
{&__pyx_n__True, "_True"},
{&__pyx_n___dict__, "__dict__"},
{&__pyx_n___eq__, "__eq__"},
{&__pyx_n___getstate__, "__getstate__"},
{&__pyx_n___init__, "__init__"},
{&__pyx_n___revision__, "__revision__"},
{&__pyx_n___setstate__, "__setstate__"},
{&__pyx_n__aldosSes, "_aldosSes"},
{&__pyx_n__algosPub, "_algosPub"},
{&__pyx_n__algosPub1, "_algosPub1"},
{&__pyx_n__algosSes, "_algosSes"},
{&__pyx_n__algosSes1, "_algosSes1"},
{&__pyx_n__algosSes2, "_algosSes2"},
{&__pyx_n__algosSes3, "_algosSes3"},
{&__pyx_n__calcBlkSize, "_calcBlkSize"},
{&__pyx_n__calcPubBlkSize, "_calcPubBlkSize"},
{&__pyx_n__calcSesBlkSize, "_calcSesBlkSize"},
{&__pyx_n__decBuf, "_decBuf"},
{&__pyx_n__decEmpty, "_decEmpty"},
{&__pyx_n__decRawPub, "_decRawPub"},
{&__pyx_n__decState, "_decState"},
{&__pyx_n__die, "_die"},
{&__pyx_n__encBuf, "_encBuf"},
{&__pyx_n__encHdrs, "_encHdrs"},
{&__pyx_n__encRawPub, "_encRawPub"},
{&__pyx_n__exctest, "_exctest"},
{&__pyx_n__genNewSessKey, "_genNewSessKey"},
{&__pyx_n__initBlkCipher, "_initBlkCipher"},
{&__pyx_n__passIV, "_passIV"},
{&__pyx_n__random, "_random"},
{&__pyx_n__rawPrivKey, "_rawPrivKey"},
{&__pyx_n__rawPubKey, "_rawPubKey"},
{&__pyx_n__setNewSessKey, "_setNewSessKey"},
{&__pyx_n__testPubKey, "_testPubKey"},
{&__pyx_n__tmpSessIVLen, "_tmpSessIVLen"},
{&__pyx_n__tmpSessKeyLen, "_tmpSessKeyLen"},
{&__pyx_n__unwrap, "_unwrap"},
{&__pyx_n__wrap, "_wrap"},
{&__pyx_n_abs, "abs"},
{&__pyx_n_algoPname, "algoPname"},
{&__pyx_n_algoPub, "algoPub"},
{&__pyx_n_algoSes, "algoSes"},
{&__pyx_n_algoSname, "algoSname"},
{&__pyx_n_append, "append"},
{&__pyx_n_base64, "base64"},
{&__pyx_n_bdecode, "bdecode"},
{&__pyx_n_bdecode_rec, "bdecode_rec"},
{&__pyx_n_bencode, "bencode"},
{&__pyx_n_bencode_rec, "bencode_rec"},
{&__pyx_n_bignum, "bignum"},
{&__pyx_n_blkCipher, "blkCipher"},
{&__pyx_n_bytes_to_long, "bytes_to_long"},
{&__pyx_n_c, "c"},
{&__pyx_n_cStringIO, "cStringIO"},
{&__pyx_n_callback, "callback"},
{&__pyx_n_chr, "chr"},
{&__pyx_n_compile, "compile"},
{&__pyx_n_construct, "construct"},
{&__pyx_n_d, "d"},
{&__pyx_n_decEnd, "decEnd"},
{&__pyx_n_decNext, "decNext"},
{&__pyx_n_decStart, "decStart"},
{&__pyx_n_decString, "decString"},
{&__pyx_n_decStringFromAscii, "decStringFromAscii"},
{&__pyx_n_decStringSess, "decStringSess"},
{&__pyx_n_decode_dict, "decode_dict"},
{&__pyx_n_decode_int, "decode_int"},
{&__pyx_n_decode_list, "decode_list"},
{&__pyx_n_decode_string, "decode_string"},
{&__pyx_n_decodestring, "decodestring"},
{&__pyx_n_decrypt, "decrypt"},
{&__pyx_n_digest, "digest"},
{&__pyx_n_divmod, "divmod"},
{&__pyx_n_e, "e"},
{&__pyx_n_encEnd, "encEnd"},
{&__pyx_n_encNext, "encNext"},
{&__pyx_n_encStart, "encStart"},
{&__pyx_n_encString, "encString"},
{&__pyx_n_encStringSess, "encStringSess"},
{&__pyx_n_encStringToAscii, "encStringToAscii"},
{&__pyx_n_encodestring, "encodestring"},
{&__pyx_n_encrypt, "encrypt"},
{&__pyx_n_end, "end"},
{&__pyx_n_error, "error"},
{&__pyx_n_exportKey, "exportKey"},
{&__pyx_n_exportKeyPrivate, "exportKeyPrivate"},
{&__pyx_n_g, "g"},
{&__pyx_n_genSessKey, "genSessKey"},
{&__pyx_n_generateKey, "generateKey"},
{&__pyx_n_genk, "genk"},
{&__pyx_n_genprime, "genprime"},
{&__pyx_n_genrandom, "genrandom"},
{&__pyx_n_get, "get"},
{&__pyx_n_getSessIV, "getSessIV"},
{&__pyx_n_getSessKey, "getSessKey"},
{&__pyx_n_getvalue, "getvalue"},
{&__pyx_n_group, "group"},
{&__pyx_n_hardPrimes, "hardPrimes"},
{&__pyx_n_hasPrivateKey, "hasPrivateKey"},
{&__pyx_n_has_key, "has_key"},
{&__pyx_n_hasattr, "hasattr"},
{&__pyx_n_i, "i"},
{&__pyx_n_importKey, "importKey"},
{&__pyx_n_importPrivKey, "importPrivKey"},
{&__pyx_n_importPubKey, "importPubKey"},
{&__pyx_n_index, "index"},
{&__pyx_n_int, "int"},
{&__pyx_n_int_filter, "int_filter"},
{&__pyx_n_inverse, "inverse"},
{&__pyx_n_isinstance, "isinstance"},
{&__pyx_n_join, "join"},
{&__pyx_n_k, "k"},
{&__pyx_n_key, "key"},
{&__pyx_n_keydata, "keydata"},
{&__pyx_n_keys, "keys"},
{&__pyx_n_keysize, "keysize"},
{&__pyx_n_l, "l"},
{&__pyx_n_len, "len"},
{&__pyx_n_long, "long"},
{&__pyx_n_long_to_bytes, "long_to_bytes"},
{&__pyx_n_makeNewKeys, "makeNewKeys"},
{&__pyx_n_map, "map"},
{&__pyx_n_match, "match"},
{&__pyx_n_math, "math"},
{&__pyx_n_maxSize, "maxSize"},
{&__pyx_n_md5, "md5"},
{&__pyx_n_myCallback, "myCallback"},
{&__pyx_n_new, "new"},
{&__pyx_n_ord, "ord"},
{&__pyx_n_p, "p"},
{&__pyx_n_passphrase, "passphrase"},
{&__pyx_n_pow, "pow"},
{&__pyx_n_privKey, "privKey"},
{&__pyx_n_privbytes, "privbytes"},
{&__pyx_n_pubBlkSize, "pubBlkSize"},
{&__pyx_n_pubKey, "pubKey"},
{&__pyx_n_randint, "randint"},
{&__pyx_n_random, "random"},
{&__pyx_n_randomseed, "randomseed"},
{&__pyx_n_range, "range"},
{&__pyx_n_re, "re"},
{&__pyx_n_repr, "repr"},
{&__pyx_n_reverse, "reverse"},
{&__pyx_n_rndfunc, "rndfunc"},
{&__pyx_n_sesBlkSize, "sesBlkSize"},
{&__pyx_n_sessIV, "sessIV"},
{&__pyx_n_sessKey, "sessKey"},
{&__pyx_n_setIV, "setIV"},
{&__pyx_n_setKey, "setKey"},
{&__pyx_n_setSessKey, "setSessKey"},
{&__pyx_n_setattr, "setattr"},
{&__pyx_n_sha, "sha"},
{&__pyx_n_sign, "sign"},
{&__pyx_n_signString, "signString"},
{&__pyx_n_size, "size"},
{&__pyx_n_sort, "sort"},
{&__pyx_n_split, "split"},
{&__pyx_n_string_filter, "string_filter"},
{&__pyx_n_struct, "struct"},
{&__pyx_n_test, "test"},
{&__pyx_n_testAscii, "testAscii"},
{&__pyx_n_traceback, "traceback"},
{&__pyx_n_tuple, "tuple"},
{&__pyx_n_type, "type"},
{&__pyx_n_types, "types"},
{&__pyx_n_update, "update"},
{&__pyx_n_verify, "verify"},
{&__pyx_n_verifyString, "verifyString"},
{&__pyx_n_version, "version"},
{&__pyx_n_write, "write"},
{&__pyx_n_x, "x"},
{&__pyx_n_y, "y"},
{&__pyx_n_zlib, "zlib"},
{0, 0}
};

static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_k11p, __pyx_k11, sizeof(__pyx_k11)},
{&__pyx_k13p, __pyx_k13, sizeof(__pyx_k13)},
{&__pyx_k15p, __pyx_k15, sizeof(__pyx_k15)},
{&__pyx_k17p, __pyx_k17, sizeof(__pyx_k17)},
{&__pyx_k19p, __pyx_k19, sizeof(__pyx_k19)},
{&__pyx_k21p, __pyx_k21, sizeof(__pyx_k21)},
{&__pyx_k22p, __pyx_k22, sizeof(__pyx_k22)},
{&__pyx_k31p, __pyx_k31, sizeof(__pyx_k31)},
{&__pyx_k53p, __pyx_k53, sizeof(__pyx_k53)},
{&__pyx_k61p, __pyx_k61, sizeof(__pyx_k61)},
{&__pyx_k62p, __pyx_k62, sizeof(__pyx_k62)},
{&__pyx_k69p, __pyx_k69, sizeof(__pyx_k69)},
{&__pyx_k71p, __pyx_k71, sizeof(__pyx_k71)},
{&__pyx_k88p, __pyx_k88, sizeof(__pyx_k88)},
{&__pyx_k89p, __pyx_k89, sizeof(__pyx_k89)},
{&__pyx_k90p, __pyx_k90, sizeof(__pyx_k90)},
{&__pyx_k91p, __pyx_k91, sizeof(__pyx_k91)},
{&__pyx_k92p, __pyx_k92, sizeof(__pyx_k92)},
{&__pyx_k93p, __pyx_k93, sizeof(__pyx_k93)},
{&__pyx_k94p, __pyx_k94, sizeof(__pyx_k94)},
{&__pyx_k95p, __pyx_k95, sizeof(__pyx_k95)},
{&__pyx_k98p, __pyx_k98, sizeof(__pyx_k98)},
{&__pyx_k99p, __pyx_k99, sizeof(__pyx_k99)},
{&__pyx_k100p, __pyx_k100, sizeof(__pyx_k100)},
{&__pyx_k101p, __pyx_k101, sizeof(__pyx_k101)},
{&__pyx_k104p, __pyx_k104, sizeof(__pyx_k104)},
{&__pyx_k105p, __pyx_k105, sizeof(__pyx_k105)},
{&__pyx_k106p, __pyx_k106, sizeof(__pyx_k106)},
{&__pyx_k107p, __pyx_k107, sizeof(__pyx_k107)},
{&__pyx_k108p, __pyx_k108, sizeof(__pyx_k108)},
{&__pyx_k110p, __pyx_k110, sizeof(__pyx_k110)},
{&__pyx_k111p, __pyx_k111, sizeof(__pyx_k111)},
{&__pyx_k112p, __pyx_k112, sizeof(__pyx_k112)},
{&__pyx_k113p, __pyx_k113, sizeof(__pyx_k113)},
{&__pyx_k114p, __pyx_k114, sizeof(__pyx_k114)},
{&__pyx_k118p, __pyx_k118, sizeof(__pyx_k118)},
{&__pyx_k117p, __pyx_k117, sizeof(__pyx_k117)},
{&__pyx_k121p, __pyx_k121, sizeof(__pyx_k121)},
{&__pyx_k122p, __pyx_k122, sizeof(__pyx_k122)},
{&__pyx_k123p, __pyx_k123, sizeof(__pyx_k123)},
{&__pyx_k126p, __pyx_k126, sizeof(__pyx_k126)},
{&__pyx_k127p, __pyx_k127, sizeof(__pyx_k127)},
{&__pyx_k128p, __pyx_k128, sizeof(__pyx_k128)},
{&__pyx_k130p, __pyx_k130, sizeof(__pyx_k130)},
{&__pyx_k131p, __pyx_k131, sizeof(__pyx_k131)},
{&__pyx_k133p, __pyx_k133, sizeof(__pyx_k133)},
{&__pyx_k134p, __pyx_k134, sizeof(__pyx_k134)},
{&__pyx_k137p, __pyx_k137, sizeof(__pyx_k137)},
{&__pyx_k140p, __pyx_k140, sizeof(__pyx_k140)},
{&__pyx_k146p, __pyx_k146, sizeof(__pyx_k146)},
{&__pyx_k147p, __pyx_k147, sizeof(__pyx_k147)},
{&__pyx_k148p, __pyx_k148, sizeof(__pyx_k148)},
{&__pyx_k149p, __pyx_k149, sizeof(__pyx_k149)},
{&__pyx_k150p, __pyx_k150, sizeof(__pyx_k150)},
{&__pyx_k151p, __pyx_k151, sizeof(__pyx_k151)},
{&__pyx_k152p, __pyx_k152, sizeof(__pyx_k152)},
{&__pyx_k153p, __pyx_k153, sizeof(__pyx_k153)},
{&__pyx_k154p, __pyx_k154, sizeof(__pyx_k154)},
{&__pyx_k157p, __pyx_k157, sizeof(__pyx_k157)},
{&__pyx_k158p, __pyx_k158, sizeof(__pyx_k158)},
{&__pyx_k160p, __pyx_k160, sizeof(__pyx_k160)},
{&__pyx_k161p, __pyx_k161, sizeof(__pyx_k161)},
{&__pyx_k162p, __pyx_k162, sizeof(__pyx_k162)},
{&__pyx_k164p, __pyx_k164, sizeof(__pyx_k164)},
{&__pyx_k165p, __pyx_k165, sizeof(__pyx_k165)},
{&__pyx_k173p, __pyx_k173, sizeof(__pyx_k173)},
{&__pyx_k174p, __pyx_k174, sizeof(__pyx_k174)},
{&__pyx_k176p, __pyx_k176, sizeof(__pyx_k176)},
{&__pyx_k177p, __pyx_k177, sizeof(__pyx_k177)},
{&__pyx_k178p, __pyx_k178, sizeof(__pyx_k178)},
{&__pyx_k179p, __pyx_k179, sizeof(__pyx_k179)},
{&__pyx_k180p, __pyx_k180, sizeof(__pyx_k180)},
{&__pyx_k181p, __pyx_k181, sizeof(__pyx_k181)},
{&__pyx_k182p, __pyx_k182, sizeof(__pyx_k182)},
{&__pyx_k183p, __pyx_k183, sizeof(__pyx_k183)},
{&__pyx_k184p, __pyx_k184, sizeof(__pyx_k184)},
{&__pyx_k185p, __pyx_k185, sizeof(__pyx_k185)},
{&__pyx_k186p, __pyx_k186, sizeof(__pyx_k186)},
{&__pyx_k187p, __pyx_k187, sizeof(__pyx_k187)},
{&__pyx_k188p, __pyx_k188, sizeof(__pyx_k188)},
{&__pyx_k189p, __pyx_k189, sizeof(__pyx_k189)},
{&__pyx_k190p, __pyx_k190, sizeof(__pyx_k190)},
{&__pyx_k196p, __pyx_k196, sizeof(__pyx_k196)},
{&__pyx_k197p, __pyx_k197, sizeof(__pyx_k197)},
{0, 0, 0}
};

static PyObject *__pyx_tp_new_9SSLCrypto_dh(PyTypeObject *t, PyObject *a, PyObject *k) {
PyObject *o = (*t->tp_alloc)(t, 0);
struct __pyx_obj_9SSLCrypto_dh *p = (struct __pyx_obj_9SSLCrypto_dh *)o;
if (__pyx_f_9SSLCrypto_2dh___new__(o, a, k) < 0) {
Py_DECREF(o); o = 0;
}
return o;
}

static void __pyx_tp_dealloc_9SSLCrypto_dh(PyObject *o) {
struct __pyx_obj_9SSLCrypto_dh *p = (struct __pyx_obj_9SSLCrypto_dh *)o;
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
++o->ob_refcnt;
__pyx_f_9SSLCrypto_2dh___dealloc__(o);
if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
--o->ob_refcnt;
PyErr_Restore(etype, eval, etb);
}
(*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_9SSLCrypto_dh(PyObject *o, visitproc v, void *a) {
int e;
struct __pyx_obj_9SSLCrypto_dh *p = (struct __pyx_obj_9SSLCrypto_dh *)o;
return 0;
}

static int __pyx_tp_clear_9SSLCrypto_dh(PyObject *o) {
struct __pyx_obj_9SSLCrypto_dh *p = (struct __pyx_obj_9SSLCrypto_dh *)o;
return 0;
}

static struct PyMethodDef __pyx_methods_9SSLCrypto_dh[] = {
{"genParms", (PyCFunction)__pyx_f_9SSLCrypto_2dh_genParms, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_2dh_genParms},
{"importParms", (PyCFunction)__pyx_f_9SSLCrypto_2dh_importParms, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_2dh_importParms},
{"exportParms", (PyCFunction)__pyx_f_9SSLCrypto_2dh_exportParms, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_2dh_exportParms},
{"genPubKey", (PyCFunction)__pyx_f_9SSLCrypto_2dh_genPubKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_2dh_genPubKey},
{"privKey", (PyCFunction)__pyx_f_9SSLCrypto_2dh_privKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_2dh_privKey},
{"genSessKey", (PyCFunction)__pyx_f_9SSLCrypto_2dh_genSessKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_2dh_genSessKey},
{0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_dh = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
0, /*nb_divide*/
0, /*nb_remainder*/
0, /*nb_divmod*/
0, /*nb_power*/
0, /*nb_negative*/
0, /*nb_positive*/
0, /*nb_absolute*/
0, /*nb_nonzero*/
0, /*nb_invert*/
0, /*nb_lshift*/
0, /*nb_rshift*/
0, /*nb_and*/
0, /*nb_xor*/
0, /*nb_or*/
0, /*nb_coerce*/
0, /*nb_int*/
0, /*nb_long*/
0, /*nb_float*/
0, /*nb_oct*/
0, /*nb_hex*/
0, /*nb_inplace_add*/
0, /*nb_inplace_subtract*/
0, /*nb_inplace_multiply*/
0, /*nb_inplace_divide*/
0, /*nb_inplace_remainder*/
0, /*nb_inplace_power*/
0, /*nb_inplace_lshift*/
0, /*nb_inplace_rshift*/
0, /*nb_inplace_and*/
0, /*nb_inplace_xor*/
0, /*nb_inplace_or*/
0, /*nb_floor_divide*/
0, /*nb_true_divide*/
0, /*nb_inplace_floor_divide*/
0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_dh = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
0, /*sq_item*/
0, /*sq_slice*/
0, /*sq_ass_item*/
0, /*sq_ass_slice*/
0, /*sq_contains*/
0, /*sq_inplace_concat*/
0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_dh = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_dh = {
0, /*bf_getreadbuffer*/
0, /*bf_getwritebuffer*/
0, /*bf_getsegcount*/
0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_9SSLCrypto_dh = {
PyObject_HEAD_INIT(0)
0, /*ob_size*/
"SSLCrypto.dh", /*tp_name*/
sizeof(struct __pyx_obj_9SSLCrypto_dh), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_9SSLCrypto_dh, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
&__pyx_tp_as_number_dh, /*tp_as_number*/
&__pyx_tp_as_sequence_dh, /*tp_as_sequence*/
&__pyx_tp_as_mapping_dh, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
&__pyx_tp_as_buffer_dh, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
"\n    class for Diffie-Hellman secure session key exchange<br>\n    <br>\n    Constructor arguments:<ul>\n    <li>None</li></ul>\n    ", /*tp_doc*/
__pyx_tp_traverse_9SSLCrypto_dh, /*tp_traverse*/
__pyx_tp_clear_9SSLCrypto_dh, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_9SSLCrypto_dh, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
__pyx_tp_new_9SSLCrypto_dh, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_mro*/
0, /*tp_cache*/
0, /*tp_subclasses*/
0, /*tp_weaklist*/
};

static PyObject *__pyx_tp_new_9SSLCrypto_blowfish(PyTypeObject *t, PyObject *a, PyObject *k) {
PyObject *o = (*t->tp_alloc)(t, 0);
struct __pyx_obj_9SSLCrypto_blowfish *p = (struct __pyx_obj_9SSLCrypto_blowfish *)o;
if (__pyx_f_9SSLCrypto_8blowfish___new__(o, a, k) < 0) {
Py_DECREF(o); o = 0;
}
return o;
}

static void __pyx_tp_dealloc_9SSLCrypto_blowfish(PyObject *o) {
struct __pyx_obj_9SSLCrypto_blowfish *p = (struct __pyx_obj_9SSLCrypto_blowfish *)o;
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
++o->ob_refcnt;
__pyx_f_9SSLCrypto_8blowfish___dealloc__(o);
if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
--o->ob_refcnt;
PyErr_Restore(etype, eval, etb);
}
(*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_9SSLCrypto_blowfish(PyObject *o, visitproc v, void *a) {
int e;
struct __pyx_obj_9SSLCrypto_blowfish *p = (struct __pyx_obj_9SSLCrypto_blowfish *)o;
return 0;
}

static int __pyx_tp_clear_9SSLCrypto_blowfish(PyObject *o) {
struct __pyx_obj_9SSLCrypto_blowfish *p = (struct __pyx_obj_9SSLCrypto_blowfish *)o;
return 0;
}

static struct PyMethodDef __pyx_methods_9SSLCrypto_blowfish[] = {
{"setKey", (PyCFunction)__pyx_f_9SSLCrypto_8blowfish_setKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_8blowfish_setKey},
{"setIV", (PyCFunction)__pyx_f_9SSLCrypto_8blowfish_setIV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_8blowfish_setIV},
{"encrypt", (PyCFunction)__pyx_f_9SSLCrypto_8blowfish_encrypt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_8blowfish_encrypt},
{"decrypt", (PyCFunction)__pyx_f_9SSLCrypto_8blowfish_decrypt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_8blowfish_decrypt},
{0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_blowfish = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
0, /*nb_divide*/
0, /*nb_remainder*/
0, /*nb_divmod*/
0, /*nb_power*/
0, /*nb_negative*/
0, /*nb_positive*/
0, /*nb_absolute*/
0, /*nb_nonzero*/
0, /*nb_invert*/
0, /*nb_lshift*/
0, /*nb_rshift*/
0, /*nb_and*/
0, /*nb_xor*/
0, /*nb_or*/
0, /*nb_coerce*/
0, /*nb_int*/
0, /*nb_long*/
0, /*nb_float*/
0, /*nb_oct*/
0, /*nb_hex*/
0, /*nb_inplace_add*/
0, /*nb_inplace_subtract*/
0, /*nb_inplace_multiply*/
0, /*nb_inplace_divide*/
0, /*nb_inplace_remainder*/
0, /*nb_inplace_power*/
0, /*nb_inplace_lshift*/
0, /*nb_inplace_rshift*/
0, /*nb_inplace_and*/
0, /*nb_inplace_xor*/
0, /*nb_inplace_or*/
0, /*nb_floor_divide*/
0, /*nb_true_divide*/
0, /*nb_inplace_floor_divide*/
0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_blowfish = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
0, /*sq_item*/
0, /*sq_slice*/
0, /*sq_ass_item*/
0, /*sq_ass_slice*/
0, /*sq_contains*/
0, /*sq_inplace_concat*/
0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_blowfish = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_blowfish = {
0, /*bf_getreadbuffer*/
0, /*bf_getwritebuffer*/
0, /*bf_getsegcount*/
0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_9SSLCrypto_blowfish = {
PyObject_HEAD_INIT(0)
0, /*ob_size*/
"SSLCrypto.blowfish", /*tp_name*/
sizeof(struct __pyx_obj_9SSLCrypto_blowfish), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_9SSLCrypto_blowfish, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
&__pyx_tp_as_number_blowfish, /*tp_as_number*/
&__pyx_tp_as_sequence_blowfish, /*tp_as_sequence*/
&__pyx_tp_as_mapping_blowfish, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
&__pyx_tp_as_buffer_blowfish, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
"\n    class for Blowfish stream encryption<br>\n    <br>\n    Constructor Arguments:<ul>\n    <li><b>key</b> - string containing encryption key, <i>default None</i></li>\n    <li><b>iv</b> - 8-byte string for initial value (for chaining), default None</li>\n    </ul>\n    ", /*tp_doc*/
__pyx_tp_traverse_9SSLCrypto_blowfish, /*tp_traverse*/
__pyx_tp_clear_9SSLCrypto_blowfish, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_9SSLCrypto_blowfish, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
__pyx_tp_new_9SSLCrypto_blowfish, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_mro*/
0, /*tp_cache*/
0, /*tp_subclasses*/
0, /*tp_weaklist*/
};

static PyObject *__pyx_tp_new_9SSLCrypto_rsa(PyTypeObject *t, PyObject *a, PyObject *k) {
PyObject *o = (*t->tp_alloc)(t, 0);
struct __pyx_obj_9SSLCrypto_rsa *p = (struct __pyx_obj_9SSLCrypto_rsa *)o;
if (__pyx_f_9SSLCrypto_3rsa___new__(o, a, k) < 0) {
Py_DECREF(o); o = 0;
}
return o;
}

static void __pyx_tp_dealloc_9SSLCrypto_rsa(PyObject *o) {
struct __pyx_obj_9SSLCrypto_rsa *p = (struct __pyx_obj_9SSLCrypto_rsa *)o;
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
++o->ob_refcnt;
__pyx_f_9SSLCrypto_3rsa___dealloc__(o);
if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
--o->ob_refcnt;
PyErr_Restore(etype, eval, etb);
}
(*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_9SSLCrypto_rsa(PyObject *o, visitproc v, void *a) {
int e;
struct __pyx_obj_9SSLCrypto_rsa *p = (struct __pyx_obj_9SSLCrypto_rsa *)o;
return 0;
}

static int __pyx_tp_clear_9SSLCrypto_rsa(PyObject *o) {
struct __pyx_obj_9SSLCrypto_rsa *p = (struct __pyx_obj_9SSLCrypto_rsa *)o;
return 0;
}

static struct PyMethodDef __pyx_methods_9SSLCrypto_rsa[] = {
{"generateKey", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_generateKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_generateKey},
{"pubKey", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_pubKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_pubKey},
{"privKey", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_privKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_privKey},
{"rawprimes", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_rawprimes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_rawprimes},
{"importPubKey", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_importPubKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_importPubKey},
{"importPrivKey", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_importPrivKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_importPrivKey},
{"hasPrivateKey", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_hasPrivateKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_hasPrivateKey},
{"encrypt", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_encrypt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_encrypt},
{"decrypt", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_decrypt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_decrypt},
{"maxSize", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_maxSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_maxSize},
{"sign", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_sign, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_sign},
{"verify", (PyCFunction)__pyx_f_9SSLCrypto_3rsa_verify, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3rsa_verify},
{0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_rsa = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
0, /*nb_divide*/
0, /*nb_remainder*/
0, /*nb_divmod*/
0, /*nb_power*/
0, /*nb_negative*/
0, /*nb_positive*/
0, /*nb_absolute*/
0, /*nb_nonzero*/
0, /*nb_invert*/
0, /*nb_lshift*/
0, /*nb_rshift*/
0, /*nb_and*/
0, /*nb_xor*/
0, /*nb_or*/
0, /*nb_coerce*/
0, /*nb_int*/
0, /*nb_long*/
0, /*nb_float*/
0, /*nb_oct*/
0, /*nb_hex*/
0, /*nb_inplace_add*/
0, /*nb_inplace_subtract*/
0, /*nb_inplace_multiply*/
0, /*nb_inplace_divide*/
0, /*nb_inplace_remainder*/
0, /*nb_inplace_power*/
0, /*nb_inplace_lshift*/
0, /*nb_inplace_rshift*/
0, /*nb_inplace_and*/
0, /*nb_inplace_xor*/
0, /*nb_inplace_or*/
0, /*nb_floor_divide*/
0, /*nb_true_divide*/
0, /*nb_inplace_floor_divide*/
0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_rsa = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
0, /*sq_item*/
0, /*sq_slice*/
0, /*sq_ass_item*/
0, /*sq_ass_slice*/
0, /*sq_contains*/
0, /*sq_inplace_concat*/
0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_rsa = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_rsa = {
0, /*bf_getreadbuffer*/
0, /*bf_getwritebuffer*/
0, /*bf_getsegcount*/
0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_9SSLCrypto_rsa = {
PyObject_HEAD_INIT(0)
0, /*ob_size*/
"SSLCrypto.rsa", /*tp_name*/
sizeof(struct __pyx_obj_9SSLCrypto_rsa), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_9SSLCrypto_rsa, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
&__pyx_tp_as_number_rsa, /*tp_as_number*/
&__pyx_tp_as_sequence_rsa, /*tp_as_sequence*/
&__pyx_tp_as_mapping_rsa, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
&__pyx_tp_as_buffer_rsa, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
"\n    class for RSA public-key encryption<br><br>\n\n    Constructor Arguments:<ul>\n    <li>None</li>\n    </ul>\n    ", /*tp_doc*/
__pyx_tp_traverse_9SSLCrypto_rsa, /*tp_traverse*/
__pyx_tp_clear_9SSLCrypto_rsa, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_9SSLCrypto_rsa, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
__pyx_tp_new_9SSLCrypto_rsa, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_mro*/
0, /*tp_cache*/
0, /*tp_subclasses*/
0, /*tp_weaklist*/
};

static PyObject *__pyx_tp_new_9SSLCrypto_dsa(PyTypeObject *t, PyObject *a, PyObject *k) {
PyObject *o = (*t->tp_alloc)(t, 0);
struct __pyx_obj_9SSLCrypto_dsa *p = (struct __pyx_obj_9SSLCrypto_dsa *)o;
if (__pyx_f_9SSLCrypto_3dsa___new__(o, a, k) < 0) {
Py_DECREF(o); o = 0;
}
return o;
}

static void __pyx_tp_dealloc_9SSLCrypto_dsa(PyObject *o) {
struct __pyx_obj_9SSLCrypto_dsa *p = (struct __pyx_obj_9SSLCrypto_dsa *)o;
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
++o->ob_refcnt;
__pyx_f_9SSLCrypto_3dsa___dealloc__(o);
if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
--o->ob_refcnt;
PyErr_Restore(etype, eval, etb);
}
(*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_9SSLCrypto_dsa(PyObject *o, visitproc v, void *a) {
int e;
struct __pyx_obj_9SSLCrypto_dsa *p = (struct __pyx_obj_9SSLCrypto_dsa *)o;
return 0;
}

static int __pyx_tp_clear_9SSLCrypto_dsa(PyObject *o) {
struct __pyx_obj_9SSLCrypto_dsa *p = (struct __pyx_obj_9SSLCrypto_dsa *)o;
return 0;
}

static struct PyMethodDef __pyx_methods_9SSLCrypto_dsa[] = {
{"generateParameters", (PyCFunction)__pyx_f_9SSLCrypto_3dsa_generateParameters, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3dsa_generateParameters},
{"generateKey", (PyCFunction)__pyx_f_9SSLCrypto_3dsa_generateKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3dsa_generateKey},
{"pubKey", (PyCFunction)__pyx_f_9SSLCrypto_3dsa_pubKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3dsa_pubKey},
{"privKey", (PyCFunction)__pyx_f_9SSLCrypto_3dsa_privKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3dsa_privKey},
{"importPubKey", (PyCFunction)__pyx_f_9SSLCrypto_3dsa_importPubKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3dsa_importPubKey},
{"importPrivKey", (PyCFunction)__pyx_f_9SSLCrypto_3dsa_importPrivKey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3dsa_importPrivKey},
{"sign", (PyCFunction)__pyx_f_9SSLCrypto_3dsa_sign, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3dsa_sign},
{"signSha", (PyCFunction)__pyx_f_9SSLCrypto_3dsa_signSha, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3dsa_signSha},
{"verify", (PyCFunction)__pyx_f_9SSLCrypto_3dsa_verify, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3dsa_verify},
{"verifySha", (PyCFunction)__pyx_f_9SSLCrypto_3dsa_verifySha, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_3dsa_verifySha},
{0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_dsa = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
0, /*nb_divide*/
0, /*nb_remainder*/
0, /*nb_divmod*/
0, /*nb_power*/
0, /*nb_negative*/
0, /*nb_positive*/
0, /*nb_absolute*/
0, /*nb_nonzero*/
0, /*nb_invert*/
0, /*nb_lshift*/
0, /*nb_rshift*/
0, /*nb_and*/
0, /*nb_xor*/
0, /*nb_or*/
0, /*nb_coerce*/
0, /*nb_int*/
0, /*nb_long*/
0, /*nb_float*/
0, /*nb_oct*/
0, /*nb_hex*/
0, /*nb_inplace_add*/
0, /*nb_inplace_subtract*/
0, /*nb_inplace_multiply*/
0, /*nb_inplace_divide*/
0, /*nb_inplace_remainder*/
0, /*nb_inplace_power*/
0, /*nb_inplace_lshift*/
0, /*nb_inplace_rshift*/
0, /*nb_inplace_and*/
0, /*nb_inplace_xor*/
0, /*nb_inplace_or*/
0, /*nb_floor_divide*/
0, /*nb_true_divide*/
0, /*nb_inplace_floor_divide*/
0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_dsa = {
0, /*sq_length*/
0, /*sq_concat*/
0, /*sq_repeat*/
0, /*sq_item*/
0, /*sq_slice*/
0, /*sq_ass_item*/
0, /*sq_ass_slice*/
0, /*sq_contains*/
0, /*sq_inplace_concat*/
0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_dsa = {
0, /*mp_length*/
0, /*mp_subscript*/
0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_dsa = {
0, /*bf_getreadbuffer*/
0, /*bf_getwritebuffer*/
0, /*bf_getsegcount*/
0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_9SSLCrypto_dsa = {
PyObject_HEAD_INIT(0)
0, /*ob_size*/
"SSLCrypto.dsa", /*tp_name*/
sizeof(struct __pyx_obj_9SSLCrypto_dsa), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_9SSLCrypto_dsa, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
&__pyx_tp_as_number_dsa, /*tp_as_number*/
&__pyx_tp_as_sequence_dsa, /*tp_as_sequence*/
&__pyx_tp_as_mapping_dsa, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
&__pyx_tp_as_buffer_dsa, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
"\n    For DSA signature ciphers\n    ", /*tp_doc*/
__pyx_tp_traverse_9SSLCrypto_dsa, /*tp_traverse*/
__pyx_tp_clear_9SSLCrypto_dsa, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_9SSLCrypto_dsa, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
__pyx_tp_new_9SSLCrypto_dsa, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_mro*/
0, /*tp_cache*/
0, /*tp_subclasses*/
0, /*tp_weaklist*/
};

static struct PyMethodDef __pyx_methods[] = {
{"rndfunc", (PyCFunction)__pyx_f_9SSLCrypto_rndfunc, METH_VARARGS|METH_KEYWORDS, 0},
{"size", (PyCFunction)__pyx_f_9SSLCrypto_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_size},
{"GCD", (PyCFunction)__pyx_f_9SSLCrypto_GCD, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_GCD},
{"inverse", (PyCFunction)__pyx_f_9SSLCrypto_inverse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_inverse},
{"long_to_bytes", (PyCFunction)__pyx_f_9SSLCrypto_long_to_bytes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_long_to_bytes},
{"bytes_to_long", (PyCFunction)__pyx_f_9SSLCrypto_bytes_to_long, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_bytes_to_long},
{"genprime", (PyCFunction)__pyx_f_9SSLCrypto_genprime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_genprime},
{"genrandom", (PyCFunction)__pyx_f_9SSLCrypto_genrandom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_genrandom},
{"randomseed", (PyCFunction)__pyx_f_9SSLCrypto_randomseed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto_randomseed},
{"_exctest", (PyCFunction)__pyx_f_9SSLCrypto__exctest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_9SSLCrypto__exctest},
{"_die", (PyCFunction)__pyx_f_9SSLCrypto__die, METH_VARARGS|METH_KEYWORDS, 0},
{"decode_int", (PyCFunction)__pyx_f_9SSLCrypto_decode_int, METH_VARARGS|METH_KEYWORDS, 0},
{"decode_string", (PyCFunction)__pyx_f_9SSLCrypto_decode_string, METH_VARARGS|METH_KEYWORDS, 0},
{"decode_list", (PyCFunction)__pyx_f_9SSLCrypto_decode_list, METH_VARARGS|METH_KEYWORDS, 0},
{"decode_dict", (PyCFunction)__pyx_f_9SSLCrypto_decode_dict, METH_VARARGS|METH_KEYWORDS, 0},
{"bdecode_rec", (PyCFunction)__pyx_f_9SSLCrypto_bdecode_rec, METH_VARARGS|METH_KEYWORDS, 0},
{"bdecode", (PyCFunction)__pyx_f_9SSLCrypto_bdecode, METH_VARARGS|METH_KEYWORDS, 0},
{"bencode_rec", (PyCFunction)__pyx_f_9SSLCrypto_bencode_rec, METH_VARARGS|METH_KEYWORDS, 0},
{"bencode", (PyCFunction)__pyx_f_9SSLCrypto_bencode, METH_VARARGS|METH_KEYWORDS, 0},
{0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

PyMODINIT_FUNC initSSLCrypto(void); /*proto*/
PyMODINIT_FUNC initSSLCrypto(void) {
PyObject *__pyx_1 = 0;
PyObject *__pyx_2 = 0;
PyObject *__pyx_3 = 0;
PyObject *__pyx_4 = 0;
PyObject *__pyx_5 = 0;
PyObject *__pyx_6 = 0;
PyObject *__pyx_7 = 0;
PyObject *__pyx_8 = 0;
PyObject *__pyx_9 = 0;
PyObject *__pyx_10 = 0;
PyObject *__pyx_11 = 0;
PyObject *__pyx_12 = 0;
PyObject *__pyx_13 = 0;
PyObject *__pyx_14 = 0;
PyObject *__pyx_15 = 0;
__pyx_init_filenames();
__pyx_m = Py_InitModule4("SSLCrypto", __pyx_methods, __pyx_mdoc, 0, PYTHON_API_VERSION);
if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
__pyx_b = PyImport_AddModule("__builtin__");
if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
if (PyType_Ready(&__pyx_type_9SSLCrypto_dh) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; goto __pyx_L1;}
if (PyObject_SetAttrString(__pyx_m, "dh", (PyObject *)&__pyx_type_9SSLCrypto_dh) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; goto __pyx_L1;}
__pyx_ptype_9SSLCrypto_dh = &__pyx_type_9SSLCrypto_dh;
if (PyType_Ready(&__pyx_type_9SSLCrypto_blowfish) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; goto __pyx_L1;}
if (PyObject_SetAttrString(__pyx_m, "blowfish", (PyObject *)&__pyx_type_9SSLCrypto_blowfish) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; goto __pyx_L1;}
__pyx_ptype_9SSLCrypto_blowfish = &__pyx_type_9SSLCrypto_blowfish;
if (PyType_Ready(&__pyx_type_9SSLCrypto_rsa) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; goto __pyx_L1;}
if (PyObject_SetAttrString(__pyx_m, "rsa", (PyObject *)&__pyx_type_9SSLCrypto_rsa) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; goto __pyx_L1;}
__pyx_ptype_9SSLCrypto_rsa = &__pyx_type_9SSLCrypto_rsa;
if (PyType_Ready(&__pyx_type_9SSLCrypto_dsa) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;}
if (PyObject_SetAttrString(__pyx_m, "dsa", (PyObject *)&__pyx_type_9SSLCrypto_dsa) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; goto __pyx_L1;}
__pyx_ptype_9SSLCrypto_dsa = &__pyx_type_9SSLCrypto_dsa;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":25 */
__pyx_1 = __Pyx_Import(__pyx_n_base64, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_base64, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":26 */
__pyx_1 = __Pyx_Import(__pyx_n_zlib, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_zlib, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":27 */
__pyx_1 = __Pyx_Import(__pyx_n_md5, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_md5, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":28 */
__pyx_1 = __Pyx_Import(__pyx_n_sha, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_sha, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":29 */
__pyx_1 = __Pyx_Import(__pyx_n_types, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_types, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":30 */
__pyx_1 = __Pyx_Import(__pyx_n_traceback, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_traceback, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":31 */
__pyx_1 = __Pyx_Import(__pyx_n_struct, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_struct, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":32 */
__pyx_1 = __Pyx_Import(__pyx_n_random, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_random, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":33 */
__pyx_1 = __Pyx_Import(__pyx_n_math, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_math, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":38 */
__pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;}
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
if (PyDict_SetItemString(__pyx_1, "__doc__", __pyx_k11p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;}
__pyx_2 = __Pyx_CreateClass(__pyx_3, __pyx_1, __pyx_n_CryptoKeyError, "SSLCrypto"); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_CryptoKeyError, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":41 */
__pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
if (PyDict_SetItemString(__pyx_3, "__doc__", __pyx_k13p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
__pyx_1 = __Pyx_CreateClass(__pyx_2, __pyx_3, __pyx_n_CryptoCannotDecrypt, "SSLCrypto"); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_CryptoCannotDecrypt, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":44 */
__pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
__pyx_3 = 0;
if (PyDict_SetItemString(__pyx_2, "__doc__", __pyx_k15p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; goto __pyx_L1;}
__pyx_3 = __Pyx_CreateClass(__pyx_1, __pyx_2, __pyx_n_CryptoNoPrivateKey, "SSLCrypto"); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_CryptoNoPrivateKey, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":47 */
__pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;}
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;}
__pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
__pyx_2 = 0;
if (PyDict_SetItemString(__pyx_1, "__doc__", __pyx_k17p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;}
__pyx_2 = __Pyx_CreateClass(__pyx_3, __pyx_1, __pyx_n_CryptoInvalidCiphertext, "SSLCrypto"); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_CryptoInvalidCiphertext, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":50 */
__pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
__pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1);
__pyx_1 = 0;
if (PyDict_SetItemString(__pyx_3, "__doc__", __pyx_k19p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
__pyx_1 = __Pyx_CreateClass(__pyx_2, __pyx_3, __pyx_n_CryptoInvalidSignature, "SSLCrypto"); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_CryptoInvalidSignature, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":53 */
__pyx_2 = PyDict_New(); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
__pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3);
__pyx_3 = 0;
if (PyDict_SetItemString(__pyx_2, "__doc__", __pyx_k21p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
__pyx_3 = __Pyx_CreateClass(__pyx_1, __pyx_2, __pyx_n_CryptoInvalidElGamalK, "SSLCrypto"); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_CryptoInvalidElGamalK, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":374 */
__pyx_v_9SSLCrypto_BN_NULL = ((BIGNUM (*))0);

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":376 */
__pyx_1 = PyInt_FromLong(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n__True, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":377 */
__pyx_2 = PyInt_FromLong(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n__False, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":379 */
if (PyObject_SetAttr(__pyx_m, __pyx_n_version, __pyx_k22p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":383 */
__pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
__pyx_1 = PyInt_FromLong(4096); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; goto __pyx_L1;}
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; goto __pyx_L1;}
__pyx_4 = PyInt_FromLong(16); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; goto __pyx_L1;}
__pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; goto __pyx_L1;}
Py_INCREF(__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4);
__pyx_4 = 0;
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyDict_SetItem(__pyx_3, __pyx_1, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_2 = PyInt_FromLong(1024); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; goto __pyx_L1;}
__pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; goto __pyx_L1;}
__pyx_1 = PyInt_FromLong(16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; goto __pyx_L1;}
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; goto __pyx_L1;}
Py_INCREF(__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (PyDict_SetItem(__pyx_3, __pyx_2, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_5 = PyInt_FromLong(1536); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L1;}
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(16); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; goto __pyx_L1;}
__pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L1;}
Py_INCREF(__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyDict_SetItem(__pyx_3, __pyx_5, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_4 = PyInt_FromLong(2048); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;}
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;}
__pyx_5 = PyInt_FromLong(16); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; goto __pyx_L1;}
__pyx_2 = PyTuple_New(2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;}
Py_INCREF(__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_2, 1, __pyx_5);
__pyx_5 = 0;
__pyx_5 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
if (PyDict_SetItem(__pyx_3, __pyx_4, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
__pyx_1 = PyInt_FromLong(3072); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; goto __pyx_L1;}
__pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; goto __pyx_L1;}
__pyx_4 = PyInt_FromLong(16); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; goto __pyx_L1;}
__pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; goto __pyx_L1;}
Py_INCREF(__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_5, 0, __pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4);
__pyx_4 = 0;
__pyx_4 = PyObject_CallObject(__pyx_2, __pyx_5); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyDict_SetItem(__pyx_3, __pyx_1, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
__pyx_2 = PyInt_FromLong(4096); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
__pyx_5 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
__pyx_1 = PyInt_FromLong(16); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; goto __pyx_L1;}
__pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
Py_INCREF(__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_4, 0, __pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_4, 1, __pyx_1);
__pyx_1 = 0;
__pyx_1 = PyObject_CallObject(__pyx_5, __pyx_4); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;
if (PyDict_SetItem(__pyx_3, __pyx_2, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
__pyx_5 = PyInt_FromLong(6144); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; goto __pyx_L1;}
__pyx_4 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(16); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;}
__pyx_1 = PyTuple_New(2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; goto __pyx_L1;}
Py_INCREF(__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C93402849236C3FAB4D27C7026C1D4DCB2602646DEC9751E763DBA37BDF8FF9406AD9E530EE5DB382F413001AEB06A53ED9027D831179727B0865A8918DA3EDBEBCF9B14ED44CE6CBACED4BB1BDB7F1447E6CC254B332051512BD7AF426FB8F401378CD2BF5983CA01C64B92ECF032EA15D1721D03F482D7CE6E74FEF6D55E702F46980C82B5A84031900B1C9E59E7C97FBEC7E8F323A97A7E36CC88BE0F1D45B7FF585AC54BD407B22B4154AACC8F6D7EBF48E1D814CC5ED20F8037E0A79715EEF29BE32806A1D58BB7C5DA76F550AA3D8A1FBFF0EB19CCB1A313D55CDA56C9EC2EF29632387FE8D76E3C0468043E8F663F4860EE12BF2D5B0B7474D6E694F91E6DCC4024FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_1, 0, __pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C93402849236C3FAB4D27C7026C1D4DCB2602646DEC9751E763DBA37BDF8FF9406AD9E530EE5DB382F413001AEB06A53ED9027D831179727B0865A8918DA3EDBEBCF9B14ED44CE6CBACED4BB1BDB7F1447E6CC254B332051512BD7AF426FB8F401378CD2BF5983CA01C64B92ECF032EA15D1721D03F482D7CE6E74FEF6D55E702F46980C82B5A84031900B1C9E59E7C97FBEC7E8F323A97A7E36CC88BE0F1D45B7FF585AC54BD407B22B4154AACC8F6D7EBF48E1D814CC5ED20F8037E0A79715EEF29BE32806A1D58BB7C5DA76F550AA3D8A1FBFF0EB19CCB1A313D55CDA56C9EC2EF29632387FE8D76E3C0468043E8F663F4860EE12BF2D5B0B7474D6E694F91E6DCC4024FFFFFFFFFFFFFFFF);
PyTuple_SET_ITEM(__pyx_1, 1, __pyx_2);
__pyx_2 = 0;
__pyx_2 = PyObject_CallObject(__pyx_4, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_1); __pyx_1 = 0;
if (PyDict_SetItem(__pyx_3, __pyx_5, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_4 = PyInt_FromLong(8192); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
__pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_long); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
__pyx_5 = PyNumber_Add(__pyx_n_FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA9, __pyx_k31p); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;}
__pyx_2 = PyInt_FromLong(16); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; goto __pyx_L1;}
__pyx_6 = PyTuple_New(2); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5);
PyTuple_SET_ITEM(__pyx_6, 1, __pyx_2);
__pyx_5 = 0;
__pyx_2 = 0;
__pyx_5 = PyObject_CallObject(__pyx_1, __pyx_6); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;}
Py_DECREF(__pyx_1); __pyx_1 = 0;
Py_DECREF(__pyx_6); __pyx_6 = 0;
if (PyDict_SetItem(__pyx_3, __pyx_4, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_hardPrimes, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":592 */
__pyx_2 = PyInt_FromLong(1024); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; goto __pyx_L1;}
__pyx_k32 = __pyx_2;
__pyx_2 = 0;
__pyx_1 = PyInt_FromLong(5); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; goto __pyx_L1;}
__pyx_k33 = __pyx_1;
__pyx_1 = 0;
Py_INCREF(Py_None);
__pyx_k34 = Py_None;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":616 */
Py_INCREF(Py_None);
__pyx_k35 = Py_None;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":743 */
Py_INCREF(Py_None);
__pyx_k36 = Py_None;
Py_INCREF(Py_None);
__pyx_k37 = Py_None;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":758 */
Py_INCREF(Py_None);
__pyx_k38 = Py_None;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":789 */
Py_INCREF(Py_None);
__pyx_k39 = Py_None;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":903 */
__pyx_6 = PyInt_FromLong(1024); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; goto __pyx_L1;}
__pyx_k40 = __pyx_6;
__pyx_6 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1231 */
Py_INCREF(Py_None);
__pyx_k41 = Py_None;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1441 */
__pyx_4 = PyDict_New(); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; goto __pyx_L1;}
__pyx_5 = PyTuple_New(0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; goto __pyx_L1;}
__pyx_3 = __Pyx_CreateClass(__pyx_5, __pyx_4, __pyx_n_ElGamal, "SSLCrypto"); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1444 */
__pyx_5 = PyList_New(4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; goto __pyx_L1;}
Py_INCREF(__pyx_n_p);
PyList_SET_ITEM(__pyx_5, 0, __pyx_n_p);
Py_INCREF(__pyx_n_g);
PyList_SET_ITEM(__pyx_5, 1, __pyx_n_g);
Py_INCREF(__pyx_n_y);
PyList_SET_ITEM(__pyx_5, 2, __pyx_n_y);
Py_INCREF(__pyx_n_x);
PyList_SET_ITEM(__pyx_5, 3, __pyx_n_x);
if (PyObject_SetAttr(__pyx_3, __pyx_n_keydata, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1448 */
Py_INCREF(Py_None);
__pyx_k47 = Py_None;
Py_INCREF(Py_None);
__pyx_k48 = Py_None;
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal___init__, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n___init__, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1456 */
Py_INCREF(Py_None);
__pyx_k49 = Py_None;
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_generateKey, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_generateKey, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1530 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_genk, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_genk, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1545 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_construct, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_construct, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1545; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1560 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal___getstate__, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1560; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1560; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n___getstate__, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1560; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1571 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal___setstate__, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n___setstate__, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1571; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1579 */
Py_INCREF(Py_None);
__pyx_k50 = Py_None;
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_encrypt, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_encrypt, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1608 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_decrypt, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_decrypt, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1638 */
Py_INCREF(Py_None);
__pyx_k51 = Py_None;
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_sign, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_sign, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1668 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_verify, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_verify, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1689 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_importPubKey, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_importPubKey, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1689; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1711 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_importPrivKey, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_importPrivKey, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1711; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1736 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_hasPrivateKey, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_hasPrivateKey, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1747 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_pubKey, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_pubKey, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1752 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_privKey, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_privKey, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1757 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal_maxSize, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n_maxSize, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1767 */
__pyx_5 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_7ElGamal___eq__, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; goto __pyx_L1;}
__pyx_7 = PyMethod_New(__pyx_5, 0, __pyx_3); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; goto __pyx_L1;}
Py_DECREF(__pyx_5); __pyx_5 = 0;
if (PyObject_SetAttr(__pyx_3, __pyx_n___eq__, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_ElGamal, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
Py_DECREF(__pyx_4); __pyx_4 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1776 */
__pyx_5 = PyDict_New(); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
__pyx_7 = PyTuple_New(0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
if (PyDict_SetItemString(__pyx_5, "__doc__", __pyx_k53p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
__pyx_4 = __Pyx_CreateClass(__pyx_7, __pyx_5, __pyx_n_key, "SSLCrypto"); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1850 */
__pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1850; goto __pyx_L1;}
if (PyDict_SetItem(__pyx_3, __pyx_n_RSA, ((PyObject*)__pyx_ptype_9SSLCrypto_rsa)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1850; goto __pyx_L1;}
__pyx_7 = __Pyx_GetName(__pyx_m, __pyx_n_ElGamal); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1851; goto __pyx_L1;}
if (PyDict_SetItem(__pyx_3, __pyx_n_ElGamal, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1850; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__algosPub, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1850; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1853 */
__pyx_7 = PyDict_New(); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; goto __pyx_L1;}
if (PyDict_SetItem(__pyx_7, ((PyObject*)__pyx_ptype_9SSLCrypto_rsa), __pyx_n_RSA) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; goto __pyx_L1;}
__pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n_ElGamal); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1854; goto __pyx_L1;}
if (PyDict_SetItem(__pyx_7, __pyx_3, __pyx_n_ElGamal) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__algosPub1, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1853; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1856 */
__pyx_3 = PyDict_New(); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; goto __pyx_L1;}
if (PyDict_SetItem(__pyx_3, __pyx_n_Blowfish, ((PyObject*)__pyx_ptype_9SSLCrypto_blowfish)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_4, __pyx_n__algosSes, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1858 */
__pyx_7 = PyDict_New(); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; goto __pyx_L1;}
__pyx_3 = PyInt_FromLong(0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; goto __pyx_L1;}
if (PyDict_SetItem(__pyx_7, __pyx_n_Blowfish, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__algosSes1, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1860 */
__pyx_3 = PyList_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; goto __pyx_L1;}
Py_INCREF(((PyObject*)__pyx_ptype_9SSLCrypto_blowfish));
PyList_SET_ITEM(__pyx_3, 0, ((PyObject*)__pyx_ptype_9SSLCrypto_blowfish));
if (PyObject_SetAttr(__pyx_4, __pyx_n__algosSes2, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; goto __pyx_L1;}
Py_DECREF(__pyx_3); __pyx_3 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1862 */
__pyx_7 = PyDict_New(); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; goto __pyx_L1;}
if (PyDict_SetItem(__pyx_7, ((PyObject*)__pyx_ptype_9SSLCrypto_blowfish), __pyx_n_Blowfish) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_4, __pyx_n__algosSes3, __pyx_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1862; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1865 */
if (PyObject_SetAttr(__pyx_4, __pyx_n__passIV, __pyx_k61p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1865; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1868 */
if (PyObject_SetAttr(__pyx_4, __pyx_n__encBuf, __pyx_k62p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1868; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1873 */
__pyx_3 = PyInt_FromLong(1024); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; goto __pyx_L1;}
__pyx_k63 = __pyx_3;
__pyx_3 = 0;
Py_INCREF(Py_None);
__pyx_k64 = Py_None;
Py_INCREF(Py_None);
__pyx_k65 = Py_None;
__pyx_7 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key___init__, 0); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; goto __pyx_L1;}
__pyx_8 = PyMethod_New(__pyx_7, 0, __pyx_4); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; goto __pyx_L1;}
Py_DECREF(__pyx_7); __pyx_7 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n___init__, __pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1943 */
__pyx_7 = PyInt_FromLong(512); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; goto __pyx_L1;}
__pyx_k66 = __pyx_7;
__pyx_7 = 0;
__pyx_8 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_makeNewKeys, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; goto __pyx_L1;}
__pyx_9 = PyMethod_New(__pyx_8, 0, __pyx_4); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_makeNewKeys, __pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; goto __pyx_L1;}
Py_DECREF(__pyx_9); __pyx_9 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":1985 */
__pyx_8 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_importKey, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1985; goto __pyx_L1;}
__pyx_9 = PyMethod_New(__pyx_8, 0, __pyx_4); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1985; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_importKey, __pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1985; goto __pyx_L1;}
Py_DECREF(__pyx_9); __pyx_9 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2093 */
__pyx_8 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_exportKey, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2093; goto __pyx_L1;}
__pyx_9 = PyMethod_New(__pyx_8, 0, __pyx_4); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2093; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_exportKey, __pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2093; goto __pyx_L1;}
Py_DECREF(__pyx_9); __pyx_9 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2123 */
__pyx_8 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_exportKeyPrivate, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; goto __pyx_L1;}
__pyx_9 = PyMethod_New(__pyx_8, 0, __pyx_4); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_exportKeyPrivate, __pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; goto __pyx_L1;}
Py_DECREF(__pyx_9); __pyx_9 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2183 */
__pyx_8 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_hasPrivateKey, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2183; goto __pyx_L1;}
__pyx_9 = PyMethod_New(__pyx_8, 0, __pyx_4); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2183; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_hasPrivateKey, __pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2183; goto __pyx_L1;}
Py_DECREF(__pyx_9); __pyx_9 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2190 */
__pyx_8 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_encString, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; goto __pyx_L1;}
__pyx_9 = PyMethod_New(__pyx_8, 0, __pyx_4); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_encString, __pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2190; goto __pyx_L1;}
Py_DECREF(__pyx_9); __pyx_9 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2217 */
__pyx_8 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_encStringToAscii, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2217; goto __pyx_L1;}
__pyx_9 = PyMethod_New(__pyx_8, 0, __pyx_4); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2217; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_encStringToAscii, __pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2217; goto __pyx_L1;}
Py_DECREF(__pyx_9); __pyx_9 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2242 */
__pyx_8 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_decString, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2242; goto __pyx_L1;}
__pyx_9 = PyMethod_New(__pyx_8, 0, __pyx_4); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2242; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_decString, __pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2242; goto __pyx_L1;}
Py_DECREF(__pyx_9); __pyx_9 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2276 */
__pyx_8 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_decStringFromAscii, 0); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2276; goto __pyx_L1;}
__pyx_9 = PyMethod_New(__pyx_8, 0, __pyx_4); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2276; goto __pyx_L1;}
Py_DECREF(__pyx_8); __pyx_8 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_decStringFromAscii, __pyx_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2276; goto __pyx_L1;}
Py_DECREF(__pyx_9); __pyx_9 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2307 */
__pyx_8 = __Pyx_GetName(__pyx_m, __pyx_n__True); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; goto __pyx_L1;}
__pyx_k67 = __pyx_8;
__pyx_8 = 0;
__pyx_9 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_signString, 0); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; goto __pyx_L1;}
__pyx_10 = PyMethod_New(__pyx_9, 0, __pyx_4); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; goto __pyx_L1;}
Py_DECREF(__pyx_9); __pyx_9 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_signString, __pyx_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2307; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2350 */
__pyx_9 = __Pyx_GetName(__pyx_m, __pyx_n__True); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; goto __pyx_L1;}
__pyx_k68 = __pyx_9;
__pyx_9 = 0;
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_verifyString, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_verifyString, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2350; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2397 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_getSessKey, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2397; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2397; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_getSessKey, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2397; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2404 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_getSessIV, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2404; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2404; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_getSessIV, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2404; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2411 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_setSessKey, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_setSessKey, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2411; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2419 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_genSessKey, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2419; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2419; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_genSessKey, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2419; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2427 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_encStringSess, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_encStringSess, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2427; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2435 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_decStringSess, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_decStringSess, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2435; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2444 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_test, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_test, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2444; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2457 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_testAscii, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2457; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2457; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_testAscii, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2457; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2477 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_encStart, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2477; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2477; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_encStart, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2477; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2573 */
Py_INCREF(__pyx_k69p);
__pyx_k70 = __pyx_k69p;
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_encNext, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2573; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2573; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_encNext, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2573; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2599 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_encEnd, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_encEnd, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2599; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2615 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_decStart, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_decStart, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2615; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2637 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_decNext, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2637; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2637; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_decNext, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2637; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2761 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key_decEnd, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2761; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2761; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n_decEnd, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2761; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2773 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__wrap, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__wrap, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2773; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2784 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__unwrap, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2784; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2784; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__unwrap, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2784; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2802 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__calcPubBlkSize, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2802; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2802; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__calcPubBlkSize, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2802; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2810 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__encRawPub, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__encRawPub, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2810; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2847 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__decRawPub, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2847; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2847; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__decRawPub, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2847; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2876 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__initBlkCipher, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2876; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2876; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__initBlkCipher, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2876; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2886 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__calcSesBlkSize, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2886; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2886; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__calcSesBlkSize, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2886; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2894 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__testPubKey, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2894; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2894; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__testPubKey, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2894; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2905 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__rawPubKey, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__rawPubKey, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2905; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2914 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__rawPrivKey, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__rawPrivKey, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2914; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2924 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__random, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__random, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2924; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2941 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__genNewSessKey, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2941; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2941; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__genNewSessKey, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2941; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2949 */
__pyx_10 = PyCFunction_New(&__pyx_mdef_9SSLCrypto_3key__setNewSessKey, 0); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2949; goto __pyx_L1;}
__pyx_11 = PyMethod_New(__pyx_10, 0, __pyx_4); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2949; goto __pyx_L1;}
Py_DECREF(__pyx_10); __pyx_10 = 0;
if (PyObject_SetAttr(__pyx_4, __pyx_n__setNewSessKey, __pyx_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2949; goto __pyx_L1;}
Py_DECREF(__pyx_11); __pyx_11 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_key, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1776; goto __pyx_L1;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
Py_DECREF(__pyx_5); __pyx_5 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":2984 */
if (PyObject_SetAttr(__pyx_m, __pyx_n___revision__, __pyx_k71p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2984; goto __pyx_L1;}

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3074 */
__pyx_10 = PyInt_FromLong(256); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; goto __pyx_L1;}
__pyx_k72 = __pyx_10;
__pyx_10 = 0;
Py_INCREF(Py_None);
__pyx_k73 = Py_None;
__pyx_11 = PyInt_FromLong(1); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3074; goto __pyx_L1;}
__pyx_k74 = __pyx_11;
__pyx_11 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3108 */
__pyx_5 = PyInt_FromLong(256); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; goto __pyx_L1;}
__pyx_k75 = __pyx_5;
__pyx_5 = 0;
__pyx_4 = PyInt_FromLong(0); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; goto __pyx_L1;}
__pyx_k76 = __pyx_4;
__pyx_4 = 0;
__pyx_12 = PyInt_FromLong(0); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3108; goto __pyx_L1;}
__pyx_k77 = __pyx_12;
__pyx_12 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3218 */
__pyx_13 = PyList_New(6); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
Py_INCREF(__pyx_n_IntType);
PyList_SET_ITEM(__pyx_13, 0, __pyx_n_IntType);
Py_INCREF(__pyx_n_LongType);
PyList_SET_ITEM(__pyx_13, 1, __pyx_n_LongType);
Py_INCREF(__pyx_n_StringType);
PyList_SET_ITEM(__pyx_13, 2, __pyx_n_StringType);
Py_INCREF(__pyx_n_ListType);
PyList_SET_ITEM(__pyx_13, 3, __pyx_n_ListType);
Py_INCREF(__pyx_n_TupleType);
PyList_SET_ITEM(__pyx_13, 4, __pyx_n_TupleType);
Py_INCREF(__pyx_n_DictType);
PyList_SET_ITEM(__pyx_13, 5, __pyx_n_DictType);
__pyx_14 = __Pyx_Import(__pyx_n_types, __pyx_13); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
__pyx_13 = PyObject_GetAttr(__pyx_14, __pyx_n_IntType); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_IntType, __pyx_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
__pyx_13 = PyObject_GetAttr(__pyx_14, __pyx_n_LongType); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_LongType, __pyx_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
__pyx_13 = PyObject_GetAttr(__pyx_14, __pyx_n_StringType); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_StringType, __pyx_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
__pyx_13 = PyObject_GetAttr(__pyx_14, __pyx_n_ListType); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_ListType, __pyx_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
__pyx_13 = PyObject_GetAttr(__pyx_14, __pyx_n_TupleType); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_TupleType, __pyx_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
__pyx_13 = PyObject_GetAttr(__pyx_14, __pyx_n_DictType); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_DictType, __pyx_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3218; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
Py_DECREF(__pyx_14); __pyx_14 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3219 */
__pyx_14 = __Pyx_Import(__pyx_n_re, 0); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_re, __pyx_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3219; goto __pyx_L1;}
Py_DECREF(__pyx_14); __pyx_14 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3220 */
__pyx_13 = PyList_New(1); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3220; goto __pyx_L1;}
Py_INCREF(__pyx_n_StringIO);
PyList_SET_ITEM(__pyx_13, 0, __pyx_n_StringIO);
__pyx_14 = __Pyx_Import(__pyx_n_cStringIO, __pyx_13); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3220; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
__pyx_13 = PyObject_GetAttr(__pyx_14, __pyx_n_StringIO); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3220; goto __pyx_L1;}
if (PyObject_SetAttr(__pyx_m, __pyx_n_StringIO, __pyx_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3220; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
Py_DECREF(__pyx_14); __pyx_14 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3223 */
__pyx_14 = __Pyx_GetName(__pyx_m, __pyx_n_re); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; goto __pyx_L1;}
__pyx_13 = PyObject_GetAttr(__pyx_14, __pyx_n_compile); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; goto __pyx_L1;}
Py_DECREF(__pyx_14); __pyx_14 = 0;
__pyx_14 = PyTuple_New(1); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; goto __pyx_L1;}
Py_INCREF(__pyx_k88p);
PyTuple_SET_ITEM(__pyx_14, 0, __pyx_k88p);
__pyx_15 = PyObject_CallObject(__pyx_13, __pyx_14); if (!__pyx_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
Py_DECREF(__pyx_14); __pyx_14 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_int_filter, __pyx_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3223; goto __pyx_L1;}
Py_DECREF(__pyx_15); __pyx_15 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3224 */
__pyx_13 = __Pyx_GetName(__pyx_m, __pyx_n_re); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; goto __pyx_L1;}
__pyx_14 = PyObject_GetAttr(__pyx_13, __pyx_n_compile); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;
__pyx_15 = PyTuple_New(1); if (!__pyx_15) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; goto __pyx_L1;}
Py_INCREF(__pyx_k89p);
PyTuple_SET_ITEM(__pyx_15, 0, __pyx_k89p);
__pyx_13 = PyObject_CallObject(__pyx_14, __pyx_15); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; goto __pyx_L1;}
Py_DECREF(__pyx_14); __pyx_14 = 0;
Py_DECREF(__pyx_15); __pyx_15 = 0;
if (PyObject_SetAttr(__pyx_m, __pyx_n_string_filter, __pyx_13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3224; goto __pyx_L1;}
Py_DECREF(__pyx_13); __pyx_13 = 0;

/* "/bulk/main/pywindows/myprogs/SSLCrypto/SSLCrypto.pyx":3310 */
return;
__pyx_L1:;
Py_XDECREF(__pyx_1);
Py_XDECREF(__pyx_2);
Py_XDECREF(__pyx_3);
Py_XDECREF(__pyx_4);
Py_XDECREF(__pyx_5);
Py_XDECREF(__pyx_6);
Py_XDECREF(__pyx_7);
Py_XDECREF(__pyx_8);
Py_XDECREF(__pyx_9);
Py_XDECREF(__pyx_10);
Py_XDECREF(__pyx_11);
Py_XDECREF(__pyx_12);
Py_XDECREF(__pyx_13);
Py_XDECREF(__pyx_14);
Py_XDECREF(__pyx_15);
__Pyx_AddTraceback("SSLCrypto");
}

static char *__pyx_filenames[] = {
"SSLCrypto.pyx",
};

/* Runtime support code */

static void __pyx_init_filenames(void) {
__pyx_f = __pyx_filenames;
}

static int __Pyx_GetStarArgs(
    PyObject **args, 
    PyObject **kwds,
    char *kwd_list[], 
    int nargs,
    PyObject **args2, 
    PyObject **kwds2)
{
    PyObject *x = 0, *args1 = 0, *kwds1 = 0;
    
    if (args2)
        *args2 = 0;
    if (kwds2)
        *kwds2 = 0;
    
    if (args2) {
        args1 = PyTuple_GetSlice(*args, 0, nargs);
        if (!args1)
            goto bad;
        *args2 = PyTuple_GetSlice(*args, nargs, PyTuple_Size(*args));
        if (!*args2)
            goto bad;
    }
    else {
        args1 = *args;
        Py_INCREF(args1);
    }
    
    if (kwds2) {
        if (*kwds) {
            char **p;
            kwds1 = PyDict_New();
            if (!kwds)
                goto bad;
            *kwds2 = PyDict_Copy(*kwds);
            if (!*kwds2)
                goto bad;
            for (p = kwd_list; *p; p++) {
                x = PyDict_GetItemString(*kwds, *p);
                if (x) {
                    if (PyDict_SetItemString(kwds1, *p, x) < 0)
                        goto bad;
                    if (PyDict_DelItemString(*kwds2, *p) < 0)
                        goto bad;
                }
            }
        }
        else {
            *kwds2 = PyDict_New();
            if (!*kwds2)
                goto bad;
        }
    }
    else {
        kwds1 = *kwds;
        Py_XINCREF(kwds1);
    }
    
    *args = args1;
    *kwds = kwds1;
    return 0;
bad:
    Py_XDECREF(args1);
    Py_XDECREF(kwds1);
    if (*args2)
        Py_XDECREF(*args2);
    if (*kwds2)
        Py_XDECREF(*kwds2);
    return -1;
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
    PyObject *__import__ = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    __import__ = PyObject_GetAttrString(__pyx_b, "__import__");
    if (!__import__)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    module = PyObject_CallFunction(__import__, "OOOO",
        name, global_dict, empty_dict, list);
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(__import__);
    Py_XDECREF(empty_dict);
    return module;
}

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result)
        PyErr_SetObject(PyExc_NameError, name);
    return result;
}

static PyObject *__Pyx_CreateClass(
    PyObject *bases, PyObject *dict, PyObject *name, char *modname)
{
    PyObject *py_modname;
    PyObject *result = 0;
    
    py_modname = PyString_FromString(modname);
    if (!py_modname)
        goto bad;
    if (PyDict_SetItemString(dict, "__module__", py_modname) < 0)
        goto bad;
    result = PyClass_New(bases, dict, name);
bad:
    Py_XDECREF(py_modname);
    return result;
}

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    /* Next, repeatedly, replace a tuple exception with its first item */
    while (PyTuple_Check(type) && PyTuple_Size(type) > 0) {
        PyObject *tmp = type;
        type = PyTuple_GET_ITEM(type, 0);
        Py_INCREF(type);
        Py_DECREF(tmp);
    }
    if (PyString_Check(type))
        ;
    else if (PyClass_Check(type))
        ; /*PyErr_NormalizeException(&type, &value, &tb);*/
    else if (PyInstance_Check(type)) {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
              "instance exception may not have a separate value");
            goto raise_error;
        }
        else {
            /* Normalize to raise <class>, <instance> */
            Py_DECREF(value);
            value = type;
            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
            Py_INCREF(type);
        }
    }
    else {
        /* Not something you can raise.  You get an exception
           anyway, just not what you specified :-) */
        PyErr_Format(PyExc_TypeError,
                 "exceptions must be strings, classes, or "
                 "instances, not %s", type->ob_type->tp_name);
        goto raise_error;
    }
    PyErr_Restore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}

static void __Pyx_UnpackError(void) {
    PyErr_SetString(PyExc_ValueError, "unpack sequence of wrong size");
}

static PyObject *__Pyx_UnpackItem(PyObject *seq, int i) {
  PyObject *item;
  if (!(item = PySequence_GetItem(seq, i))) {
    if (PyErr_ExceptionMatches(PyExc_IndexError))
    	__Pyx_UnpackError();
  }
  return item;
}

static int __Pyx_EndUnpack(PyObject *seq, int i) {
  PyObject *item;
  if (item = PySequence_GetItem(seq, i)) {
    Py_DECREF(item);
    __Pyx_UnpackError();
    return -1;
  }
  PyErr_Clear();
    return 0;
}

static PyObject *__Pyx_GetExcValue(void) {
    PyObject *type = 0, *value = 0, *tb = 0;
    PyObject *result = 0;
    PyThreadState *tstate = PyThreadState_Get();
    PyErr_Fetch(&type, &value, &tb);
    PyErr_NormalizeException(&type, &value, &tb);
    if (PyErr_Occurred())
        goto bad;
    if (!value) {
        value = Py_None;
        Py_INCREF(value);
    }
    Py_XDECREF(tstate->exc_type);
    Py_XDECREF(tstate->exc_value);
    Py_XDECREF(tstate->exc_traceback);
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    result = value;
    Py_XINCREF(result);
    type = 0;
    value = 0;
    tb = 0;
bad:
    Py_XDECREF(type);
    Py_XDECREF(value);
    Py_XDECREF(tb);
    return result;
}

static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject("stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}

static int __Pyx_PrintItem(PyObject *v) {
    PyObject *f;
    
    if (!(f = __Pyx_GetStdout()))
        return -1;
    if (PyFile_SoftSpace(f, 1)) {
        if (PyFile_WriteString(" ", f) < 0)
            return -1;
    }
    if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
        return -1;
    if (PyString_Check(v)) {
        char *s = PyString_AsString(v);
        int len = PyString_Size(v);
        if (len > 0 &&
            isspace(Py_CHARMASK(s[len-1])) &&
            s[len-1] != ' ')
                PyFile_SoftSpace(f, 0);
    }
    return 0;
}

static int __Pyx_PrintNewline(void) {
    PyObject *f;
    
    if (!(f = __Pyx_GetStdout()))
        return -1;
    if (PyFile_WriteString("\n", f) < 0)
        return -1;
    PyFile_SoftSpace(f, 0);
    return 0;
}

static void __Pyx_WriteUnraisable(char *name) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    PyErr_Fetch(&old_exc, &old_val, &old_tb);
    ctx = PyString_FromString(name);
    PyErr_Restore(old_exc, old_val, old_tb);
    if (!ctx)
        ctx = Py_None;
    PyErr_WriteUnraisable(ctx);
}

static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
    while (t->p) {
        *t->p = PyString_InternFromString(t->s);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(char *funcname) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyObject *empty_tuple = 0;
    PyObject *empty_string = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    
    py_srcfile = PyString_FromString(__pyx_filename);
    if (!py_srcfile) goto bad;
    py_funcname = PyString_FromString(funcname);
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    empty_tuple = PyTuple_New(0);
    if (!empty_tuple) goto bad;
    empty_string = PyString_FromString("");
    if (!empty_string) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        empty_string, /*PyObject *code,*/
        empty_tuple,  /*PyObject *consts,*/
        empty_tuple,  /*PyObject *names,*/
        empty_tuple,  /*PyObject *varnames,*/
        empty_tuple,  /*PyObject *freevars,*/
        empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        empty_string  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_Get(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(empty_tuple);
    Py_XDECREF(empty_string);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
