make sign/verify independent of key type