add keygen and groupgen