Reputation: 2019
I am trying to learn Diffie-Hellman, and the reason for its security should be because the computations needed to brute-force it should be so expensive that it would just not be worth it. However typing
(2n**2048n-1n)%(2n**2048n)
in Google Chrome gives an instant result. How come?
Upvotes: 0
Views: 55
Reputation: 1073968
2n**2048n
is "only" 617 digits in decimal:
32317006071311007300714876688669951960444102669715484032130345427524655138867890893197201411522913463688717960921898019494119559150490921095088152386448283120630877367300996091750197750389652106796057638384067568276792218642619756161838094338476170470581645852036305042887575891541065808607552399123930385521914333389668342420684974786564569494856176035326322058077805659331026192708460314150258592864177116725943603718461857357598351152301645904403697613233287231227125684710820209725157101726931323469678542580656697935045997268352998638215525166389437335543602135433229604645318478604952148193555853611059596230656n
%
isn't a particularly difficult operation, even on a pair of numbers that large.
I think it's the sheer number of computations, not the difficulty of one of them, that's the key thing in Diffie-Hellman (though I have to admit not being a crypto guy).
Upvotes: 1