fix bug in orig script. define group as var
filled in generate key function.  creates a 256 length hash using random number seed