added key generator (see #125)