RSA Question

L00PeR
7 years ago

0

Hi, I have a problem while decrypting on RSA.
The problem is that when I have all what I need for decrypting (d, c and n), I need to do:
c^d mod n
But now imagine that d = 12736128738213
NO WAY!!
It would take ages for my pc to process that!!!
Please someone help me!!

3replies
4voices
173views
Mugi [Mugiwara27]
7 years ago

0

lol You really think anyone can decrypt RSA like you think ?
RSA algorithm is “crackable” is small numbers are chosen, but if they are too big, it will result in a impossible bruteforce on it = uncrackable

And that’s why RSA is sooooo much used in IT world nowadays :)
It'’s a strong encryption is you use some good values

dloser
7 years ago

1

@Mugiwara27**: this question is not about cracking, but simply decrypting when you have the key.

A large value for d, which is used for decryption, is normal and actually very essential; otherwise it would indeed be very easy to find. It will usually be about as large as n, which is typically a few thousand bits large.

@L00PeR**: The main solution to calculating with these values lies in the following:

[list=1]
[] b2*e = (be)2
[
] (a*b) mod n = ((a mod n) * (b mod n)) mod n
[/list]

The first allows you to calculate the exponentiation in log2(d) steps instead of d steps (i.e. a few thousand steps instead of millions of millions of millions of … steps). The second makes sure you never need to store more than log2(n) bits (instead of practically an infinite amount).

Try and play around with that. (Or just look up modular exponentation.) ;)

Smyler [WHGhost]
7 years ago | edited 7 years ago

0

–EDIT– See dloser’s post it’s way more informative, I hadn’t refresh the page
The formula he wrote is the decryption function @Mugiwara27, with (d,n) as the private key and c the cyphered data, he is not bruteforcing anything here. The problem is that d is too large in his example (as he explains it). I don’t know the size of d in practice, but I think its not that much, where did you get this number?

You must be logged in to reply to this discussion. Login
1 of 4

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss