Change signatures for pad_and_sign to allow for errors

preliminary progress on #48