Big redo of key generation