Automatic key creation and authentication