added time measurement for key gen and ticket gen