Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

help!

Name: Anonymous 2011-08-24 0:32

Ive gotten to the point in RSA where i can generate the

exponent, the modulus and the private key

They all match up to what the assignment says they should.

When i go to apply
C ≡ x^e (mod N) to encrypt
M ≡ C^d ≡ x^{ed} (mod N). doesn't decrypt

im using python. my code to get the private key is
mod(mod(e, T)**mod(-1, T), T) where T = (p-1)*(q-1)
the exponent e and modulus = P*N


I basically need help converting the encrypt and decrypt lines to python.

d ≡ e^{-1} (mod (p-1)(q-1))
i wrote as mod(mod(e, T)**mod(-1, T), T)

Name: Anonymous 2011-08-24 0:42

python
There's your problem.

Name: Anonymous 2011-08-24 0:56

>>2
fuck off and die

Name: Anonymous 2011-08-24 1:02

Python wouldnt be on the list of approved Google languages if it was the problem

Name: Anonymous 2011-08-24 1:13

>>1
I hope you're using exp(x,e,n) instead of doing x**e % n like a little unoptimized fuckhead.

Name: Anonymous 2011-08-24 1:19

How do you do the 3 line "equal to"(=) sign?

Name: Anonymous 2011-08-24 1:25

import gmpy
d = gmpy.invert(e, phi)

Name: Anonymous 2011-08-24 12:15

Use the EEA to calculate the inverse of e and Square&Multiply to encrypt/decrypt instead of the naive exponentiations, ``programmer''.

Name: Anonymous 2011-08-24 19:28

>>6
I call it the equal as fuck sign.

Name: Anonymous 2011-08-24 22:27

>>6
Equivalence.

Name: Anonymous 2011-08-25 1:35

<D-D-D-DOUBLES!

Don't change these.
Name: Email:
Entire Thread Thread List