Updates to key gen untilities.