fermacias
fermacias

Reputation: 3

Speed up exponential elgamal decryption

I am implementing the exponential El Gamal cryptosystem (the same that El Gamal, but encrypting g**m when you wanna encrypt m). I am working with plain texts between 1 and 10**35. Everything is fine until the moment of the decryption corresponding to the bigger plain texts.

If cypher text is composed by c1 = g**r mod p and c2 = g**(ar) g**m mod p, with private key a, when decrypting, I can get the value of g**m mod p, but I can't calculate the discrete logarithm in a reasonable amount of time.

If I were working with smaller plain texts, I could calculate sequentially g%m, g**2%m,... until obtain the value of g**m mod p, and deduct the discrete logarithm. But, with big plain text this takes a lot of time.

I thought to precompute the values ​​of g%m,... g**(10**35)%m ​​(assuming the risk of leaking the private key), to avoid making the big calculus on each decryption.

In order to doing this, I develop a code that parallelizes the calculation of powers using Cuda (you can see more detail on this question). But I found Cuda doesn't support such big numbers as the value of g and p I am using :(

Do you know some technique, algorithm or tool I can use to calculate faster multiplications of big big numbers?

Upvotes: 0

Views: 260

Answers (0)

Related Questions