prototyping interactive keygen and init