Generate the key.