Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #22570

Re: simple rsa from javascript to python

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 <nobody@nowhere.com>
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 <pan.2012.04.03.05.13.10.252000@nowhere.com>
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<l_^TQjKa0UP_O8AJoL=dR0\ckLKG@WeZ<[7LZNRFM`R5`QLVj;OM2Z^cWRFGAKX^VTnYf4@5K
X-Complaints-To abuse@zen.co.uk
Xref csiph.com comp.lang.python:22570

Show key headers only | View raw


On Mon, 02 Apr 2012 16:19:05 -0700, Astan Chee wrote:

> 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))

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

simple rsa from javascript to python Astan Chee <astan.chee@gmail.com> - 2012-04-02 16:19 -0700
  Re: simple rsa from javascript to python Nobody <nobody@nowhere.com> - 2012-04-03 06:12 +0100

csiph-web