Katz J, Lindell Y.  2008.  Handling expected polynomial-time strategies in simulation-based security proofs. Journal of Cryptology. 21(3):303-349.