generate properly random keys