Adding key generation