optionally generate key during publication