improvements to sign.c, verify2.c