Revised secret generation