fixed secret key gen