Added cryptographic implementations for G_r_pwda and P_r modulo q.