I want to use the Paillier cryptosystem for encryption and decryption purposes in my research work. But i haven't found a way to encrypt big input messages; As i want to encrypt the message i,e m :
m = 0xa56f89d6aa234776b22347293429ff074928ab3749cc2837c492b874ebfaba78364ba0912efe862f628347982478b
Key Gen:
p =887, q = 907 , n =804509 ,n² = 647234731081;
g = n+1 = 804510;
λ = LCM(p-1,q-1) = 401358;
μ = L(g^λ mod n²)^(-1) mod n = 637146
Encryption:
Let random r = 1987
c = ((g^m) * (r^n)) (mod n^2)
How can calculate g^m
for such big input m
?
If encrypted, then how can decryption work for big messages i,e m
?