CKeyGen implemented