Paillier homomorphic encryption
Paillier — an additively homomorphic encryption system. Its magical property: if we multiply ciphertexts mod n2, the plaintexts are added: E(m1) · E(m2) mod n2 = E(m1 + m2 mod n). This allows computing while preserving confidentiality — for example, tallying votes without opening them.
Key generation (g = n+1 scheme): public key (n, g), private lambda = (p-1)(q-1), mu = lambda-1 mod n. Decryption: m = L(clambda mod n2) · mu mod n, where L(u) = (u-1)/n.
The attached paillier.txt file contains n, g, lambda, mu and 5 ciphertexts c0..c4. Without decrypting them individually, use the homomorphic property to find the total sum: multiply all ciphertexts mod n2, then decrypt the result once. If you convert the resulting number to bytes, the flag will be revealed.