Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!reader01.nrc01.news.zen.net.uk.POSTED!not-for-mail From: Nobody Subject: Re: simple rsa from javascript to python Date: Tue, 03 Apr 2012 06:12:44 +0100 User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.python References: <2aaac386-2223-4f70-aee5-a584dba5199a@r2g2000pbs.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lines: 12 Organization: Zen Internet NNTP-Posting-Host: 255dba10.news.zen.co.uk X-Trace: DXC=9^KJO2h?mE@2[5 and I'm trying to convert this into python and I'm rather stuck with > pycrypto as there is no example on how to make the public key with a mod > and exponent (or I've probably missed it). from Crypto.PublicKey import RSA mod = long("B99808B881F3D8A...", 16) # truncated for clarity exp = long("010001", 16) rsa = RSA.construct((mod, exp))