set algo_name and type in sign function (required some more implementation)