Algebraic (Trapdoor) One-Way Functions and Their Applications