473,490 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

pycrypto rsa inverse of p modulo q

jt
Looking up into Crypto.PublicKey.RSA, I see there is a computed value
named "u" for which I can't see the use. The value of "u" is the
inverse of p modulo q, in the code:
obj.u = pubkey.inverse(obj.p, obj.q)
Can someone tell me where this value could be used in the RSA scheme?
(it is not used in the code anyway)

Thx,
--
jt

Nov 4 '05 #1
1 3107

jt wrote:
Looking up into Crypto.PublicKey.RSA, I see there is a computed value
named "u" for which I can't see the use. The value of "u" is the
inverse of p modulo q, in the code:
obj.u = pubkey.inverse(obj.p, obj.q)
Can someone tell me where this value could be used in the RSA scheme?
(it is not used in the code anyway)
Yes, it is. Look in _fastmath.c. It's used in rsaDecrypt:

/* fast path */
/* m1 = c ^ (d mod (p-1)) mod p */
/* m2 = c ^ (d mod (q-1)) mod q */
/* h = u * ( m2 - m1 ) mod q */ <-- right here
/* m = m2 + h * p */


Thx,
--
jt


Nov 4 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
25182
by: vishnu mahendra | last post by:
hello to all, can any one please give me an algorithm to find inverse of a matrix of order n rows and m columns. thank you in advance, vishnu.
11
3013
by: dirvine | last post by:
Does anyone know if pycrypto is active at all. I have been browsing groups etc. for some info and have found entries from 2003 (latest) regarding some bits I was looking for in particular reference...
2
2484
by: Mike Meng | last post by:
Hi all, I'm learning Twisted and downloaded pyOpenSSL and pycrypto win32 installer on http://twisted.sourceforge.net/contrib/ . But I find the lastest version are for Python 2.3. I try to...
13
11351
by: luca72 | last post by:
Hello I have to make an easy operation but reading the pycrypto doc. a never see AES example I have to cript this key 'ea523a664dabaa4476d31226a1e3bab0' with the AES. Can you help me for make it...
2
3635
by: Ning | last post by:
I'm trying to write an IM client which sends encrypted messages to the server. I tried to use pycrypto library, but when I came to 3DES cypher I was confused about the keysize to use. In the...
3
4304
by: mirandacascade | last post by:
Operating system: Win XP Vsn of Python: 2.4 Situation is this: Required to calcluate a message digest. The process for calcluating the digest must use an SHA-256 algorithm. Questions: 1) Is...
5
12494
by: mirandacascade | last post by:
Attempting to determine whether the PyCrypto package has the capability to perform AES256 encryption. I received the following C# snippet: CryptoProvider provider = new CryptoProvider();...
4
2088
by: Jonathan Fine | last post by:
Hello As part of the MathTran project I found myself wanting to maintain a bijection between long names and short names. http://www.open.ac.uk/mathtran In other words, I wanted to have two...
0
2282
by: yaipa | last post by:
I snipped this bit of code out of Andrew Kuchling 'pyCrypto' test fixture. Having a need to XOR Binascii Hex strings in my current project, I found it very helpful to cut down on a bit of code...
0
7108
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5445
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4875
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.