certificate generation work (user,server) - proofreading needed anyway. wip for other functions