updated the algo for encrypted signature