Foundations of Cryptography:Volume 2, Basic Applications