generate random secretkey if none set