Actually generating key