Are short ElGamal keysizes acceptable (1024-bit or lower) in cases where security is only necessary in a short timeframe I am working on an efficient mental poker framework. I have implemented a functional and secure commutative encryption scheme based on ElGamal as described in: 

http://groups.csail.mit.edu/cis/theses/weis-phd-thesis.pdf

However, shuffling and dealing an entire deck is causing slowdown as the number of players involved in the game increases (more players means more commutative encryptions and decryptions). Even in initial, idealized tests things are pretty slow.

The system parameters currently used are an advisable 2048-bit safe prime (from RFC 5114) but I'm wondering if these key sizes are overkill in the case of something like mental poker where decryptions of relevant cards will happen within a few minutes and after the hand the security of the previous deck is irrelevant? This got me wondering in general if key sizes are flexible depending on "how long the encryption needs to last" - are there any guidelines here? Any pitfalls I'm not considering?
This got me wondering in general if key sizes are flexible depending on "how long the encryption needs to last" - are there any guidelines here? Any pitfalls I'm not considering?


Yes, you can down-scale the bit-length, e.g. to 1536-bit and it will still likely stay somewhat secure. But do note that for discrete-logarithm over finite fields based cryptosystems there's a steep cutoff in security. Once the parameters are so small that you can break the scheme, e.g. within a week or longer on your hardware, you get "precomputed" data that allows to find any discrete logarithm of interest in a matter of seconds / minutes.

This observation was widely made first with LogJam.