Changing random key element generation range